diff options
| author | Drahflow <drahflow@gmx.de> | 2013-05-07 21:14:57 +0200 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2013-05-07 21:14:57 +0200 |
| commit | 4ba3f35c95673e618836f2ff0171e2acf3e6ffa9 (patch) | |
| tree | 4557fb3da8ac77e89790fc2758eccdf1c7093852 /compiler | |
| parent | 50a8cffc4af2301d89dcc5ccab05cece55ddbcd2 (diff) | |
=[] now working on strings
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/elymasGlobal.ey | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/compiler/elymasGlobal.ey b/compiler/elymasGlobal.ey index 2da482d..e6c25c6 100644 --- a/compiler/elymasGlobal.ey +++ b/compiler/elymasGlobal.ey @@ -598,8 +598,10 @@ %F0 /cl :andbImmReg %70 /cl :cmpbImmReg /arrayAssign :jeLbl8 + %10 /cl :cmpbImmReg + /stringAssign :jeLbl8 - "non-array passed to =[]" ::outputError + "non-array, non-string passed to =[]" ::outputError :ud2 @arrayAssign @@ -623,6 +625,26 @@ /r15 :pushqMem 8 /r15 :addqImm8Reg :retn + + @stringAssign + /rax :popqReg + 8 /rax /rax :movqMemDisp8Reg + + 16 /rbx /rcx :movqMemDisp8Reg # load string length + /rdx /rdx :xorqRegReg + /rcx :divqReg + + # rbx == string object on heap + # rdx == correct string offset + + /rax :popqReg + 8 /rax /rax :movqMemDisp8Reg # load int value + + /al 24 1 /rdx /rbx :movbRegMemIndexScaleDisp8 + + /r15 :pushqMem + 8 /r15 :addqImm8Reg + :retn ]] /ey=[] defv # length of array or string @@ -955,8 +977,10 @@ /inactive :jzLbl8 1 /rdx :cmpqImm8Reg /active :jzLbl8 + 2 /rdx :cmpqImm8Reg + /active :jzLbl8 - # TODO: "invalid activation mode" + "invalid activation mode in internalExecuteIdentifierUnquoted" ::outputError :ud2 @unresolved @@ -1000,13 +1024,16 @@ /unresolved :jzLbl8 0 /rdx :cmpqImm8Reg - /inactive :jzLbl8 + /inactiveJump :jzLbl8 1 /rdx :cmpqImm8Reg /active :jzLbl8 2 /rdx :cmpqImm8Reg /quoteActive :jzLbl8 - # TODO: "invalid activation mode" + @inactiveJump + /inactive :jmpLbl32 + + "invalid activation mode in internalExecuteIdentifier" ::outputError :ud2 @unresolved @@ -1377,7 +1404,7 @@ 1 /rdx :cmpqImm8Reg /active :jzLbl8 - # TODO: "invalid activation mode" + "invalid activation mode in ." ::outputError :ud2 @unresolved |
