This commit is contained in:
Kartik Agaram 2020-07-11 00:11:39 -07:00
parent 1c349ac7c5
commit efe641a030
10 changed files with 26 additions and 26 deletions

View File

@ -35,7 +35,7 @@ $Stdin->buffer:
# return next byte value in eax, with top 3 bytes cleared.
# On reaching end of file, return 0xffffffff (Eof).
read-byte-buffered: # f: (addr buffered-file) -> byte-or-Eof/eax
read-byte-buffered: # f: (addr buffered-file) -> byte-or-Eof/eax: byte
# . prologue
55/push-ebp
89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp

View File

@ -801,7 +801,7 @@ test-skip-chars-not-matching-whitespace:
# end
c3/return
skip-chars-matching-in-slice: # curr: (addr byte), end: (addr byte), delimiter: byte -> curr/eax
skip-chars-matching-in-slice: # curr: (addr byte), end: (addr byte), delimiter: byte -> curr/eax: (addr byte)
# . prologue
55/push-ebp
89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp
@ -897,7 +897,7 @@ test-skip-chars-matching-in-slice-none:
# end
c3/return
skip-chars-matching-whitespace-in-slice: # curr: (addr byte), end: (addr byte) -> curr/eax
skip-chars-matching-whitespace-in-slice: # curr: (addr byte), end: (addr byte) -> curr/eax: (addr byte)
# . prologue
55/push-ebp
89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp
@ -970,7 +970,7 @@ test-skip-chars-matching-whitespace-in-slice:
c3/return
# minor fork of 'skip-chars-matching-in-slice'
skip-chars-not-matching-in-slice: # curr: (addr byte), end: (addr byte), delimiter: byte -> curr/eax
skip-chars-not-matching-in-slice: # curr: (addr byte), end: (addr byte), delimiter: byte -> curr/eax: (addr byte)
# . prologue
55/push-ebp
89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp
@ -1095,7 +1095,7 @@ test-skip-chars-not-matching-in-slice-all:
# end
c3/return
skip-chars-not-matching-whitespace-in-slice: # curr: (addr byte), end: (addr byte) -> curr/eax
skip-chars-not-matching-whitespace-in-slice: # curr: (addr byte), end: (addr byte) -> curr/eax: (addr byte)
# . prologue
55/push-ebp
89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp
@ -1410,7 +1410,7 @@ test-skip-string-works-from-mid-stream:
5d/pop-to-ebp
c3/return
skip-string-in-slice: # curr: (addr byte), end: (addr byte) -> new_curr/eax
skip-string-in-slice: # curr: (addr byte), end: (addr byte) -> curr/eax: (addr byte)
# . prologue
55/push-ebp
89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp
@ -1783,7 +1783,7 @@ test-skip-until-close-paren-works-from-mid-stream:
5d/pop-to-ebp
c3/return
skip-until-close-paren-in-slice: # curr: (addr byte), end: (addr byte) -> new_curr/eax: (addr byte)
skip-until-close-paren-in-slice: # curr: (addr byte), end: (addr byte) -> curr/eax: (addr byte)
# . prologue
55/push-ebp
89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp

View File

@ -532,7 +532,7 @@ test-is-valid-name-starts-with-digit:
5d/pop-to-ebp
c3/return
is-label?: # word: (addr slice) -> result/eax: boolean
is-label?: # word: (addr slice) -> result/eax: boolean
# . prologue
55/push-ebp
89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp

View File

@ -8,7 +8,7 @@
# . op subop mod rm32 base index scale r32
# . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes
compute-width: # word: (addr array byte) -> result/eax: int
compute-width: # word: (addr array byte) -> result/eax: int
# . prologue
55/push-ebp
89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp
@ -42,7 +42,7 @@ $compute-width:end:
5d/pop-to-ebp
c3/return
compute-width-of-slice: # s: (addr slice) -> result/eax: int
compute-width-of-slice: # s: (addr slice) -> result/eax: int
# . prologue
55/push-ebp
89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp

6
400.mu
View File

