diff options
Diffstat (limited to 'apps/mu.subx')
-rw-r--r-- | apps/mu.subx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/mu.subx b/apps/mu.subx index aeda4eb4..59243362 100644 --- a/apps/mu.subx +++ b/apps/mu.subx @@ -8063,6 +8063,9 @@ emit-subx-function: # out: (addr buffered-file), f: (addr function) 50/push-eax 51/push-ecx 52/push-edx + # initialize some global state + c7 0/subop/copy *Curr-block-depth 1/imm32 + c7 0/subop/copy *Curr-local-stack-offset 0/imm32 # ecx = f 8b/-> *(ebp+0xc) 1/r32/ecx # var vars/edx: (stack (addr var) 256) @@ -8070,16 +8073,15 @@ emit-subx-function: # out: (addr buffered-file), f: (addr function) 68/push 0x800/imm32/size 68/push 0/imm32/top 89/<- %edx 4/r32/esp - # + # var name/eax: (addr array byte) = lookup(f->name) (lookup *ecx *(ecx+4)) # Function-name Function-name => eax + # (write-buffered *(ebp+8) %eax) (write-buffered *(ebp+8) ":\n") - # initialize some global state - c7 0/subop/copy *Curr-block-depth 1/imm32 - c7 0/subop/copy *Curr-local-stack-offset 0/imm32 - # (emit-subx-prologue *(ebp+8)) + # var body/eax: (addr block) = lookup(f->body) (lookup *(ecx+0x18) *(ecx+0x1c)) # Function-body Function-body => eax + # (emit-subx-block *(ebp+8) %eax %edx) (emit-subx-epilogue *(ebp+8)) # TODO: validate that *Curr-block-depth and *Curr-local-stack-offset have |