fix: repl
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
use inkwell::context::Context;
|
||||
use itertools::Itertools;
|
||||
use rustyline::error::ReadlineError;
|
||||
use rustyline::{DefaultEditor, Result};
|
||||
@@ -6,7 +5,6 @@ use rustyline::{DefaultEditor, Result};
|
||||
use nixjit::compile::compile;
|
||||
use nixjit::error::Error;
|
||||
use nixjit::ir::downgrade;
|
||||
use nixjit::jit::JITContext;
|
||||
use nixjit::vm::run;
|
||||
|
||||
macro_rules! unwrap {
|
||||
@@ -44,9 +42,7 @@ fn main() -> Result<()> {
|
||||
let expr = root.tree().expr().unwrap();
|
||||
let downgraded = unwrap!(downgrade(expr));
|
||||
let prog = compile(downgraded);
|
||||
let ctx = Context::create();
|
||||
let jit = JITContext::new(&ctx);
|
||||
println!("{}", unwrap!(run(prog, jit)));
|
||||
println!("{}", unwrap!(run(prog)));
|
||||
}
|
||||
Err(ReadlineError::Interrupted) => {
|
||||
println!("CTRL-C");
|
||||
|
||||
Reference in New Issue
Block a user