about summary refs log tree commit diff
path: root/tvix/eval/src/compiler/attrs.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-09-13T13·04+0300
committertazjin <tazjin@tvl.su>2022-09-13T14·41+0000
commitc28ecbee970c0a16b7f93241a5a2ef2df49406c6 (patch)
tree8abad92f1a9be60e69cbdcdaed00efc9b64bee2b /tvix/eval/src/compiler/attrs.rs
parent268605140eae3cbfae5ddd18bd83b877e5da5748 (diff)
refactor(tvix/eval): encapsulate scope_depth in compiler::scope r/4840
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
Diffstat (limited to 'tvix/eval/src/compiler/attrs.rs')
-rw-r--r--tvix/eval/src/compiler/attrs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/eval/src/compiler/attrs.rs b/tvix/eval/src/compiler/attrs.rs
index 91039d6dbfbe..649cdf37f00a 100644
--- a/tvix/eval/src/compiler/attrs.rs
+++ b/tvix/eval/src/compiler/attrs.rs
@@ -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),