diff options
Diffstat (limited to 'tvix/eval/src')
-rw-r--r-- | tvix/eval/src/compiler/mod.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs index e5bf0992b1dd..5e9131bf6263 100644 --- a/tvix/eval/src/compiler/mod.rs +++ b/tvix/eval/src/compiler/mod.rs @@ -584,15 +584,12 @@ impl Compiler<'_> { let mut jumps = vec![]; for fragment in path.attrs() { - self.compile_attr(slot, fragment); - self.push_op_old(OpCode::OpAttrsTrySelect); - jumps.push( - self.chunk() - .push_op_old(OpCode::OpJumpIfNotFound(JumpOffset(0))), - ); + self.compile_attr(slot, fragment.clone()); + self.push_op(OpCode::OpAttrsTrySelect, &fragment); + jumps.push(self.push_op(OpCode::OpJumpIfNotFound(JumpOffset(0)), &fragment)); } - let final_jump = self.push_op_old(OpCode::OpJump(JumpOffset(0))); + let final_jump = self.push_op(OpCode::OpJump(JumpOffset(0)), &path); for jump in jumps { self.patch_jump(jump); |