about summary refs log tree commit diff stats
path: root/apps/tile/environment.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-10-20 09:39:12 -0700
committerKartik Agaram <vc@akkartik.com>2020-10-20 09:39:12 -0700
commitce94374bd13afbb3112f51b13b6c5245d402e1fb (patch)
tree992d7a511b34f84e6925d264f01f1d04b25c0c27 /apps/tile/environment.mu
parent5bdcb85f67c295c6967d8e1931d1cef95b29fab9 (diff)
downloadmu-ce94374bd13afbb3112f51b13b6c5245d402e1fb.tar.gz
7082
Diffstat (limited to 'apps/tile/environment.mu')
-rw-r--r--apps/tile/environment.mu17
1 files changed, 9 insertions, 8 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu
index b5cacb86..0fdb5e75 100644
--- a/apps/tile/environment.mu
+++ b/apps/tile/environment.mu
@@ -654,8 +654,13 @@ fn copy-unbound-words-to-args _functions: (addr handle function) {
   {
     compare curr, 0
     break-if-=
-    {
-      var bound?/ebx: boolean <- bound? curr, functions-ah
+    $copy-unbound-words-to-args:unbound: {
+      {
+        var is-int?/eax: boolean <- word-is-decimal-integer? curr
+        compare is-int?, 0  # false
+        break-if-!= $copy-unbound-words-to-args:unbound
+      }
+      var bound?/ebx: boolean <- bound-function? curr, functions-ah
       compare bound?, 0  # false
       break-if-!=
       # push copy of curr before dest-ah
@@ -673,14 +678,10 @@ fn copy-unbound-words-to-args _functions: (addr handle function) {
   }
 }
 
-fn bound? w: (addr word), functions-ah: (addr handle function) -> result/ebx: boolean {
+fn bound-function? w: (addr word), functions-ah: (addr handle function) -> result/ebx: boolean {
   result <- copy 1  # true
-  # if is-decimal-number(w) return true
-  var subresult/eax: boolean <- word-is-decimal-integer? w
-  compare subresult, 0  # false
-  break-if-!=
   # if w == "+" return true
-  subresult <- word-equal? w, "+"
+  var subresult/eax: boolean <- word-equal? w, "+"
   compare subresult, 0  # false
   break-if-!=
   # if w == "-" return true