mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
inline dbg
This commit is contained in:
parent
dcb530d3af
commit
e7f3c6f281
18 changed files with 192 additions and 21 deletions
|
@ -104,6 +104,13 @@ pub(crate) fn finalize(env: &Env) {
|
|||
.build_call(func, &[], "call_expect_failed_finalize");
|
||||
}
|
||||
|
||||
pub(crate) fn send_dbg(env: &Env) {
|
||||
let func = env.module.get_function(bitcode::UTILS_SEND_DBG).unwrap();
|
||||
|
||||
env.builder
|
||||
.build_call(func, &[], "call_expect_failed_finalize");
|
||||
}
|
||||
|
||||
pub(crate) fn clone_to_shared_memory<'a, 'ctx, 'env>(
|
||||
env: &Env<'a, 'ctx, 'env>,
|
||||
scope: &Scope<'a, 'ctx>,
|
||||
|
|
|
@ -1119,6 +1119,25 @@ pub(crate) fn run_low_level<'a, 'ctx, 'env>(
|
|||
ptr.into()
|
||||
}
|
||||
},
|
||||
Dbg => {
|
||||
// now what
|
||||
arguments!(condition);
|
||||
|
||||
let region = roc_region::all::Region::zero(); // todo
|
||||
|
||||
crate::llvm::expect::clone_to_shared_memory(
|
||||
env,
|
||||
scope,
|
||||
layout_ids,
|
||||
args[0],
|
||||
region,
|
||||
&[],
|
||||
);
|
||||
|
||||
crate::llvm::expect::send_dbg(env);
|
||||
|
||||
condition
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue