feat(tazjin/rlox): Implement global variable access
This also includes a fix for an issue where the identifiers of variables were pushed onto the stack, which is incorrect. Change-Id: Id89b388268efad295f29978d767aa4b33c4ded14 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2594 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
This commit is contained in:
parent
29b2a54705
commit
4162186a19
4 changed files with 48 additions and 6 deletions
|
|
@ -30,6 +30,7 @@ pub enum OpCode {
|
|||
OpPrint,
|
||||
OpPop,
|
||||
|
||||
// Variable definitions
|
||||
// Variable management
|
||||
OpDefineGlobal(usize),
|
||||
OpGetGlobal(usize),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue