diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-09-06 10:40:06 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-09-06 10:40:06 -0700 |
commit | 77641c35d3b2a6b516fce6a7b2a319d809999559 (patch) | |
tree | e1b8fa3aa0087d410bb4890f5af18b8a3d5ecb54 | |
parent | dde37113cb3b8def894c663f2c7451cb280f6f34 (diff) | |
download | mu-77641c35d3b2a6b516fce6a7b2a319d809999559.tar.gz |
5626
-rw-r--r-- | apps/calls.subx | 570 |
1 files changed, 285 insertions, 285 deletions
diff --git a/apps/calls.subx b/apps/calls.subx index a61bcfb8..8c902032 100644 --- a/apps/calls.subx +++ b/apps/calls.subx @@ -463,744 +463,744 @@ $next-word-string-or-expression-without-metadata:error1: # print(stderr, "error: no space allowed after '*' in '" line "'") # . write-buffered(Stderr, "error: no space allowed after '*' in '") # . . push args - 68/push "error: no space allowed after '*' in '"/imm32 - 68/push Stderr/imm32 + 68/push "error: no space allowed after '*' in '"/imm32 + 68/push Stderr/imm32 # . . call - e8/call write-buffered/disp32 + e8/call write-buffered/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # . write-stream-data(Stderr, line) # . . push args 56/push-esi - 68/push Stderr/imm32 + 68/push Stderr/imm32 # . . call - e8/call write-stream-data/disp32 + e8/call write-stream-data/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # . write-buffered(Stderr, "'") # . . push args - 68/push "'"/imm32 - 68/push Stderr/imm32 + 68/push "'"/imm32 + 68/push Stderr/imm32 # . . call - e8/call write-buffered/disp32 + e8/call write-buffered/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # . flush(Stderr) # . . push args - 68/push Stderr/imm32 + 68/push Stderr/imm32 # . . call - e8/call flush/disp32 + e8/call flush/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp + 81 0/subop/add %esp 4/imm32 # . syscall(exit, 1) - bb/copy-to-ebx 1/imm32 - b8/copy-to-eax 1/imm32/exit - cd/syscall 0x80/imm8 + bb/copy-to-ebx 1/imm32 + b8/copy-to-eax 1/imm32/exit + cd/syscall 0x80/imm8 # never gets here $next-word-string-or-expression-without-metadata:error2: # print(stderr, "error: *(...) expression must be all on a single line in '" line "'") # . write-buffered(Stderr, "error: *(...) expression must be all on a single line in '") # . . push args - 68/push "error: *(...) expression must be all on a single line in '"/imm32 - 68/push Stderr/imm32 + 68/push "error: *(...) expression must be all on a single line in '"/imm32 + 68/push Stderr/imm32 # . . call - e8/call write-buffered/disp32 + e8/call write-buffered/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # . write-stream-data(Stderr, line) # . . push args 56/push-esi - 68/push Stderr/imm32 + 68/push Stderr/imm32 # . . call - e8/call write-stream-data/disp32 + e8/call write-stream-data/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # . write-buffered(Stderr, "'") # . . push args - 68/push "'"/imm32 - 68/push Stderr/imm32 + 68/push "'"/imm32 + 68/push Stderr/imm32 # . . call - e8/call write-buffered/disp32 + e8/call write-buffered/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # . flush(Stderr) # . . push args - 68/push Stderr/imm32 + 68/push Stderr/imm32 # . . call - e8/call flush/disp32 + e8/call flush/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp + 81 0/subop/add %esp 4/imm32 # . syscall(exit, 1) - bb/copy-to-ebx 1/imm32 - b8/copy-to-eax 1/imm32/exit - cd/syscall 0x80/imm8 + bb/copy-to-ebx 1/imm32 + b8/copy-to-eax 1/imm32/exit + cd/syscall 0x80/imm8 # never gets here $next-word-string-or-expression-without-metadata:error3: # print(stderr, "error: no metadata after calls; just use a comment (in '" line "')") # . write-buffered(Stderr, "error: no metadata after calls; just use a comment (in '") # . . push args - 68/push "error: no metadata after calls; just use a comment (in '"/imm32 - 68/push Stderr/imm32 + 68/push "error: no metadata after calls; just use a comment (in '"/imm32 + 68/push Stderr/imm32 # . . call - e8/call write-buffered/disp32 + e8/call write-buffered/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # . write-stream-data(Stderr, line) # . . push args 56/push-esi - 68/push Stderr/imm32 + 68/push Stderr/imm32 # . . call - e8/call write-stream-data/disp32 + e8/call write-stream-data/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # . write-buffered(Stderr, "')") # . . push args - 68/push "')"/imm32 - 68/push Stderr/imm32 + 68/push "')"/imm32 + 68/push Stderr/imm32 # . . call - e8/call write-buffered/disp32 + e8/call write-buffered/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # . flush(Stderr) # . . push args - 68/push Stderr/imm32 + 68/push Stderr/imm32 # . . call - e8/call flush/disp32 + e8/call flush/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp + 81 0/subop/add %esp 4/imm32 # . syscall(exit, 1) - bb/copy-to-ebx 1/imm32 - b8/copy-to-eax 1/imm32/exit - cd/syscall 0x80/imm8 + bb/copy-to-ebx 1/imm32 + b8/copy-to-eax 1/imm32/exit + cd/syscall 0x80/imm8 # never gets here $next-word-string-or-expression-without-metadata:error4: # print(stderr, "error: unexpected text after end of call in '" line "'") # . write-buffered(Stderr, "error: unexpected text after end of call in '") # . . push args - 68/push "error: unexpected text after end of call in '"/imm32 - 68/push Stderr/imm32 + 68/push "error: unexpected text after end of call in '"/imm32 + 68/push Stderr/imm32 # . . call - e8/call write-buffered/disp32 + e8/call write-buffered/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # . write-stream-data(Stderr, line) # . . push args 56/push-esi - 68/push Stderr/imm32 + 68/push Stderr/imm32 # . . call - e8/call write-stream-data/disp32 + e8/call write-stream-data/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # . write-buffered(Stderr, "'") # . . push args - 68/push "'"/imm32 - 68/push Stderr/imm32 + 68/push "'"/imm32 + 68/push Stderr/imm32 # . . call - e8/call write-buffered/disp32 + e8/call write-buffered/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # . flush(Stderr) # . . push args - 68/push Stderr/imm32 + 68/push Stderr/imm32 # . . call - e8/call flush/disp32 + e8/call flush/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp + 81 0/subop/add %esp 4/imm32 # . syscall(exit, 1) - bb/copy-to-ebx 1/imm32 - b8/copy-to-eax 1/imm32/exit - cd/syscall 0x80/imm8 + bb/copy-to-ebx 1/imm32 + b8/copy-to-eax 1/imm32/exit + cd/syscall 0x80/imm8 # never gets here $next-word-string-or-expression-without-metadata:error5: # print(stderr, "error: no metadata anywhere in calls (in '" line "')") # . write-buffered(Stderr, "error: no metadata anywhere in calls (in '") # . . push args - 68/push "error: no metadata anywhere in calls (in '"/imm32 - 68/push Stderr/imm32 + 68/push "error: no metadata anywhere in calls (in '"/imm32 + 68/push Stderr/imm32 # . . call - e8/call write-buffered/disp32 + e8/call write-buffered/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # . write-stream-data(Stderr, line) # . . push args 56/push-esi - 68/push Stderr/imm32 + 68/push Stderr/imm32 # . . call - e8/call write-stream-data/disp32 + e8/call write-stream-data/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # . write-buffered(Stderr, "')") # . . push args - 68/push "')"/imm32 - 68/push Stderr/imm32 + 68/push "')"/imm32 + 68/push Stderr/imm32 # . . call - e8/call write-buffered/disp32 + e8/call write-buffered/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # . flush(Stderr) # . . push args - 68/push Stderr/imm32 + 68/push Stderr/imm32 # . . call - e8/call flush/disp32 + e8/call flush/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp + 81 0/subop/add %esp 4/imm32 # . syscall(exit, 1) - bb/copy-to-ebx 1/imm32 - b8/copy-to-eax 1/imm32/exit - cd/syscall 0x80/imm8 + bb/copy-to-ebx 1/imm32 + b8/copy-to-eax 1/imm32/exit + cd/syscall 0x80/imm8 # never gets here test-next-word-string-or-expression-without-metadata: # . prolog 55/push-ebp - 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp + 89/<- %ebp 4/r32/esp # setup # . clear-stream(_test-input-stream) # . . push args - 68/push _test-input-stream/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call clear-stream/disp32 + e8/call clear-stream/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp + 81 0/subop/add %esp 4/imm32 # var slice/ecx = {0, 0} - 68/push 0/imm32/end - 68/push 0/imm32/start + 68/push 0/imm32/end + 68/push 0/imm32/start 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx # write(_test-input-stream, " ab") # . . push args - 68/push " ab"/imm32 - 68/push _test-input-stream/imm32 + 68/push " ab"/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call write/disp32 + e8/call write/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 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 + 68/push _test-input-stream/imm32 # . . call - e8/call next-word-string-or-expression-without-metadata/disp32 + e8/call next-word-string-or-expression-without-metadata/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # check-ints-equal(_test-input-stream->read, 4, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata/updates-stream-read-correctly"/imm32 - 68/push 4/imm32 - b8/copy-to-eax _test-input-stream/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata/updates-stream-read-correctly"/imm32 + 68/push 4/imm32 + b8/copy-to-eax _test-input-stream/imm32 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 . # push *(eax+4) # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # check-ints-equal(slice->start - _test-input-stream->data, 2, msg) # . check-ints-equal(slice->start - _test-input-stream, 14, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata: start"/imm32 - 68/push 0xe/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata: start"/imm32 + 68/push 0xe/imm32 # . . push slice->start - _test-input-stream 8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . . # copy *ecx to eax 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32 # subtract from eax 50/push-eax # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # check-ints-equal(slice->end - _test-input-stream->data, 4, msg) # . check-ints-equal(slice->end - _test-input-stream, 16, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata: end"/imm32 - 68/push 0x10/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata: end"/imm32 + 68/push 0x10/imm32 # . . push slice->end - _test-input-stream 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy *(ecx+4) to eax 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32 # subtract from eax 50/push-eax # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # . epilog - 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp + 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-whole-comment: # . prolog 55/push-ebp - 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp + 89/<- %ebp 4/r32/esp # setup # . clear-stream(_test-input-stream) # . . push args - 68/push _test-input-stream/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call clear-stream/disp32 + e8/call clear-stream/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp + 81 0/subop/add %esp 4/imm32 # var slice/ecx = {0, 0} - 68/push 0/imm32/end - 68/push 0/imm32/start + 68/push 0/imm32/end + 68/push 0/imm32/start 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx # write(_test-input-stream, " # a") # . . push args - 68/push " # a"/imm32 - 68/push _test-input-stream/imm32 + 68/push " # a"/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call write/disp32 + e8/call write/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 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 + 68/push _test-input-stream/imm32 # . . call - e8/call next-word-string-or-expression-without-metadata/disp32 + e8/call next-word-string-or-expression-without-metadata/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # check-ints-equal(_test-input-stream->read, 5, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata-returns-whole-comment/updates-stream-read-correctly"/imm32 - 68/push 5/imm32 - b8/copy-to-eax _test-input-stream/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-returns-whole-comment/updates-stream-read-correctly"/imm32 + 68/push 5/imm32 + b8/copy-to-eax _test-input-stream/imm32 ff 6/subop/push 1/mod/*+disp8 0/rm32/eax . . . . 4/disp8 . # push *(eax+4) # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # check-ints-equal(slice->start - _test-input-stream->data, 2, msg) # . check-ints-equal(slice->start - _test-input-stream, 14, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata-returns-whole-comment: start"/imm32 - 68/push 0xe/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-returns-whole-comment: start"/imm32 + 68/push 0xe/imm32 # . . push slice->start - _test-input-stream 8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . . # copy *ecx to eax 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32 # subtract from eax 50/push-eax # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # check-ints-equal(slice->end - _test-input-stream->data, 5, msg) # . check-ints-equal(slice->end - _test-input-stream, 17, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata-returns-whole-comment: end"/imm32 - 68/push 0x11/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-returns-whole-comment: end"/imm32 + 68/push 0x11/imm32 # . . push slice->end - _test-input-stream 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy *(ecx+4) to eax 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32 # subtract from eax 50/push-eax # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # . epilog - 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp + 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-empty-slice-on-eof: # . prolog 55/push-ebp - 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp + 89/<- %ebp 4/r32/esp # setup # . clear-stream(_test-input-stream) # . . push args - 68/push _test-input-stream/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call clear-stream/disp32 + e8/call clear-stream/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp + 81 0/subop/add %esp 4/imm32 # var slice/ecx = {0, 0} - 68/push 0/imm32/end - 68/push 0/imm32/start + 68/push 0/imm32/end + 68/push 0/imm32/start 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx # write nothing to _test-input-stream # next-word-string-or-expression-without-metadata(_test-input-stream, slice) # . . push args 51/push-ecx - 68/push _test-input-stream/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call next-word-string-or-expression-without-metadata/disp32 + e8/call next-word-string-or-expression-without-metadata/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # check-ints-equal(slice->end - slice->start, 0, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata-returns-empty-expression-on-eof"/imm32 - 68/push 0/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-returns-empty-expression-on-eof"/imm32 + 68/push 0/imm32 # . . push slice->end - slice->start 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy *(ecx+4) to eax 2b/subtract 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . . # subtract *ecx from eax 50/push-eax # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # . epilog - 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp + 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-string-literal: # . prolog 55/push-ebp - 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp + 89/<- %ebp 4/r32/esp # setup # . clear-stream(_test-input-stream) # . . push args - 68/push _test-input-stream/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call clear-stream/disp32 + e8/call clear-stream/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp + 81 0/subop/add %esp 4/imm32 # var slice/ecx = {0, 0} - 68/push 0/imm32/end - 68/push 0/imm32/start + 68/push 0/imm32/end + 68/push 0/imm32/start 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx # write(_test-input-stream, " \"a b\" ") # . . push args - 68/push " \"a b\" "/imm32 - 68/push _test-input-stream/imm32 + 68/push " \"a b\" "/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call write/disp32 + e8/call write/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 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 + 68/push _test-input-stream/imm32 # . . call - e8/call next-word-string-or-expression-without-metadata/disp32 + e8/call next-word-string-or-expression-without-metadata/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # check-ints-equal(slice->start - _test-input-stream->data, 1, msg) # . check-ints-equal(slice->start - _test-input-stream, 13, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata-returns-string-literal: start"/imm32 - 68/push 0xd/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-returns-string-literal: start"/imm32 + 68/push 0xd/imm32 # . . push slice->start - _test-input-stream 8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . . # copy *ecx to eax 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32 # subtract from eax 50/push-eax # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # check-ints-equal(slice->end - _test-input-stream->data, 6, msg) # . check-ints-equal(slice->end - _test-input-stream, 18, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata-returns-string-literal: end"/imm32 - 68/push 0x12/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-returns-string-literal: end"/imm32 + 68/push 0x12/imm32 # . . push slice->end - _test-input-stream 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy *(ecx+4) to eax 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32 # subtract from eax 50/push-eax # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # . epilog - 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp + 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-string-with-escapes: # . prolog 55/push-ebp - 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp + 89/<- %ebp 4/r32/esp # setup # . clear-stream(_test-input-stream) # . . push args - 68/push _test-input-stream/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call clear-stream/disp32 + e8/call clear-stream/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp + 81 0/subop/add %esp 4/imm32 # var slice/ecx = {0, 0} - 68/push 0/imm32/end - 68/push 0/imm32/start + 68/push 0/imm32/end + 68/push 0/imm32/start 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx # write(_test-input-stream, " \"a\\\"b\"") # . . push args - 68/push " \"a\\\"b\""/imm32 - 68/push _test-input-stream/imm32 + 68/push " \"a\\\"b\""/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call write/disp32 + e8/call write/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 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 + 68/push _test-input-stream/imm32 # . . call - e8/call next-word-string-or-expression-without-metadata/disp32 + e8/call next-word-string-or-expression-without-metadata/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # check-ints-equal(slice->start - _test-input-stream->data, 1, msg) # . check-ints-equal(slice->start - _test-input-stream, 13, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata-returns-string-with-escapes: start"/imm32 - 68/push 0xd/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-returns-string-with-escapes: start"/imm32 + 68/push 0xd/imm32 # . . push slice->start - _test-input-stream 8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . . # copy *ecx to eax 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32 # subtract from eax 50/push-eax # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # check-ints-equal(slice->end - _test-input-stream->data, 7, msg) # . check-ints-equal(slice->end - _test-input-stream, 19, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata-returns-string-with-escapes: end"/imm32 - 68/push 0x13/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-returns-string-with-escapes: end"/imm32 + 68/push 0x13/imm32 # . . push slice->end - _test-input-stream 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy *(ecx+4) to eax 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32 # subtract from eax 50/push-eax # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # . epilog - 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp + 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-whole-expression: # . prolog 55/push-ebp - 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp + 89/<- %ebp 4/r32/esp # setup # . clear-stream(_test-input-stream) # . . push args - 68/push _test-input-stream/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call clear-stream/disp32 + e8/call clear-stream/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp + 81 0/subop/add %esp 4/imm32 # var slice/ecx = {0, 0} - 68/push 0/imm32/end - 68/push 0/imm32/start + 68/push 0/imm32/end + 68/push 0/imm32/start 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx # write(_test-input-stream, " *(a b) ") # . . push args - 68/push " *(a b) "/imm32 - 68/push _test-input-stream/imm32 + 68/push " *(a b) "/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call write/disp32 + e8/call write/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 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 + 68/push _test-input-stream/imm32 # . . call - e8/call next-word-string-or-expression-without-metadata/disp32 + e8/call next-word-string-or-expression-without-metadata/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # check-ints-equal(slice->start - _test-input-stream->data, 1, msg) # . check-ints-equal(slice->start - _test-input-stream, 13, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata-returns-whole-expression: start"/imm32 - 68/push 0xd/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-returns-whole-expression: start"/imm32 + 68/push 0xd/imm32 # . . push slice->start - _test-input-stream 8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . . # copy *ecx to eax 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32 # subtract from eax 50/push-eax # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # check-ints-equal(slice->end - _test-input-stream->data, 7, msg) # . check-ints-equal(slice->end - _test-input-stream, 19, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata-returns-whole-expression: end"/imm32 - 68/push 0x13/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-returns-whole-expression: end"/imm32 + 68/push 0x13/imm32 # . . push slice->end - _test-input-stream 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy *(ecx+4) to eax 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32 # subtract from eax 50/push-eax # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # . epilog - 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp + 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-returns-eol-on-trailing-close-paren: # . prolog 55/push-ebp - 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp + 89/<- %ebp 4/r32/esp # setup # . clear-stream(_test-input-stream) # . . push args - 68/push _test-input-stream/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call clear-stream/disp32 + e8/call clear-stream/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp + 81 0/subop/add %esp 4/imm32 # var slice/ecx = {0, 0} - 68/push 0/imm32/end - 68/push 0/imm32/start + 68/push 0/imm32/end + 68/push 0/imm32/start 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx # write(_test-input-stream, " ) ") # . . push args - 68/push " ) "/imm32 - 68/push _test-input-stream/imm32 + 68/push " ) "/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call write/disp32 + e8/call write/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 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 + 68/push _test-input-stream/imm32 # . . call - e8/call next-word-string-or-expression-without-metadata/disp32 + e8/call next-word-string-or-expression-without-metadata/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 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 0/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-returns-eol-on-trailing-close-paren: start"/imm32 + 68/push 0/imm32 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . . # push *ecx # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 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 0/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-returns-eol-on-trailing-close-paren: end"/imm32 + 68/push 0/imm32 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 . # push *(ecx+4) # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # . epilog - 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp + 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-handles-comment-after-trailing-close-paren: # . prolog 55/push-ebp - 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp + 89/<- %ebp 4/r32/esp # setup # . clear-stream(_test-input-stream) # . . push args - 68/push _test-input-stream/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call clear-stream/disp32 + e8/call clear-stream/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp + 81 0/subop/add %esp 4/imm32 # var slice/ecx = {0, 0} - 68/push 0/imm32/end - 68/push 0/imm32/start + 68/push 0/imm32/end + 68/push 0/imm32/start 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx # write(_test-input-stream, " ) # abc ") # . . push args - 68/push " ) # abc "/imm32 - 68/push _test-input-stream/imm32 + 68/push " ) # abc "/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call write/disp32 + e8/call write/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 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 + 68/push _test-input-stream/imm32 # . . call - e8/call next-word-string-or-expression-without-metadata/disp32 + e8/call next-word-string-or-expression-without-metadata/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 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 0/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-returns-eol-on-trailing-close-paren: start"/imm32 + 68/push 0/imm32 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . . # push *ecx # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 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 0/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-returns-eol-on-trailing-close-paren: end"/imm32 + 68/push 0/imm32 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 4/disp8 . # push *(ecx+4) # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # . epilog - 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp + 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return test-next-word-string-or-expression-without-metadata-stops-at-close-paren: # . prolog 55/push-ebp - 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp + 89/<- %ebp 4/r32/esp # setup # . clear-stream(_test-input-stream) # . . push args - 68/push _test-input-stream/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call clear-stream/disp32 + e8/call clear-stream/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp + 81 0/subop/add %esp 4/imm32 # var slice/ecx = {0, 0} - 68/push 0/imm32/end - 68/push 0/imm32/start + 68/push 0/imm32/end + 68/push 0/imm32/start 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx # write(_test-input-stream, " abc) # def") # . . push args - 68/push " abc) # def"/imm32 - 68/push _test-input-stream/imm32 + 68/push " abc) # def"/imm32 + 68/push _test-input-stream/imm32 # . . call - e8/call write/disp32 + e8/call write/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 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 + 68/push _test-input-stream/imm32 # . . call - e8/call next-word-string-or-expression-without-metadata/disp32 + e8/call next-word-string-or-expression-without-metadata/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32 # add to esp + 81 0/subop/add %esp 8/imm32 # check-ints-equal(slice->start - _test-input-stream->data, 1, msg) # . check-ints-equal(slice->start - _test-input-stream, 13, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata-stops-at-close-paren: start"/imm32 - 68/push 0xd/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-stops-at-close-paren: start"/imm32 + 68/push 0xd/imm32 # . . push slice->start - _test-input-stream 8b/copy 0/mod/indirect 1/rm32/ecx . . . 0/r32/eax . . # copy *ecx to eax 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32 # subtract from eax 50/push-eax # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # check-ints-equal(slice->end - _test-input-stream->data, 4, msg) # . check-ints-equal(slice->end - _test-input-stream, 16, msg) # . . push args - 68/push "F - test-next-word-string-or-expression-without-metadata-stops-at-close-paren: end"/imm32 - 68/push 0x10/imm32 + 68/push "F - test-next-word-string-or-expression-without-metadata-stops-at-close-paren: end"/imm32 + 68/push 0x10/imm32 # . . push slice->end - _test-input-stream 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 . # copy *(ecx+4) to eax 81 5/subop/subtract 3/mod/direct 0/rm32/eax . . . . . _test-input-stream/imm32 # subtract from eax 50/push-eax # . . call - e8/call check-ints-equal/disp32 + e8/call check-ints-equal/disp32 # . . discard args - 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp + 81 0/subop/add %esp 0xc/imm32 # . epilog - 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . . # copy ebp to esp + 89/<- %esp 5/r32/ebp 5d/pop-to-ebp c3/return |