From cc526a2c873524faa83cad62bde2edda59ea7820 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 2 Sep 2022 17:44:31 +0300 Subject: feat(tvix/eval): thread codemap through to disassembler If the disassembler feature is enabled, make sure that an Rc of the codemap is available through the chunk. Change-Id: I700f27ab665a704f73457b19bd2d7efc93828a16 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6414 Reviewed-by: sterni Tested-by: BuildkiteCI --- tvix/eval/src/eval.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tvix/eval/src/eval.rs') diff --git a/tvix/eval/src/eval.rs b/tvix/eval/src/eval.rs index 1362c0394d27..296887451610 100644 --- a/tvix/eval/src/eval.rs +++ b/tvix/eval/src/eval.rs @@ -39,7 +39,14 @@ pub fn interpret(code: &str, location: Option) -> EvalResult { println!("{:?}", root_expr); } - let result = crate::compiler::compile(root_expr, location, &file, global_builtins())?; + let result = crate::compiler::compile( + root_expr, + location, + &file, + global_builtins(), + #[cfg(feature = "disassembler")] + std::rc::Rc::new(codemap), + )?; #[cfg(feature = "disassembler")] crate::disassembler::disassemble_chunk(&result.lambda.chunk); -- cgit 1.4.1