From e836615a605f4c86b0d56b1a90779d8b7457bdba Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Fri, 6 Sep 2019 16:17:51 -0700 Subject: 5630 --- apps/calls.subx | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 57 insertions(+), 5 deletions(-) (limited to 'apps/calls.subx') diff --git a/apps/calls.subx b/apps/calls.subx index 6768fe7f..1c8fcdeb 100644 --- a/apps/calls.subx +++ b/apps/calls.subx @@ -389,9 +389,6 @@ $next-word-string-or-expression-without-metadata:check-for-end-of-call: # . if (eax == '/') goto error3 3d/compare-eax-and 0x2f/imm32/slash 0f 84/jump-if-equal $next-word-string-or-expression-without-metadata:error3/disp32 - # if (line->data[line->read] != ' ') goto error4 - 3d/compare-eax-and 0x20/imm32/space - 0f 85/jump-if-not-equal $next-word-string-or-expression-without-metadata:error4/disp32 # skip-chars-matching-whitespace(line) # . . push args 56/push-esi @@ -1120,7 +1117,7 @@ test-next-word-string-or-expression-without-metadata-handles-comment-after-trail 81 0/subop/add %esp 8/imm32 # check-ints-equal(slice->start, 0, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata-returns-eol-on-trailing-close-paren: start"/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-handles-comment-after-trailing-close-paren: start"/imm32 68/push 0/imm32 ff 6/subop/push *ecx # . . call @@ -1129,7 +1126,62 @@ test-next-word-string-or-expression-without-metadata-handles-comment-after-trail 81 0/subop/add %esp 0xc/imm32 # check-ints-equal(slice->end, 0, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata-returns-eol-on-trailing-close-paren: end"/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-handles-comment-after-trailing-close-paren: end"/imm32 + 68/push 0/imm32 + ff 6/subop/push *(ecx+4) + # . . call + e8/call check-ints-equal/disp32 + # . . discard args + 81 0/subop/add %esp 0xc/imm32 + # . epilog + 89/<- %esp 5/r32/ebp + 5d/pop-to-ebp + c3/return + +test-next-word-string-or-expression-without-metadata-handles-newline-after-trailing-close-paren: + # . prolog + 55/push-ebp + 89/<- %ebp 4/r32/esp + # setup + # . clear-stream(_test-input-stream) + # . . push args + 68/push _test-input-stream/imm32 + # . . call + e8/call clear-stream/disp32 + # . . discard args + 81 0/subop/add %esp 4/imm32 + # var slice/ecx = {0, 0} + 68/push 0/imm32/end + 68/push 0/imm32/start + 89/<- %ecx 4/r32/esp + # write(_test-input-stream, " )\n") + # . . push args + 68/push " )\n"/imm32 + 68/push _test-input-stream/imm32 + # . . call + e8/call write/disp32 + # . . discard args + 81 0/subop/add %esp 8/imm32 + # next-word-string-or-expression-without-metadata(_test-input-stream, slice) + # . . push args + 51/push-ecx + 68/push _test-input-stream/imm32 + # . . call + e8/call next-word-string-or-expression-without-metadata/disp32 + # . . discard args + 81 0/subop/add %esp 8/imm32 + # check-ints-equal(slice->start, 0, msg) + # . . push args + 68/push "F - test-next-word-string-or-expression-without-metadata-handles-newline-after-trailing-close-paren: start"/imm32 + 68/push 0/imm32 + ff 6/subop/push *ecx + # . . call + e8/call check-ints-equal/disp32 + # . . discard args + 81 0/subop/add %esp 0xc/imm32 + # check-ints-equal(slice->end, 0, msg) + # . . push args + 68/push "F - test-next-word-string-or-expression-without-metadata-handles-newline-after-trailing-close-paren: end"/imm32 68/push 0/imm32 ff 6/subop/push *(ecx+4) # . . call -- cgit 1.4.1-2-gfad0