@ -50,7 +50,7 @@ sig check-next-stream-line-equal
sig tailor-exit-descriptor ed: (addr exit-descriptor), nbytes: int
sig stop ed: (addr exit-descriptor), value: int
#sig read f: fd or (addr stream byte), s: (addr stream byte) -> num-bytes-read/eax: int
sig read-byte-buffered f: (addr buffered-file) -> byte-or-Eof/eax: int
sig read-byte-buffered f: (addr buffered-file) -> byte-or-Eof/eax: byte
#sig write-stream f: fd or (addr stream byte), s: (addr stream byte)
#sig error ed: (addr exit-descriptor), out: fd or (addr stream byte), msg: (addr array byte)
sig write-byte-buffered f: (addr buffered-file), n: int
@ -98,9 +98,9 @@ sig skip-chars-matching-whitespace-in-slice curr: (addr byte), end: (addr byte)
sig skip-chars-not-matching-in-slice curr: (addr byte), end: (addr byte), delimiter: byte -> curr/eax: (addr byte)
sig skip-chars-not-matching-whitespace-in-slice curr: (addr byte), end: (addr byte) -> curr/eax: (addr byte)
sig skip-string line: (addr stream byte)
sig skip-string-in-slice curr: (addr byte), end: (addr byte) -> new_curr/eax: (addr byte)
sig skip-string-in-slice curr: (addr byte), end: (addr byte) -> curr/eax: (addr byte)
sig skip-until-close-paren line: (addr stream byte)
sig skip-until-close-paren-in-slice curr: (addr byte), end: (addr byte) -> new_curr/eax: (addr byte)
sig skip-until-close-paren-in-slice curr: (addr byte), end: (addr byte) -> curr/eax: (addr byte)
sig write-stream-data f: (addr buffered-file), s: (addr stream byte)
sig write-int32-decimal out: (addr stream byte), n: int32
sig is-decimal-digit? c: byte -> result/eax: boolean

View File

