diff options
author | Vincent Ambo <mail@tazj.in> | 2022-08-28T14·50+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-09-06T14·58+0000 |
commit | 5c4e102ac8551f6aaa58d54778a2442dc470b0e5 (patch) | |
tree | badcefd13ffccf7e4c3d4382174eaaeb7cb0b39b /tvix/eval/src/compiler/scope.rs | |
parent | 025a9a4a0a66c8593cd6b7e4b0f0fa7aea84c353 (diff) |
feat(tvix/eval): track whether locals needs to be finalised r/4668
When encountering a deferred local upvalue, the compiler will now mark the corresponding local as needing a finaliser which makes it possible to emit the OpFinalise instruction for this stack slot a little bit down the line. Change-Id: I3962066f10fc6c6e1472722b8bdb415a811e0740 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6338 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/eval/src/compiler/scope.rs')
-rw-r--r-- | tvix/eval/src/compiler/scope.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tvix/eval/src/compiler/scope.rs b/tvix/eval/src/compiler/scope.rs index a76a411b461b..310f33d608cd 100644 --- a/tvix/eval/src/compiler/scope.rs +++ b/tvix/eval/src/compiler/scope.rs @@ -38,6 +38,10 @@ pub struct Local { // Is this local known to have been used at all? pub used: bool, + + // Does this local need to be finalised after the enclosing scope + // is completely constructed? + pub needs_finaliser: bool, } impl Local { |