about summary refs log tree commit diff
path: root/tvix/eval/src/vm.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/vm.rs')
-rw-r--r--tvix/eval/src/vm.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs
index 9a65668caa23..7a1082344e34 100644
--- a/tvix/eval/src/vm.rs
+++ b/tvix/eval/src/vm.rs
@@ -117,8 +117,17 @@ impl VM {
                 OpCode::OpNull => self.push(Value::Null),
                 OpCode::OpTrue => self.push(Value::Bool(true)),
                 OpCode::OpFalse => self.push(Value::Bool(false)),
+
                 OpCode::OpAttrs(count) => self.run_attrset(count)?,
                 OpCode::OpAttrPath(count) => self.run_attr_path(count)?,
+
+                OpCode::OpAttrsUpdate => {
+                    let rhs = self.pop().as_attrs()?;
+                    let lhs = self.pop().as_attrs()?;
+
+                    self.push(Value::Attrs(Rc::new(lhs.update(&rhs))))
+                }
+
                 OpCode::OpList(count) => self.run_list(count)?,
                 OpCode::OpInterpolate(count) => self.run_interpolate(count)?,
             }