From 27fecee1bca2ef92a46912b5787d62d86ce02c45 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 5 Jan 2023 13:20:45 +0300 Subject: fix(tvix/eval): don't increase `with_stack_size` in scope inherits There was probably a misunderstanding somewhere about the with_stack_size being related to how far away it is from the with, but it is about whether there is a with at all. This broke a warning (`UselessInherit`), and may actually have let to more inefficient codegen in some cases. Change-Id: I08338ea59ae39dad01ca8a4e09d934a936cdea2f Reviewed-on: https://cl.tvl.fyi/c/depot/+/7762 Reviewed-by: flokli Tested-by: BuildkiteCI --- tvix/eval/src/compiler/scope.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tvix') diff --git a/tvix/eval/src/compiler/scope.rs b/tvix/eval/src/compiler/scope.rs index 1a89ad6a0649..ef4b4d51e118 100644 --- a/tvix/eval/src/compiler/scope.rs +++ b/tvix/eval/src/compiler/scope.rs @@ -210,7 +210,7 @@ impl Scope { Self { poisoned_tokens: self.poisoned_tokens.clone(), scope_depth: self.scope_depth + 1, - with_stack_size: self.with_stack_size + 1, + with_stack_size: self.with_stack_size, ..Default::default() } } -- cgit 1.4.1