feat(tvix/eval): add local identifier access
This makes basic `let ... in ...` statements work correctly. It does not yet account for the call frames pushed into the VM during function application. Change-Id: I67155171daf1a43011b96716dd9d1ab04b27db33 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6190 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
parent
2d401a32e5
commit
342b233a0a
4 changed files with 31 additions and 1 deletions
|
|
@ -254,6 +254,11 @@ impl VM {
|
|||
self.pop();
|
||||
}
|
||||
}
|
||||
|
||||
OpCode::OpGetLocal(local_idx) => {
|
||||
let value = self.stack[local_idx].clone();
|
||||
self.push(value)
|
||||
}
|
||||
}
|
||||
|
||||
if self.ip == self.chunk.code.len() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue