aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/elymasGlobal.ey13
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/elymasGlobal.ey b/compiler/elymasGlobal.ey
index ec6b0ba..8a6249a 100644
--- a/compiler/elymasGlobal.ey
+++ b/compiler/elymasGlobal.ey
@@ -915,6 +915,7 @@
# push current scope onto stack
# switch current scope to its parent
+ # 0 <- scope just exited
[
/rbx :popqReg
::currentScope /rax :movqImmReg
@@ -927,6 +928,18 @@
:retn
] /ey> defv
+ # push current scope onto stack
+ # 0 <- current scope
+ [
+ /rbx :popqReg
+
+ ::currentScope /rax :movqImmReg
+ /rax :pushqMem
+
+ /rbx :pushqReg
+ :retn
+ ] /eyscope defv
+
# die
# 0 -> object explaining what went wrong
[