diff options
author | Vincent Ambo <mail@tazj.in> | 2022-09-04T17·10+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-09-09T21·14+0000 |
commit | e2a942e4b2ccdf2caa2970201f90edf5be926c2b (patch) | |
tree | 6d096fc2eaff558e6ba03cbbdff0d797942ca346 /tvix/eval/src/eval.rs | |
parent | e03a729fa36287e236b5ac66f17d67d63a219d00 (diff) |
chore(tvix/eval): clean up remains of previous disassembler impl r/4780
Change-Id: Ib402ea23a58dc52ed0c5a97178cb5d0e53d69300 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6454 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/eval.rs')
-rw-r--r-- | tvix/eval/src/eval.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tvix/eval/src/eval.rs b/tvix/eval/src/eval.rs index 47c7203d28ac..8f32c819d546 100644 --- a/tvix/eval/src/eval.rs +++ b/tvix/eval/src/eval.rs @@ -3,7 +3,7 @@ use std::{path::PathBuf, rc::Rc}; use crate::{ builtins::global_builtins, errors::{Error, ErrorKind, EvalResult}, - observer::{DisassemblingObserver, NoOpObserver}, + observer::{DisassemblingObserver, TracingObserver}, value::Value, }; @@ -41,7 +41,7 @@ pub fn interpret(code: &str, location: Option<PathBuf>) -> EvalResult<Value> { println!("{:?}", root_expr); } - let mut observer = DisassemblingObserver::new(codemap.clone(), std::io::stderr()); + let mut observer = DisassemblingObserver::new(codemap, std::io::stderr()); let result = crate::compiler::compile(root_expr, location, &file, global_builtins(), &mut observer)?; @@ -68,6 +68,6 @@ pub fn interpret(code: &str, location: Option<PathBuf>) -> EvalResult<Value> { return Err(err.clone()); } - let mut tracer = NoOpObserver::default(); + let mut tracer = TracingObserver::new(std::io::stderr()); crate::vm::run_lambda(&mut tracer, result.lambda) } |