diff options
| author | Drahflow <drahflow@gmx.de> | 2013-07-21 19:40:00 +0200 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2013-07-21 19:40:00 +0200 |
| commit | 4a46857667d2ddfd43cf9b6218ff3399ceb500c9 (patch) | |
| tree | d60c112b54d862a2434a5603e0107e91d39e748c | |
| parent | edfa24b11358ff615901929f57d3d3161f7e049b (diff) | |
define function to return current scope
| -rw-r--r-- | compiler/elymasGlobal.ey | 13 |
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 [ |
