diff options
| -rw-r--r-- | compiler/elymasGlobal.ey | 24 | ||||
| -rw-r--r-- | compiler/standardClient.ey | 7 |
2 files changed, 27 insertions, 4 deletions
diff --git a/compiler/elymasGlobal.ey b/compiler/elymasGlobal.ey index 2363c6b..805a3db 100644 --- a/compiler/elymasGlobal.ey +++ b/compiler/elymasGlobal.ey @@ -442,8 +442,28 @@ %00 /cl :cmpbImmReg /arrayIntArgumentBoxed :jeLbl8 - "FIXME: typed array application" ::outputError - :ud2 + # escape this to compiled high-level code + /rbx :pushqReg + /rdx :pushqReg + + /rax :movqImmOOBReg "sys" ::string + /rax :pushqReg + /rax :movqImmOOBReg "ey*" "ey|" ::linkAbs64 + /rax :callqReg + + /rax :movqImmOOBReg "typed" ::string + /rax :pushqReg + /rax :movqImmOOBReg "ey*" "ey." ::linkAbs64 + /rax :callqReg + + /rax :movqImmOOBReg "execute" ::string + /rax :pushqReg + /rax :movqImmOOBReg "ey*" "ey." ::linkAbs64 + /rax :callqReg + + /r15 :pushqMem + 8 /r15 :addqImm8Reg + :retn @arrayIntArgumentBoxed 8 /rbx /rax :movqMemDisp8Reg # rax == requested index diff --git a/compiler/standardClient.ey b/compiler/standardClient.ey index e26dd14..27d6455 100644 --- a/compiler/standardClient.ey +++ b/compiler/standardClient.ey @@ -651,8 +651,11 @@ # Run from right (stacktop) argument to left (stacklow) argument: # Take topmost type, check whether it can be found in other stacks (from top) # Eliminate all matching types via function or loop creation - { _ ==f _ sys .typed .inputs ==inputs - sys .typed .outputs ==outputs + { ==f + f sys .typed .type 7 eq { f { * }_ [ 0 ] [ 0 ] '' =f } rep + + f sys .typed .inputs ==inputs + f sys .typed .outputs ==outputs outputs len 1 gt { "multi-output function in auto-loop" die } rep |
