diff options
author | Vincent Ambo <mail@tazj.in> | 2023-01-31T21·24+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2023-09-08T21·38+0000 |
commit | 35e8dc97cfe086b611a7c82a891117f228cb215c (patch) | |
tree | 72b4b8534d3e5c68cc5c37bf0a20994d175ec0bc /tvix/eval/src/opcode.rs | |
parent | 3cf37c7cb684e450f59d5ea643c5ac05b3647c36 (diff) |
docs(tvix/eval): document attribute set related opcodes r/6570
Change-Id: Ib98a9fe8c9aa3f0e61c27d10285c0926cda7a969 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7979 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/eval/src/opcode.rs')
-rw-r--r-- | tvix/eval/src/opcode.rs | 11 |
1 files changed, 11 insertions, 0 deletions
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 |