about summary refs log tree commit diff stats
path: root/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-06-03 00:27:01 -0700
committerKartik Agaram <vc@akkartik.com>2020-06-03 00:27:01 -0700
commit69a29fc62cc0a889f4299bd66ff1bdcdc5ce2c26 (patch)
treefb02a5cc44f955a408dedd7807909353a7559755 /apps
parente38a95ecd9686b735936eef196a92792e727d0c6 (diff)
downloadmu-69a29fc62cc0a889f4299bd66ff1bdcdc5ce2c26.tar.gz
6459
Diffstat (limited to 'apps')
-rwxr-xr-xapps/mubin256210 -> 256210 bytes
-rw-r--r--apps/mu.subx12
2 files changed, 7 insertions, 5 deletions
diff --git a/apps/mu b/apps/mu
index 030b05c6..ecf43bce 100755
--- a/apps/mu
+++ b/apps/mu
Binary files differdiff --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