about summary refs log tree commit diff
path: root/tvix/eval/src/compiler
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-12-12T12·17-0800
committerclbot <clbot@tvl.fyi>2023-12-12T17·04+0000
commitbcc1ea85521ea99e03efb97bf397cd63ebc3398e (patch)
tree7c14fa5827a6562cbe383a16cafc3f2c602bbc0e /tvix/eval/src/compiler
parent7b9eea71d021315a1d29c2bcca84de72cc507e04 (diff)
fix(tvix/eval): make `||` propagate catchables r/7191
Change-Id: I42f994d7c9228368d5f6c30c4730c24666f7bc69
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10320
Autosubmit: Adam Joseph <adam@westernsemico.com>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src/compiler')
-rw-r--r--tvix/eval/src/compiler/mod.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs
index 831b92b67a..451fa44de7 100644
--- a/tvix/eval/src/compiler/mod.rs
+++ b/tvix/eval/src/compiler/mod.rs
@@ -572,6 +572,7 @@ impl Compiler<'_> {
         self.compile(slot, node.lhs().unwrap());
         self.emit_force(&node.lhs().unwrap());
 
+        let throw_idx = self.push_op(OpCode::OpJumpIfCatchable(JumpOffset(0)), node);
         // Opposite of above: If this value is **true**, we can
         // short-circuit the right-hand side.
         let end_idx = self.push_op(OpCode::OpJumpIfTrue(JumpOffset(0)), node);
@@ -581,6 +582,7 @@ impl Compiler<'_> {
 
         self.patch_jump(end_idx);
         self.push_op(OpCode::OpAssertBool, node);
+        self.patch_jump(throw_idx);
     }
 
     fn compile_implication(&mut self, slot: LocalIdx, node: &ast::BinOp) {