fix(tvix/eval): ensure that root stack slot actually exists
Instead of using a sentinel LocalIdx which potentially points to a value in the locals stack that does not actually exist, set up an initial uninitialised phantom value representing the result of the root expression. Change-Id: I82ea774daab83168020a3850bed57d35ab25c7df Reviewed-on: https://cl.tvl.fyi/c/depot/+/6424 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
This commit is contained in:
parent
f8575fcd74
commit
ecbd7c6ca1
2 changed files with 3 additions and 5 deletions
|
|
@ -128,10 +128,6 @@ pub struct Upvalue {
|
|||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd)]
|
||||
pub struct LocalIdx(usize);
|
||||
|
||||
impl LocalIdx {
|
||||
pub const ZERO: LocalIdx = LocalIdx(0);
|
||||
}
|
||||
|
||||
/// Represents a scope known during compilation, which can be resolved
|
||||
/// directly to stack indices.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue