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),
|
OpThunkSuspended(ConstantIdx),
|
||||||
OpForce,
|
OpForce,
|
||||||
|
|
||||||
/// Finalise initialisation of the upvalues of the value in the
|
/// Finalise initialisation of the upvalues of the value in the given stack
|
||||||
/// given stack index after the scope is fully bound.
|
/// index (which must be a Value::Thunk) after the scope is fully bound.
|
||||||
OpFinalise(StackIdx),
|
OpFinalise(StackIdx),
|
||||||
|
|
||||||
// [`OpClosure`], [`OpThunkSuspended`], and [`OpThunkClosure`] have a
|
// [`OpClosure`], [`OpThunkSuspended`], and [`OpThunkClosure`] have a
|
||||||
|
@ -171,8 +171,14 @@ pub enum OpCode {
|
||||||
// instruction pointer.
|
// instruction pointer.
|
||||||
//
|
//
|
||||||
// It is illegal for a `Data*` opcode to appear anywhere else.
|
// It is illegal for a `Data*` opcode to appear anywhere else.
|
||||||
|
/// Populate a static upvalue by copying from the stack immediately.
|
||||||
DataLocalIdx(StackIdx),
|
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),
|
DataDeferredLocal(StackIdx),
|
||||||
|
/// Populate a static upvalue by copying it from the upvalues of an
|
||||||
|
/// enclosing scope.
|
||||||
DataUpvalueIdx(UpvalueIdx),
|
DataUpvalueIdx(UpvalueIdx),
|
||||||
|
/// Populate dynamic upvalues by saving a copy of the with-stack.
|
||||||
DataCaptureWith,
|
DataCaptureWith,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue