about summary refs log tree commit diff stats
path: root/apps/factorial.mu
diff options
context:
space:
mode:
Diffstat (limited to 'apps/factorial.mu')
-rw-r--r--apps/factorial.mu7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/factorial.mu b/apps/factorial.mu
index fe435a53..128ac9ad 100644
--- a/apps/factorial.mu
+++ b/apps/factorial.mu
@@ -36,10 +36,9 @@ fn main args: (addr array kernel-string) -> exit-status/ebx: int {
       break $main-body
     }
     # if (args[1] == "test") run-tests()
-    var tmp2/ecx: int <- copy 1  # we need this just because we don't yet support `index` on literals; requires some translation-time computation
-    var tmp3/ecx: (addr kernel-string) <- index a, tmp2
-    var tmp4/eax: boolean <- kernel-string-equal? *tmp3, "test"
-    compare tmp4, 0
+    var tmp2/ecx: (addr kernel-string) <- index a, 1
+    var tmp3/eax: boolean <- kernel-string-equal? *tmp2, "test"
+    compare tmp3, 0
     {
       break-if-=
       run-tests