mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
remove dbg lowlevel
This commit is contained in:
parent
f76df8a356
commit
4ef541395a
7 changed files with 2 additions and 53 deletions
|
@ -11,7 +11,7 @@ use roc_builtins::bitcode::{self, FloatWidth, IntWidth};
|
|||
use roc_error_macros::internal_error;
|
||||
use roc_module::{low_level::LowLevel, symbol::Symbol};
|
||||
use roc_mono::{
|
||||
ir::{HigherOrderLowLevel, LookupType},
|
||||
ir::HigherOrderLowLevel,
|
||||
layout::{Builtin, LambdaSet, Layout, LayoutIds},
|
||||
};
|
||||
use roc_target::PtrWidth;
|
||||
|
@ -1149,36 +1149,6 @@ pub(crate) fn run_low_level<'a, 'ctx, 'env>(
|
|||
ptr.into()
|
||||
}
|
||||
},
|
||||
Dbg => {
|
||||
assert_eq!(args.len(), 2);
|
||||
let condition = load_symbol(scope, &args[0]);
|
||||
let dbg_spec_var_symbol = args[1];
|
||||
|
||||
if env.mode.runs_expects() {
|
||||
let region = unsafe { std::mem::transmute::<_, roc_region::all::Region>(args[0]) };
|
||||
|
||||
let shared_memory = crate::llvm::expect::SharedMemoryPointer::get(env);
|
||||
|
||||
// HACK(dbg-spec-var): the specialized type variable is passed along as a fake symbol
|
||||
let specialized_var =
|
||||
unsafe { LookupType::from_index(dbg_spec_var_symbol.ident_id().index() as _) };
|
||||
|
||||
crate::llvm::expect::clone_to_shared_memory(
|
||||
env,
|
||||
scope,
|
||||
layout_ids,
|
||||
&shared_memory,
|
||||
args[0],
|
||||
region,
|
||||
&[args[0]],
|
||||
&[specialized_var],
|
||||
);
|
||||
|
||||
crate::llvm::expect::notify_parent_dbg(env, &shared_memory);
|
||||
}
|
||||
|
||||
condition
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue