From 677d4e6881f4d97b4b491fc7277bd49efba4a693 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 11 Sep 2022 15:00:06 +0300 Subject: fix(tvix/eval): reduce scope depth in scope module Change-Id: If32f9e4c9212f20a39baa15d479ff1387c17570d Reviewed-on: https://cl.tvl.fyi/c/depot/+/6500 Tested-by: BuildkiteCI Reviewed-by: sterni --- tvix/eval/src/compiler/mod.rs | 2 -- tvix/eval/src/compiler/scope.rs | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tvix/eval/src') diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs index 7ee262cad008..3e8a6aefd792 100644 --- a/tvix/eval/src/compiler/mod.rs +++ b/tvix/eval/src/compiler/mod.rs @@ -1067,8 +1067,6 @@ impl Compiler<'_, '_> { if popcount > 0 { self.push_op(OpCode::OpCloseScope(Count(popcount)), node); } - - self.scope_mut().scope_depth -= 1; } /// Open a new lambda context within which to compile a function, diff --git a/tvix/eval/src/compiler/scope.rs b/tvix/eval/src/compiler/scope.rs index e69922a33013..1909a8dc8a76 100644 --- a/tvix/eval/src/compiler/scope.rs +++ b/tvix/eval/src/compiler/scope.rs @@ -310,6 +310,8 @@ impl Scope { } } + self.scope_depth -= 1; + (pops, unused_spans) } } -- cgit 1.4.1