feat(tvix/eval): set up deferred upvalues at runtime
This will leave a sentinel value in the upvalue slot in which the actual value is to be captured after resolution once a scope is fully set up. Change-Id: I12b37b0dc8d32603b03e675c3bd039468e70b354 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6336 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
parent
6c1948a71a
commit
1bfe32f412
2 changed files with 7 additions and 3 deletions
|
|
@ -426,8 +426,8 @@ impl VM {
|
|||
closure.push_upvalue(value);
|
||||
}
|
||||
|
||||
OpCode::DataDeferredLocal(_idx) => {
|
||||
todo!("deferred local initialisation")
|
||||
OpCode::DataDeferredLocal(idx) => {
|
||||
closure.push_upvalue(Value::DeferredUpvalue(idx));
|
||||
}
|
||||
|
||||
_ => panic!("compiler error: missing closure operand"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue