From 6bf9bb21e14d049220d534b33be0740bb9bd9a2b Mon Sep 17 00:00:00 2001 From: Drahflow Date: Wed, 20 Aug 2014 02:14:55 +0200 Subject: There is now a single empty array only --- compiler/elymasGlobal.ey | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'compiler') diff --git a/compiler/elymasGlobal.ey b/compiler/elymasGlobal.ey index 83d4d63..bf34103 100644 --- a/compiler/elymasGlobal.ey +++ b/compiler/elymasGlobal.ey @@ -18,6 +18,12 @@ 1 ==ARRAYMARKER 2 ==QUOTEMARKER + < + [ + %08 %00 %00 %00 %00 %00 %00 %70 + ] /emptyArray defv + > { defv }' ::allocateOffsetStruct + < # do nothing [ @@ -671,6 +677,7 @@ /rdi /rcx :movqRegReg /rsp /rdi :subqRegReg + /empty :jzLbl8 /rcx :pushqReg # rdi == size of array @@ -683,16 +690,20 @@ /rax /ecx :movlMemReg 3 /rcx :shrqImm8Reg /rcx :decqReg # rcx == number of array elements - /rcx /rcx :testqRegReg - /empty :jzLbl8 8 /rcx /rax /rax :leaqMemIndexScaleReg # rax == address of last cell @copy /rax :popqMem 8 /rax :subqImm8Reg /copy :loopLbl8 + /r15 :pushqMem + 8 /r15 :addqImm8Reg + :retn @empty + emptyArray /rax :movqImmReg + /rax /rcx :movqRegMem # store array pointer instead of begin marker + /r15 :pushqMem 8 /r15 :addqImm8Reg :retn -- cgit v1.2.3