diff options
author | Kartik Agaram <github@akkartik.com> | 2019-08-25 15:11:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-25 15:11:33 -0700 |
commit | e3f1ce673554e64f9ec1710e9ddc9629a0d9d076 (patch) | |
tree | 1960bed25ea27372cfa8344a68f671b1148dc3c7 /apps/dquotes.subx | |
parent | b60d8c920ef988e8058c1e31bd0907643b60cb5d (diff) | |
parent | 57fdbeb2b67a648c178b8dd1813a6a9f06e96c98 (diff) | |
download | mu-e3f1ce673554e64f9ec1710e9ddc9629a0d9d076.tar.gz |
Merge pull request #35 from akkartik/desugar
Desugaring pass
Diffstat (limited to 'apps/dquotes.subx')
-rw-r--r-- | apps/dquotes.subx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/dquotes.subx b/apps/dquotes.subx index d9ed1f05..2fd2d83e 100644 --- a/apps/dquotes.subx +++ b/apps/dquotes.subx @@ -196,6 +196,7 @@ $convert:check-for-comment: 3d/compare-EAX-and 0x23/imm32/hash 74/jump-if-equal $convert:word-loop/disp8 $convert:check-for-string-literal: + # if (slice-starts-with?(word-slice, '"')) continue 3d/compare-EAX-and 0x22/imm32/dquote 75/jump-if-not-equal $convert:regular-word/disp8 $convert:string-literal: @@ -1759,7 +1760,7 @@ test-emit-metadata-in-string-literal: 5d/pop-to-EBP c3/return -# (re)compute the bounds of the next word in the line +# (re)compute the bounds of the next word or string literal in the line # return empty string on reaching end of file next-word-or-string: # line : (address stream byte), out : (address slice) # . prolog @@ -1798,7 +1799,7 @@ $next-word-or-string:check-for-comment: 8b/copy 1/mod/*+disp8 6/rm32/ESI . . . 1/r32/ECX 4/disp8 . # copy *(ESI+4) to ECX 8d/copy-address 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/EAX 0xc/disp8 . # copy ESI+ECX+12 to EAX 89/copy 0/mod/indirect 7/rm32/EDI . . . 0/r32/EAX . . # copy EAX to *EDI - # if line->data[line->read] == '#' + # if (line->data[line->read] != '#') goto next check # . EAX = line->data[line->read] 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . . # clear EAX 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/AL 0xc/disp8 . # copy byte at *(ESI+ECX+12) to AL @@ -1816,7 +1817,7 @@ $next-word-or-string:comment: # return eb/jump $next-word-or-string:end/disp8 $next-word-or-string:check-for-string-literal: - # if line->data[line->read] == '"' + # if (line->data[line->read] != '"') goto next check # . EAX = line->data[line->read] 31/xor 3/mod/direct 0/rm32/EAX . . . 0/r32/EAX . . # clear EAX 8a/copy-byte 1/mod/*+disp8 4/rm32/sib 6/base/ESI 1/index/ECX . 0/r32/AL 0xc/disp8 . # copy byte at *(ESI+ECX+12) to AL |