diff options
| author | Drahflow <drahflow@gmx.de> | 2017-08-20 21:48:17 +0200 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2017-08-20 21:48:17 +0200 |
| commit | 139931a432f304ef06cd381d0f408490b96d7013 (patch) | |
| tree | 8426560673d322ba6eb769f04d96e3cd66d4e318 | |
| parent | 061dd644cbd2fdddbb2e52dbe63683fa7a04b769 (diff) | |
Report "type" of special stack entries
| -rw-r--r-- | compiler/elymasGlobalSysTyped.ey | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/compiler/elymasGlobalSysTyped.ey b/compiler/elymasGlobalSysTyped.ey index c604532..e473d8b 100644 --- a/compiler/elymasGlobalSysTyped.ey +++ b/compiler/elymasGlobalSysTyped.ey @@ -82,7 +82,13 @@ # return the type of an object # 0 -> the object to analyze - # 0 <- an integer from 0 - 15 + # 0 <- an integer from + # 0 - 15 for normal heap objects (as per doc/notes object header) + # 16 for array begin marker + # 17 for quote begin marker + # 18 for bottom of stack marker + # 19 for error data marker + # -1 for unknown object [[ /rbx :popqReg @@ -90,10 +96,43 @@ 63 /rdx :btrqImm8Reg /integerType :jcLbl8 + /rdx /rax :movqRegReg + 44 /rax :shrqImm8Reg + 6 /rax :cmpqImm8Reg + /markers :jnzLbl8 + 7 /rdx /rdx :movzxMem8Disp8Reg64 4 /rdx :shrqImm8Reg /done :jmpLbl8 + @markers + 1 /rdx :cmpqImm8Reg + /arrayMarker :jzLbl8 + 2 /rdx :cmpqImm8Reg + /quoteMarker :jzLbl8 + %5555555555555555 /rax :movqImmReg + /rax /rdx :cmpqRegReg + /bottomMarker :jzLbl8 + 4 /rdx :cmpqImm8Reg + /errorMarker :jzLbl8 + /unknown :jmpLbl8 + + @errorMarker + 19 /rdx :movqImmReg + /done :jmpLbl8 + + @bottomMarker + 18 /rdx :movqImmReg + /done :jmpLbl8 + + @quoteMarker + 17 /rdx :movqImmReg + /done :jmpLbl8 + + @arrayMarker + 16 /rdx :movqImmReg + /done :jmpLbl8 + @integerType /rdx /rdx :xorqRegReg @@ -103,6 +142,17 @@ /rbx :pushqReg :retn + + @unknown + ::internalAllocateInteger /rax :movqImmReg + /rax :callqReg + /rdx /rdx :xorqRegReg + 1 /rdx :subqImm8Reg + /rdx 8 /rax :movqRegMemDisp8 + /rax :pushqReg + + /rbx :pushqReg + :retn ]] /eytype defv > _ ==globalFunctions { defv }' ::allocateOffsetStruct |
