about summary refs log tree commit diff
path: root/tvix/eval/src/eval.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-09-02T14·44+0300
committertazjin <tazjin@tvl.su>2022-09-08T12·53+0000
commitcc526a2c873524faa83cad62bde2edda59ea7820 (patch)
treeeea6b9463b97e2d0756c8919a8ddcb95d8fbdee9 /tvix/eval/src/eval.rs
parenta3b19ad8be9809205e018146ccba2a6bad53d605 (diff)
feat(tvix/eval): thread codemap through to disassembler r/4747
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 <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/eval.rs')
-rw-r--r--tvix/eval/src/eval.rs9
1 files changed, 8 insertions, 1 deletions
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<PathBuf>) -> EvalResult<Value> {
         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);