about summary refs log tree commit diff
path: root/tvix/eval/src
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-14T21·38+0300
committertazjin <tazjin@tvl.su>2022-08-31T22·26+0000
commit19878c5fef1f8bb1c051083a30616d4738d637e4 (patch)
treea1c7602632220f31da1b1c1f11e96862fcc0488f /tvix/eval/src
parent5a497cdf1cfae31c3a391ca803d8a0bd86bfab1b (diff)
feat(tvix/eval): implement OpPopWith r/4553
Change-Id: I752d9428a73f893741746e9d5b79e8d8d570bb81
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6219
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval/src')
-rw-r--r--tvix/eval/src/opcode.rs1
-rw-r--r--tvix/eval/src/vm.rs3
2 files changed, 4 insertions, 0 deletions
diff --git a/tvix/eval/src/opcode.rs b/tvix/eval/src/opcode.rs
index 4a4d47045fbd..7d2de537d522 100644
--- a/tvix/eval/src/opcode.rs
+++ b/tvix/eval/src/opcode.rs
@@ -54,6 +54,7 @@ pub enum OpCode {
 
     // `with`-handling
     OpPushWith(usize),
+    OpPopWith,
 
     // Lists
     OpList(usize),
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs
index 66126881a84f..8a6959114fff 100644
--- a/tvix/eval/src/vm.rs
+++ b/tvix/eval/src/vm.rs
@@ -282,6 +282,9 @@ impl VM {
                 }
 
                 OpCode::OpPushWith(idx) => self.with_stack.push(idx),
+                OpCode::OpPopWith => {
+                    self.with_stack.pop();
+                }
             }
 
             #[cfg(feature = "disassembler")]