about summary refs log tree commit diff
path: root/tvix/eval/src/chunk.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/chunk.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/chunk.rs')
-rw-r--r--tvix/eval/src/chunk.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/tvix/eval/src/chunk.rs b/tvix/eval/src/chunk.rs
index f3df51f31600..defa409f18d6 100644
--- a/tvix/eval/src/chunk.rs
+++ b/tvix/eval/src/chunk.rs
@@ -26,6 +26,9 @@ pub struct Chunk {
     pub code: Vec<OpCode>,
     pub constants: Vec<Value>,
     spans: Vec<SourceSpan>,
+
+    #[cfg(feature = "disassembler")]
+    pub codemap: std::rc::Rc<codemap::CodeMap>,
 }
 
 impl Chunk {