aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/elymasGlobalSys.ey15
-rw-r--r--compiler/standardClient.ey2
-rw-r--r--elymas/lib/sys/opt.ey12
3 files changed, 22 insertions, 7 deletions
diff --git a/compiler/elymasGlobalSys.ey b/compiler/elymasGlobalSys.ey
index 68a30c9..b44de09 100644
--- a/compiler/elymasGlobalSys.ey
+++ b/compiler/elymasGlobalSys.ey
@@ -24,6 +24,21 @@
/r15 :pushqMem
8 /r15 :addqImm8Reg
:retn
+ ]] /eyexecuteIdentifierScoped defv
+
+ # handle an identifier according to current quote level
+ # 0 -> identifier to handle
+ # 0 <- scope after execution
+ [[
+ 8 /r15 :subqImm8Reg
+ /r15 :popqMem
+
+ internalExecuteIdentifier /rax :movqImmReg
+ /rax :callqReg
+
+ /r15 :pushqMem
+ 8 /r15 :addqImm8Reg
+ :retn
]] /eyexecuteIdentifier defv
# resolve an identifier in a given scope and return full resolve information
diff --git a/compiler/standardClient.ey b/compiler/standardClient.ey
index c8f2823..1a2b091 100644
--- a/compiler/standardClient.ey
+++ b/compiler/standardClient.ey
@@ -1198,7 +1198,7 @@
} each ] =*:FLOAT
{ ==currentScope ==input
- { .value currentScope sys .executeIdentifier =currentScope } /TOKID defvd
+ { .value currentScope sys .executeIdentifierScoped =currentScope } /TOKID defvd
{ .value base10decode } /TOKINT defvd
{ .value "^(\\d+)(\\.(\\d*))?([eE](-)?(\\d+))?$" regex
not { "Not in fact a float" die } rep
diff --git a/elymas/lib/sys/opt.ey b/elymas/lib/sys/opt.ey
index c51f145..6a8f0c1 100644
--- a/elymas/lib/sys/opt.ey
+++ b/elymas/lib/sys/opt.ey
@@ -2290,15 +2290,15 @@
# ensure that the optimizer is run often enough to finish optimize itself
[ /eq /neq /le /lt /ge /gt /and /or /add ] { ==function
- 10 { scope ==s
+ 10 {
1
- "{" s sys .executeIdentifier =s
+ "{" sys .executeIdentifier
"i"
- "==" s sys .executeIdentifier =s
- "i" s sys .executeIdentifier =s
+ "==" sys .executeIdentifier
+ "i" sys .executeIdentifier
1
- function s sys .executeIdentifier =s
- "}" s sys .executeIdentifier =s
+ function sys .executeIdentifier
+ "}" sys .executeIdentifier
*
--
} rep