about summary refs log tree commit diff stats
path: root/apps/mu.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-12-27 23:59:07 -0800
committerKartik Agaram <vc@akkartik.com>2019-12-27 23:59:07 -0800
commit2b665cc552a4d98337bfdf87c17390b9dcb9ba9e (patch)
treefe6f5b1e48741e44049e1b2f93a9ba56114272b4 /apps/mu.subx
parent1d70540ab3cf744c107f5a93231a762ae94d4c17 (diff)
downloadmu-2b665cc552a4d98337bfdf87c17390b9dcb9ba9e.tar.gz
5834
Bugfix.
Diffstat (limited to 'apps/mu.subx')
-rw-r--r--apps/mu.subx7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/mu.subx b/apps/mu.subx
index e08d609b..79642e08 100644
--- a/apps/mu.subx
+++ b/apps/mu.subx
@@ -685,7 +685,7 @@ test-convert-function-distinguishes-args:
 
 test-convert-function-returns-result:
     # function writes to output
-    #   fn foo a: int -> result/eax: int {
+    #   fn foo a: int, b: int -> result/eax: int {
     #     result <- copy a
     #     result <- increment
     #   }
@@ -711,7 +711,7 @@ test-convert-function-returns-result:
     (clear-stream _test-output-stream)
     (clear-stream $_test-output-buffered-file->buffer)
     #
-    (write _test-input-stream "fn foo a: int -> result/eax: int {\n")
+    (write _test-input-stream "fn foo a: int, b: int -> result/eax: int {\n")
     (write _test-input-stream "  result <- copy a\n")
     (write _test-input-stream "  result <- increment\n")
     (write _test-input-stream "}\n")
@@ -2395,7 +2395,8 @@ lookup-var-helper:  # name: (address array byte), vars : (address stack (handle
       3d/compare-eax-and 0/imm32
       8b/-> *ebx 0/r32/eax
       75/jump-if-not-equal break/disp8
-      8b/-> *(ebx+4) 3/r32/ebx  # List-next
+      # curr -= 4
+      81 5/subop/subtract %ebx 4/imm32
       e9/jump loop/disp32
     }
 $lookup-var-helper:end: