From 35e8dc97cfe086b611a7c82a891117f228cb215c Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 1 Feb 2023 00:24:34 +0300 Subject: docs(tvix/eval): document attribute set related opcodes Change-Id: Ib98a9fe8c9aa3f0e61c27d10285c0926cda7a969 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7979 Tested-by: BuildkiteCI Reviewed-by: flokli --- tvix/eval/src/opcode.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tvix/eval') diff --git a/tvix/eval/src/opcode.rs b/tvix/eval/src/opcode.rs index a6c59278d286..9eb8418d89b1 100644 --- a/tvix/eval/src/opcode.rs +++ b/tvix/eval/src/opcode.rs @@ -128,9 +128,20 @@ pub enum OpCode { /// Note that this takes the count of *pairs*, not the number of *stack values* - the actual /// number of values popped off the stack will be twice the argument to this op OpAttrs(Count), + /// Merge the attribute set at {2} into the attribute set at {1}, + /// and leave the new set at the top of the stack. OpAttrsUpdate, + + /// Select the attribute with the name at {1} from the set at {2}. OpAttrsSelect, + + /// Select the attribute with the name at {1} from the set at {2}, but leave + /// a `Value::AttrNotFound` in the stack instead of failing if it is + /// missing. OpAttrsTrySelect, + + /// Check for the presence of the attribute with the name at {1} in the set + /// at {2}. OpHasAttr, /// Throw an error if the attribute set at the top of the stack has any attributes -- cgit 1.4.1