feat(tvix/eval): track whether locals needs to be finalised
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>
This commit is contained in:
parent
025a9a4a0a
commit
5c4e102ac8
2 changed files with 12 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue