From ce94374bd13afbb3112f51b13b6c5245d402e1fb Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 20 Oct 2020 09:39:12 -0700 Subject: 7082 --- apps/tile/environment.mu | 17 +++++++++-------- 1 file 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 -- cgit 1.4.1-2-gfad0