@ -97,7 +97,7 @@ if ('onhashchange' in window) {
<span id="L35" class="LineNr"> 35 </span>
<span id="L36" class="LineNr"> 36 </span><span class="subxComment"># return next byte value in eax, with top 3 bytes cleared.</span>
<span id="L37" class="LineNr"> 37 </span><span class="subxComment"># On reaching end of file, return 0xffffffff (Eof).</span>
<span id="L38" class="LineNr"> 38 </span><span class="subxFunction">read-byte-buffered</span>: <span class="subxComment"># f: (addr buffered-file) -&gt; byte-or-Eof/eax</span>
<span id="L38" class="LineNr"> 38 </span><span class="subxFunction">read-byte-buffered</span>: <span class="subxComment"># f: (addr buffered-file) -&gt; byte-or-Eof/eax: byte</span>
<span id="L39" class="LineNr"> 39 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L40" class="LineNr"> 40 </span> 55/push-ebp
<span id="L41" class="LineNr"> 41 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span>

View File

@ -860,7 +860,7 @@ if ('onhashchange' in window) {
<span id="L801" class="LineNr"> 801 </span> <span class="subxComment"># end</span>
<span id="L802" class="LineNr"> 802 </span> c3/return
<span id="L803" class="LineNr"> 803 </span>
<span id="L804" class="LineNr"> 804 </span><span class="subxFunction">skip-chars-matching-in-slice</span>: <span class="subxComment"># curr: (addr byte), end: (addr byte), delimiter: byte -&gt; curr/eax</span>
<span id="L804" class="LineNr"> 804 </span><span class="subxFunction">skip-chars-matching-in-slice</span>: <span class="subxComment"># curr: (addr byte), end: (addr byte), delimiter: byte -&gt; curr/eax: (addr byte)</span>
<span id="L805" class="LineNr"> 805 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L806" class="LineNr"> 806 </span> 55/push-ebp
<span id="L807" class="LineNr"> 807 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span>
@ -956,7 +956,7 @@ if ('onhashchange' in window) {
<span id="L897" class="LineNr"> 897 </span> <span class="subxComment"># end</span>
<span id="L898" class="LineNr"> 898 </span> c3/return
<span id="L899" class="LineNr"> 899 </span>
<span id="L900" class="LineNr"> 900 </span><span class="subxFunction">skip-chars-matching-whitespace-in-slice</span>: <span class="subxComment"># curr: (addr byte), end: (addr byte) -&gt; curr/eax</span>
<span id="L900" class="LineNr"> 900 </span><span class="subxFunction">skip-chars-matching-whitespace-in-slice</span>: <span class="subxComment"># curr: (addr byte), end: (addr byte) -&gt; curr/eax: (addr byte)</span>
<span id="L901" class="LineNr"> 901 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L902" class="LineNr"> 902 </span> 55/push-ebp
<span id="L903" class="LineNr"> 903 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span>
@ -1029,7 +1029,7 @@ if ('onhashchange' in window) {
<span id="L970" class="LineNr"> 970 </span> c3/return
<span id="L971" class="LineNr"> 971 </span>
<span id="L972" class="LineNr"> 972 </span><span class="subxComment"># minor fork of 'skip-chars-matching-in-slice'</span>
<span id="L973" class="LineNr"> 973 </span><span class="subxFunction">skip-chars-not-matching-in-slice</span>: <span class="subxComment"># curr: (addr byte), end: (addr byte), delimiter: byte -&gt; curr/eax</span>
<span id="L973" class="LineNr"> 973 </span><span class="subxFunction">skip-chars-not-matching-in-slice</span>: <span class="subxComment"># curr: (addr byte), end: (addr byte), delimiter: byte -&gt; curr/eax: (addr byte)</span>
<span id="L974" class="LineNr"> 974 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L975" class="LineNr"> 975 </span> 55/push-ebp
<span id="L976" class="LineNr"> 976 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span>
@ -1154,7 +1154,7 @@ if ('onhashchange' in window) {
<span id="L1095" class="LineNr">1095 </span> <span class="subxComment"># end</span>
<span id="L1096" class="LineNr">1096 </span> c3/return
<span id="L1097" class="LineNr">1097 </span>
<span id="L1098" class="LineNr">1098 </span><span class="subxFunction">skip-chars-not-matching-whitespace-in-slice</span>: <span class="subxComment"># curr: (addr byte), end: (addr byte) -&gt; curr/eax</span>
<span id="L1098" class="LineNr">1098 </span><span class="subxFunction">skip-chars-not-matching-whitespace-in-slice</span>: <span class="subxComment"># curr: (addr byte), end: (addr byte) -&gt; curr/eax: (addr byte)</span>
<span id="L1099" class="LineNr">1099 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L1100" class="LineNr">1100 </span> 55/push-ebp
<span id="L1101" class="LineNr">1101 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span>
@ -1469,7 +1469,7 @@ if ('onhashchange' in window) {
<span id="L1410" class="LineNr">1410 </span> 5d/pop-to-ebp
<span id="L1411" class="LineNr">1411 </span> c3/return
<span id="L1412" class="LineNr">1412 </span>
<span id="L1413" class="LineNr">1413 </span><span class="subxFunction">skip-string-in-slice</span>: <span class="subxComment"># curr: (addr byte), end: (addr byte) -&gt; new_curr/eax</span>
<span id="L1413" class="LineNr">1413 </span><span class="subxFunction">skip-string-in-slice</span>: <span class="subxComment"># curr: (addr byte), end: (addr byte) -&gt; curr/eax: (addr byte)</span>
<span id="L1414" class="LineNr">1414 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L1415" class="LineNr">1415 </span> 55/push-ebp
<span id="L1416" class="LineNr">1416 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span>
@ -1842,7 +1842,7 @@ if ('onhashchange' in window) {
<span id="L1783" class="LineNr">1783 </span> 5d/pop-to-ebp
<span id="L1784" class="LineNr">1784 </span> c3/return
<span id="L1785" class="LineNr">1785 </span>
<span id="L1786" class="LineNr">1786 </span><span class="subxFunction">skip-until-close-paren-in-slice</span>: <span class="subxComment"># curr: (addr byte), end: (addr byte) -&gt; new_curr/eax: (addr byte)</span>
<span id="L1786" class="LineNr">1786 </span><span class="subxFunction">skip-until-close-paren-in-slice</span>: <span class="subxComment"># curr: (addr byte), end: (addr byte) -&gt; curr/eax: (addr byte)</span>
<span id="L1787" class="LineNr">1787 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L1788" class="LineNr">1788 </span> 55/push-ebp
<span id="L1789" class="LineNr">1789 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span>

View File

@ -591,7 +591,7 @@ if ('onhashchange' in window) {
<span id="L532" class="LineNr">532 </span> 5d/pop-to-ebp
<span id="L533" class="LineNr">533 </span> c3/return
<span id="L534" class="LineNr">534 </span>
<span id="L535" class="LineNr">535 </span><span class="subxFunction">is-label?</span>: <span class="subxComment"># word: (addr slice) -&gt; result/eax: boolean</span>
<span id="L535" class="LineNr">535 </span><span class="subxFunction">is-label?</span>: <span class="subxComment"># word: (addr slice) -&gt; result/eax: boolean</span>
<span id="L536" class="LineNr">536 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L537" class="LineNr">537 </span> 55/push-ebp
<span id="L538" class="LineNr">538 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span>

View File

@ -67,7 +67,7 @@ if ('onhashchange' in window) {
<span id="L8" class="LineNr"> 8 </span><span class="subxS1Comment"># . op subop mod rm32 base index scale r32</span>
<span id="L9" class="LineNr"> 9 </span><span class="subxS1Comment"># . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes</span>
<span id="L10" class="LineNr"> 10 </span>
<span id="L11" class="LineNr"> 11 </span><span class="subxFunction">compute-width</span>: <span class="subxComment"># word: (addr array byte) -&gt; result/eax: int</span>
<span id="L11" class="LineNr"> 11 </span><span class="subxFunction">compute-width</span>: <span class="subxComment"># word: (addr array byte) -&gt; result/eax: int</span>
<span id="L12" class="LineNr"> 12 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L13" class="LineNr"> 13 </span> 55/push-ebp
<span id="L14" class="LineNr"> 14 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span>
@ -101,7 +101,7 @@ if ('onhashchange' in window) {
<span id="L42" class="LineNr"> 42 </span> 5d/pop-to-ebp
<span id="L43" class="LineNr"> 43 </span> c3/return
<span id="L44" class="LineNr"> 44 </span>
<span id="L45" class="LineNr"> 45 </span><span class="subxFunction">compute-width-of-slice</span>: <span class="subxComment"># s: (addr slice) -&gt; result/eax: int</span>
<span id="L45" class="LineNr"> 45 </span><span class="subxFunction">compute-width-of-slice</span>: <span class="subxComment"># s: (addr slice) -&gt; result/eax: int</span>
<span id="L46" class="LineNr"> 46 </span> <span class="subxS1Comment"># . prologue</span>
<span id="L47" class="LineNr"> 47 </span> 55/push-ebp
<span id="L48" class="LineNr"> 48 </span> 89/copy 3/mod/direct 5/rm32/ebp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="Normal"> . </span> 4/r32/esp <span class="Normal"> . </span> <span class="Normal"> . </span> <span class="subxComment"># copy esp to ebp</span>

6
html/400.mu.html generated
View File

@ -105,7 +105,7 @@ if ('onhashchange' in window) {
<span id="L50" class="LineNr"> 50 </span><span class="PreProc">sig</span> <a href='110stop.subx.html#L44'>tailor-exit-descriptor</a> ed: (addr exit-descriptor), nbytes: int
<span id="L51" class="LineNr"> 51 </span><span class="PreProc">sig</span> <a href='110stop.subx.html#L92'>stop</a> ed: (addr exit-descriptor), value: int
<span id="L52" class="LineNr"> 52 </span><span class="Comment">#sig read f: fd or (addr stream byte), s: (addr stream byte) -&gt; num-bytes-read/eax: int</span>
<span id="L53" class="LineNr"> 53 </span><span class="PreProc">sig</span> <a href='112read-byte.subx.html#L38'>read-byte-buffered</a> f: (addr buffered-file)<span class="PreProc"> -&gt; </span>byte-or-Eof/<span class="Constant">eax</span>: int
<span id="L53" class="LineNr"> 53 </span><span class="PreProc">sig</span> <a href='112read-byte.subx.html#L38'>read-byte-buffered</a> f: (addr buffered-file)<span class="PreProc"> -&gt; </span>byte-or-Eof/<span class="Constant">eax</span>: byte
<span id="L54" class="LineNr"> 54 </span><span class="Comment">#sig write-stream f: fd or (addr stream byte), s: (addr stream byte)</span>
<span id="L55" class="LineNr"> 55 </span><span class="Comment">#sig error ed: (addr exit-descriptor), out: fd or (addr stream byte), msg: (addr array byte)</span>
<span id="L56" class="LineNr"> 56 </span><span class="PreProc">sig</span> <a href='115write-byte.subx.html#L33'>write-byte-buffered</a> f: (addr buffered-file), n: int
@ -153,9 +153,9 @@ if ('onhashchange' in window) {
<span id="L98" class="LineNr"> 98 </span><span class="PreProc">sig</span> <a href='124next-token.subx.html#L973'>skip-chars-not-matching-in-slice</a> curr: (addr byte), end: (addr byte), delimiter: byte<span class="PreProc"> -&gt; </span>curr/<span class="Constant">eax</span>: (addr byte)
<span id="L99" class="LineNr"> 99 </span><span class="PreProc">sig</span> <a href='124next-token.subx.html#L1098'>skip-chars-not-matching-whitespace-in-slice</a> curr: (addr byte), end: (addr byte)<span class="PreProc"> -&gt; </span>curr/<span class="Constant">eax</span>: (addr byte)
<span id="L100" class="LineNr">100 </span><span class="PreProc">sig</span> <a href='124next-token.subx.html#L1171'>skip-string</a> line: (addr stream byte)
<span id="L101" class="LineNr">101 </span><span class="PreProc">sig</span> <a href='124next-token.subx.html#L1413'>skip-string-in-slice</a> curr: (addr byte), end: (addr byte)<span class="PreProc"> -&gt; </span>new_curr/<span class="Constant">eax</span>: (addr byte)
<span id="L101" class="LineNr">101 </span><span class="PreProc">sig</span> <a href='124next-token.subx.html#L1413'>skip-string-in-slice</a> curr: (addr byte), end: (addr byte)<span class="PreProc"> -&gt; </span>curr/<span class="Constant">eax</span>: (addr byte)
<span id="L102" class="LineNr">102 </span><span class="PreProc">sig</span> <a href='124next-token.subx.html#L1599'>skip-until-close-paren</a> line: (addr stream byte)
<span id="L103" class="LineNr">103 </span><span class="PreProc">sig</span> <a href='124next-token.subx.html#L1786'>skip-until-close-paren-in-slice</a> curr: (addr byte), end: (addr byte)<span class="PreProc"> -&gt; </span>new_curr/<span class="Constant">eax</span>: (addr byte)
<span id="L103" class="LineNr">103 </span><span class="PreProc">sig</span> <a href='124next-token.subx.html#L1786'>skip-until-close-paren-in-slice</a> curr: (addr byte), end: (addr byte)<span class="PreProc"> -&gt; </span>curr/<span class="Constant">eax</span>: (addr byte)
<span id="L104" class="LineNr">104 </span><span class="PreProc">sig</span> <a href='125write-stream-data.subx.html#L11'>write-stream-data</a> f: (addr buffered-file), s: (addr stream byte)
<span id="L105" class="LineNr">105 </span><span class="PreProc">sig</span> <a href='126write-int-decimal.subx.html#L8'>write-int32-decimal</a> out: (addr stream byte), n: int32
<span id="L106" class="LineNr">106 </span><span class="PreProc">sig</span> <a href='126write-int-decimal.subx.html#L306'>is-decimal-digit?</a> c: byte<span class="PreProc"> -&gt; </span>result/<span class="Constant">eax</span>: boolean