refactor(tvix/eval): encapsulate scope_depth in compiler::scope

This field no longer needs to be directly accessible by the compiler.

Addresses a sterni lint from cl/6466

Change-Id: I5e6791943d7f0ab3d9b7a30bb1654c4a6a435b1f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6564
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2022-09-13 16:04:52 +03:00 committed by tazjin
parent 268605140e
commit c28ecbee97
3 changed files with 20 additions and 15 deletions

View file

@ -39,7 +39,7 @@ impl Compiler<'_, '_> {
// Open a scope to track the positions of the temporaries used
// by the `OpAttrs` instruction.
self.begin_scope();
self.scope_mut().begin_scope();
let mut count = self.compile_inherit_attrs(slot, node.inherits());
@ -69,7 +69,7 @@ impl Compiler<'_, '_> {
let fragment_slot = match key_count {
0 => key_idx,
1 => {
self.begin_scope();
self.scope_mut().begin_scope();
self.scope_mut().declare_phantom(key_span, false)
}
_ => self.scope_mut().declare_phantom(key_span, false),