feat(vm): threaded VM
This commit is contained in:
+5
-5
@@ -40,7 +40,7 @@ struct ExprSource {
|
||||
file: Option<PathBuf>,
|
||||
}
|
||||
|
||||
fn run_compile(eval: &mut Evaluator, src: ExprSource, _silent: bool) -> Result<()> {
|
||||
fn run_compile(eval: &mut Evaluator, src: ExprSource, silent: bool) -> Result<()> {
|
||||
let src = if let Some(expr) = src.expr {
|
||||
Source::new_eval(expr)?
|
||||
} else if let Some(file) = src.file {
|
||||
@@ -49,10 +49,10 @@ fn run_compile(eval: &mut Evaluator, src: ExprSource, _silent: bool) -> Result<(
|
||||
unreachable!()
|
||||
};
|
||||
match eval.compile_bytecode(src) {
|
||||
Ok(_ip) => {
|
||||
// if !silent {
|
||||
// println!("{}", eval.disassemble_colored(ip));
|
||||
// }
|
||||
Ok(ip) => {
|
||||
if !silent {
|
||||
println!("{}", eval.disassemble_colored(ip));
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
eprintln!("{:?}", miette::Report::new(*err));
|
||||
|
||||
Reference in New Issue
Block a user