about summary refs log tree commit diff stats
path: root/apps/mu.subx
diff options
context:
space:
mode:
Diffstat (limited to 'apps/mu.subx')
-rw-r--r--apps/mu.subx9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/mu.subx b/apps/mu.subx
index 7fa1042f..d66fd0d8 100644
--- a/apps/mu.subx
+++ b/apps/mu.subx
@@ -5951,19 +5951,22 @@ $append-stmt-var:end:
     5d/pop-to-ebp
     c3/return
 
-append-to-block:  # ad: (addr allocation-descriptor), block: (handle block), x: (handle stmt)
+append-to-block:  # ad: (addr allocation-descriptor), block: (addr block), x: (handle stmt)
     # . prologue
     55/push-ebp
     89/<- %ebp 4/r32/esp
     # . save registers
+    50/push-eax
     56/push-esi
     # esi = block
     8b/-> *(ebp+0xc) 6/r32/esi
-    (append-list *(ebp+8) *(ebp+0x10) *(esi+4))  # ad, x, Block-stmts
-    89/<- *(esi+4) 0/r32/eax  # Block-stmts
+    # block->stmts = append(x, block->stmts)
+    8d/copy-address *(esi+4) 0/r32/eax
+    (append-list *(ebp+8)  *(ebp+0x10) *(ebp+0x14)  *(esi+4) *(esi+8)  %eax)  # ad, x, x, Block-stmts, Block-stmts
 $append-to-block:end:
     # . restore registers
     5e/pop-to-esi
+    58/pop-to-eax
     # . epilogue
     89/<- %esp 5/r32/ebp
     5d/pop-to-ebp
2' href='#n142'>142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174