about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-09-01T14·14+0300
committertazjin <tazjin@tvl.su>2022-09-07T19·23+0000
commit2ad89a00fbabaade066a276cba4f041690f14d74 (patch)
tree0386a2a7806b61668263ba8d645e88dd9e4b567c /tvix
parentc417a084cc9f22abeb74e684330283e8ad26599b (diff)
feat(tvix/eval): track source spans for `?` operator r/4718
Change-Id: Idb842fb20fab14150455a81ea6c947e75b314d8a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6385
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix')
-rw-r--r--tvix/eval/src/compiler/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index abfe551c760e..c99415d845b9 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -386,7 +386,7 @@ impl Compiler<'_> {
         // next nested element, for all fragments except the last one.
         for (count, fragment) in node.attrpath().unwrap().attrs().enumerate() {
             if count > 0 {
-                self.push_op_old(OpCode::OpAttrsTrySelect);
+                self.push_op(OpCode::OpAttrsTrySelect, &fragment);
             }
 
             self.compile_attr(slot, fragment);
@@ -394,7 +394,7 @@ impl Compiler<'_> {
 
         // After the last fragment, emit the actual instruction that
         // leaves a boolean on the stack.
-        self.push_op_old(OpCode::OpAttrsIsSet);
+        self.push_op(OpCode::OpAttrsIsSet, &node);
     }
 
     fn compile_attr(&mut self, slot: Option<LocalIdx>, node: ast::Attr) {