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 <flokli@flokli.de>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2023-01-05 13:20:45 +03:00 committed by tazjin
parent 88432235ae
commit 27fecee1bc

View file

@ -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()
}
}