diff options
| author | Drahflow <drahflow@gmx.de> | 2014-03-30 23:05:04 +0200 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2014-03-30 23:05:04 +0200 |
| commit | 591d7823834d32ee6df32e87a7c9165c58b06d20 (patch) | |
| tree | da0a880a22cfcf3bbf03a215d1bcff039a3fa76a | |
| parent | 6e0a1fff8e697be2b35cc0c92c9c07c3a9acb685 (diff) | |
dom now working on strings
| -rw-r--r-- | compiler/elymasGlobal.ey | 8 | ||||
| -rw-r--r-- | examples/working-compiler/dom2.test | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/compiler/elymasGlobal.ey b/compiler/elymasGlobal.ey index 6f16eb2..1343f73 100644 --- a/compiler/elymasGlobal.ey +++ b/compiler/elymasGlobal.ey @@ -2457,6 +2457,8 @@ 7 /rax /cl :movbMemDisp8Reg %F0 /cl :andbImmReg + %10 /cl :cmpbImmReg + /stringDom :jeLbl8 %70 /cl :cmpbImmReg /arrayDom :jeLbl8 %90 /cl :cmpbImmReg @@ -2466,10 +2468,16 @@ "non-array passed to dom" ::outputError :ud2 + @stringDom + 16 /rax /rdi :movqMemDisp8Reg # load length + 3 /rdi :shlqImm8Reg # multiply to array cell size + /populateDom :jmpLbl8 + @arrayDom /rax /edi :movlMemReg 8 /rdi :subqImm8Reg # substract header length + @populateDom ::internalAllocateArray /rax :movqImmReg /rax :callqReg /rax :pushqReg # result on stack diff --git a/examples/working-compiler/dom2.test b/examples/working-compiler/dom2.test new file mode 100644 index 0000000..17473a6 --- /dev/null +++ b/examples/working-compiler/dom2.test @@ -0,0 +1,2 @@ +[ 7 7 7 7 7 ] dom dump +"foo" dom dump |
