diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-10-26 22:35:20 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-10-26 23:45:40 -0700 |
commit | 0f9a65dc0d10d93319eacf8ccff75a068e5f97a8 (patch) | |
tree | a34427229e12d9cbea59d71d4a94825ee24f4c85 /apps/mu.subx | |
parent | f3d1929033856ac12db84435c317c5a288f898b3 (diff) | |
download | mu-0f9a65dc0d10d93319eacf8ccff75a068e5f97a8.tar.gz |
7120 - tile: array of lines from file
Requires a quick hacky change to Mu compiler.
Diffstat (limited to 'apps/mu.subx')
-rw-r--r-- | apps/mu.subx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/mu.subx b/apps/mu.subx index db5c8b69..60167e38 100644 --- a/apps/mu.subx +++ b/apps/mu.subx @@ -17120,8 +17120,16 @@ $array-element-type-id:skip-array: # if t->is-atom? abort 81 7/subop/compare *eax 0/imm32/false # Type-tree-is-atom 0f 85/jump-if-!= $array-element-type-id:error2/disp32 - # return t->left->value + # t = t->left (lookup *(eax+4) *(eax+8)) # Type-tree-left Type-tree-left => eax + # if (!t->is-atom?) t = t->left # TODO: assumes array element size can be determined from just first word of array element type + # if (t->is-atom == false) t = lookup(t->left) + { + 81 7/subop/compare *eax 0/imm32/false # Type-tree-is-atom + 75/jump-if-!= break/disp8 + (lookup *(eax+4) *(eax+8)) # Type-tree-left Type-tree-left => eax + } + # return t->value 8b/-> *(eax+4) 0/r32/eax # Type-tree-value $array-element-type-id:end: # . epilogue |