refactor(tvix/eval): cut down one iteration over locals array
Caught by sterni in cl/6339 Change-Id: I2f2cd746114f14854cf599a7223a42a3e8ebe4fc Reviewed-on: https://cl.tvl.fyi/c/depot/+/6469 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
parent
f68c76d07d
commit
33059de431
1 changed files with 2 additions and 1 deletions
|
@ -807,8 +807,9 @@ impl Compiler<'_, '_> {
|
|||
}
|
||||
|
||||
// Second pass to place the values in the correct stack slots.
|
||||
let indices: Vec<LocalIdx> = entries.iter().map(|(idx, _)| *idx).collect();
|
||||
let mut indices: Vec<LocalIdx> = vec![];
|
||||
for (idx, value) in entries.into_iter() {
|
||||
indices.push(idx);
|
||||
self.compile(idx, value);
|
||||
|
||||
// Any code after this point will observe the value in the
|
||||
|
|
Loading…
Reference in a new issue