From f3d054032d8c67901c43b94d3ff42eb623561bda Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 7 Feb 2020 00:01:59 -0800 Subject: 5991 --- apps/mu | Bin 116155 -> 116171 bytes apps/mu.subx | 5 ++++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/mu b/apps/mu index 664f4fd8..47a7754d 100755 Binary files a/apps/mu and b/apps/mu differ diff --git a/apps/mu.subx b/apps/mu.subx index 81c47ece..e0dd1908 100644 --- a/apps/mu.subx +++ b/apps/mu.subx @@ -1485,6 +1485,7 @@ populate-mu-function-header: # first-line: (addr stream byte), out: (handle fun # read function name (next-word *(ebp+8) %ecx) # error checking + # TODO: error if name starts with 'break' or 'loop' # if (word-slice == '{') abort (slice-equal? %ecx "{") # => eax 3d/compare-eax-and 0/imm32 @@ -4315,7 +4316,9 @@ $emit-subx-stmt-list:check-for-break: (string-starts-with? *(ecx+4) "break") # Stmt1-operation => eax 3d/compare-eax-and 0/imm32 0f 84/jump-if-= break/disp32 -$emit-subx-stmt-list:break: + 81 7/subop/compare *(ecx+8) 0/imm32 # Stmt1-inouts + 0f 85/jump-if-!= break/disp32 +$emit-subx-stmt-list:zero-arg-break: # create a new block for the remaining statements (emit-indent *(ebp+8) *Curr-block-depth) (write-buffered *(ebp+8) "{\n") -- cgit 1.4.1-2-gfad0