Skip to content

Commit c153808

Browse files
committed
fix: repl test
1 parent 8c5b7c6 commit c153808

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

immix

src/repl/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ project = "repl"
388388

389389
fn load_mod_and_evaluate(db: &Database, mem: MemDocsInput, ctx: &Context) {
390390
let mods = compiler::compile_dry::accumulated::<ModBuffer>(db, mem);
391-
391+
unsafe { immix::setREPL(1) };
392392
for m in &mods {
393393
let m = &m.0;
394394
if !m.name.starts_with("__anon__") {
@@ -405,6 +405,7 @@ fn load_mod_and_evaluate(db: &Database, mem: MemDocsInput, ctx: &Context) {
405405
)
406406
.unwrap();
407407
let p = mo.as_mut_ptr();
408+
immix::run_module_pass(p as _, mem.op(db).optimization as _, 0, 0);
408409
mo.strip_debug_info();
409410
log::trace!("Loaded module, content:\n{}", mo.to_string());
410411
LOADED_SET.lock().unwrap().insert(m.path.clone());
@@ -430,6 +431,7 @@ fn load_mod_and_evaluate(db: &Database, mem: MemDocsInput, ctx: &Context) {
430431
.unwrap();
431432

432433
let p = m.as_mut_ptr();
434+
immix::run_module_pass(p as _, mem.op(db).optimization as _, 0, 0);
433435
m.strip_debug_info();
434436
log::trace!("Evaluate module, content:\n{}", m.to_string());
435437
immix::RunExpr(p as _);

0 commit comments

Comments
 (0)