docs(tvix/eval): add comments for Opcode::DataXXX opcodes
Signed-off-by: Adam Joseph <adam@westernsemico.com> Change-Id: I8c72405880a9342eb502d92c1e0087f5bb17e03c Reviewed-on: https://cl.tvl.fyi/c/depot/+/7087 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
a79c233ae6
commit
8ffcf8d7ce
1 changed files with 8 additions and 2 deletions
|
@ -156,8 +156,8 @@ pub enum OpCode {
|
|||
OpThunkSuspended(ConstantIdx),
|
||||
OpForce,
|
||||
|
||||
/// Finalise initialisation of the upvalues of the value in the
|
||||
/// given stack index after the scope is fully bound.
|
||||
/// Finalise initialisation of the upvalues of the value in the given stack
|
||||
/// index (which must be a Value::Thunk) after the scope is fully bound.
|
||||
OpFinalise(StackIdx),
|
||||
|
||||
// [`OpClosure`], [`OpThunkSuspended`], and [`OpThunkClosure`] have a
|
||||
|
@ -171,8 +171,14 @@ pub enum OpCode {
|
|||
// instruction pointer.
|
||||
//
|
||||
// It is illegal for a `Data*` opcode to appear anywhere else.
|
||||
/// Populate a static upvalue by copying from the stack immediately.
|
||||
DataLocalIdx(StackIdx),
|
||||
/// Populate a static upvalue of a thunk by copying it the stack, but do
|
||||
/// when the thunk is finalised (by OpFinalise) rather than immediately.
|
||||
DataDeferredLocal(StackIdx),
|
||||
/// Populate a static upvalue by copying it from the upvalues of an
|
||||
/// enclosing scope.
|
||||
DataUpvalueIdx(UpvalueIdx),
|
||||
/// Populate dynamic upvalues by saving a copy of the with-stack.
|
||||
DataCaptureWith,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue