diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-11-26 22:21:06 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-11-26 22:21:06 -0800 |
commit | 374397f0cbd841bb76f0798eae7d3a18f5eef3b6 (patch) | |
tree | e7ca6796f4b2943a4ca22f3d0e71547dc2bfbdf9 /html/apps | |
parent | 70187b1c01a0540bc677fbbfeaef129549d3075d (diff) | |
download | mu-374397f0cbd841bb76f0798eae7d3a18f5eef3b6.tar.gz |
5766
Diffstat (limited to 'html/apps')
-rw-r--r-- | html/apps/mu.subx.html | 496 |
1 files changed, 299 insertions, 197 deletions
diff --git a/html/apps/mu.subx.html b/html/apps/mu.subx.html index 964fc239..c1f45e1a 100644 --- a/html/apps/mu.subx.html +++ b/html/apps/mu.subx.html @@ -484,7 +484,7 @@ if ('onhashchange' in window) { <span id="L422" class="LineNr"> 422 </span> <span class="subxComment"># convert</span> <span id="L423" class="LineNr"> 423 </span> (<a href='mu.subx.html#L365'>convert-mu</a> <a href='../061read-byte.subx.html#L314'>_test-input-buffered-file</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) <span id="L424" class="LineNr"> 424 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) -<span id="L425" class="Folded"> 425 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span> +<span id="L425" class="Folded"> 425 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------</span> <span id="L431" class="LineNr"> 431 </span> <span class="subxComment"># check output</span> <span id="L432" class="LineNr"> 432 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"foo:"</span> <span class="Constant">"F - <a href='mu.subx.html#L398'>test-convert-function-skeleton</a>/0"</span>) <span id="L433" class="LineNr"> 433 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"# . prologue"</span> <span class="Constant">"F - <a href='mu.subx.html#L398'>test-convert-function-skeleton</a>/1"</span>) @@ -538,7 +538,7 @@ if ('onhashchange' in window) { <span id="L481" class="LineNr"> 481 </span> <span class="subxComment"># convert</span> <span id="L482" class="LineNr"> 482 </span> (<a href='mu.subx.html#L365'>convert-mu</a> <a href='../061read-byte.subx.html#L314'>_test-input-buffered-file</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) <span id="L483" class="LineNr"> 483 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) -<span id="L484" class="Folded"> 484 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span> +<span id="L484" class="Folded"> 484 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------</span> <span id="L490" class="LineNr"> 490 </span> <span class="subxComment"># check first function</span> <span id="L491" class="LineNr"> 491 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"foo:"</span> <span class="Constant">"F - <a href='mu.subx.html#L445'>test-convert-multiple-function-skeletons</a>/0"</span>) <span id="L492" class="LineNr"> 492 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"# . prologue"</span> <span class="Constant">"F - <a href='mu.subx.html#L445'>test-convert-multiple-function-skeletons</a>/1"</span>) @@ -594,7 +594,7 @@ if ('onhashchange' in window) { <span id="L542" class="LineNr"> 542 </span> <span class="subxComment"># convert</span> <span id="L543" class="LineNr"> 543 </span> (<a href='mu.subx.html#L365'>convert-mu</a> <a href='../061read-byte.subx.html#L314'>_test-input-buffered-file</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) <span id="L544" class="LineNr"> 544 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) -<span id="L545" class="Folded"> 545 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span> +<span id="L545" class="Folded"> 545 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------</span> <span id="L551" class="LineNr"> 551 </span> <span class="subxComment"># check output</span> <span id="L552" class="LineNr"> 552 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"foo:"</span> <span class="Constant">"F - <a href='mu.subx.html#L398'>test-convert-function-skeleton</a>/0"</span>) <span id="L553" class="LineNr"> 553 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"# . prologue"</span> <span class="Constant">"F - <a href='mu.subx.html#L398'>test-convert-function-skeleton</a>/1"</span>) @@ -659,7 +659,7 @@ if ('onhashchange' in window) { <span id="L612" class="LineNr"> 612 </span> <span class="subxComment"># if (line->write == 0) break</span> <span id="L613" class="LineNr"> 613 </span> 81 7/subop/compare *ecx 0/imm32 <span id="L614" class="LineNr"> 614 </span> 0f 84/jump-if-equal <span class="Constant">break</span>/disp32 -<span id="L615" class="Folded"> 615 </span><span class="Folded">+-- 6 lines: #? # dump line -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span> +<span id="L615" class="Folded"> 615 </span><span class="Folded">+-- 6 lines: #? # dump line ---------------------------------------------------------------------------------------------------------------------------</span> <span id="L621" class="LineNr"> 621 </span> { <span class="subxComment"># word loop</span> <span id="L622" class="LineNr"> 622 </span><span class="Constant">$parse-mu:word-loop</span>: <span id="L623" class="LineNr"> 623 </span> (<a href='../094next-word-or-string.subx.html#L8'>next-word-or-string</a> %ecx %edx) @@ -991,9 +991,9 @@ if ('onhashchange' in window) { <span id="L949" class="LineNr"> 949 </span> <span class="subxComment">#</span> <span id="L950" class="LineNr"> 950 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> %edi *ecx) <span id="L951" class="LineNr"> 951 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> %edi <span class="Constant">":\n"</span>) -<span id="L952" class="LineNr"> 952 </span> (<a href='mu.subx.html#L2423'>emit-subx-prologue</a> %edi) +<span id="L952" class="LineNr"> 952 </span> (<a href='mu.subx.html#L2535'>emit-subx-prologue</a> %edi) <span id="L953" class="LineNr"> 953 </span> (<a href='mu.subx.html#L965'>emit-subx-block</a> %edi *(ecx+0x10)) <span class="subxComment"># Function-body</span> -<span id="L954" class="LineNr"> 954 </span> (<a href='mu.subx.html#L2437'>emit-subx-epilogue</a> %edi) +<span id="L954" class="LineNr"> 954 </span> (<a href='mu.subx.html#L2549'>emit-subx-epilogue</a> %edi) <span id="L955" class="LineNr"> 955 </span><span class="Constant">$emit-subx-function:end</span>: <span id="L956" class="LineNr"> 956 </span> <span class="subxS1Comment"># . restore registers</span> <span id="L957" class="LineNr"> 957 </span> 5f/pop-to-edi @@ -1751,7 +1751,7 @@ if ('onhashchange' in window) { <span id="L1709" class="LineNr">1709 </span> <span class="subxComment"># convert</span> <span id="L1710" class="LineNr">1710 </span> (<a href='mu.subx.html#L976'>emit-subx-statement</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a> %esi %edx %ebx 0) <span id="L1711" class="LineNr">1711 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) -<span id="L1712" class="Folded">1712 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span> +<span id="L1712" class="Folded">1712 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------</span> <span id="L1718" class="LineNr">1718 </span> <span class="subxComment"># check output</span> <span id="L1719" class="LineNr">1719 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"ff 0/subop/increment *(ebp+0xfffffff8)"</span> <span class="Constant">"F - test-emit-subx-statement-primitive"</span>) <span id="L1720" class="LineNr">1720 </span> <span class="subxS1Comment"># . epilogue</span> @@ -1830,7 +1830,7 @@ if ('onhashchange' in window) { <span id="L1793" class="LineNr">1793 </span> <span class="subxComment"># convert</span> <span id="L1794" class="LineNr">1794 </span> (<a href='mu.subx.html#L976'>emit-subx-statement</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a> %esi %edx %ebx 0) <span id="L1795" class="LineNr">1795 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) -<span id="L1796" class="Folded">1796 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span> +<span id="L1796" class="Folded">1796 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------</span> <span id="L1802" class="LineNr">1802 </span> <span class="subxComment"># check output</span> <span id="L1803" class="LineNr">1803 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"ff 0/subop/increment %eax"</span> <span class="Constant">"F - test-emit-subx-statement-primitive-register"</span>) <span id="L1804" class="LineNr">1804 </span> <span class="subxS1Comment"># . epilogue</span> @@ -1922,7 +1922,7 @@ if ('onhashchange' in window) { <span id="L1890" class="LineNr">1890 </span> <span class="subxComment"># convert</span> <span id="L1891" class="LineNr">1891 </span> (<a href='mu.subx.html#L976'>emit-subx-statement</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a> %esi %edx %ebx 0) <span id="L1892" class="LineNr">1892 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) -<span id="L1893" class="Folded">1893 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span> +<span id="L1893" class="Folded">1893 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------</span> <span id="L1899" class="LineNr">1899 </span> <span class="subxComment"># check output</span> <span id="L1900" class="LineNr">1900 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"ff 0/subop/increment %eax"</span> <span class="Constant">"F - test-emit-subx-statement-select-primitive"</span>) <span id="L1901" class="LineNr">1901 </span> <span class="subxS1Comment"># . epilogue</span> @@ -2014,7 +2014,7 @@ if ('onhashchange' in window) { <span id="L1987" class="LineNr">1987 </span> <span class="subxComment"># convert</span> <span id="L1988" class="LineNr">1988 </span> (<a href='mu.subx.html#L976'>emit-subx-statement</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a> %esi %edx %ebx 0) <span id="L1989" class="LineNr">1989 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) -<span id="L1990" class="Folded">1990 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span> +<span id="L1990" class="Folded">1990 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------</span> <span id="L1996" class="LineNr">1996 </span> <span class="subxComment"># check output</span> <span id="L1997" class="LineNr">1997 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"ff 0/subop/increment %eax"</span> <span class="Constant">"F - test-emit-subx-statement-select-primitive-2"</span>) <span id="L1998" class="LineNr">1998 </span> <span class="subxS1Comment"># . epilogue</span> @@ -2069,7 +2069,7 @@ if ('onhashchange' in window) { <span id="L2047" class="LineNr">2047 </span> <span class="subxComment"># convert</span> <span id="L2048" class="LineNr">2048 </span> (<a href='mu.subx.html#L976'>emit-subx-statement</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a> %esi %edx <span class="SpecialChar"><a href='mu.subx.html#L1026'>Primitives</a></span> 0) <span id="L2049" class="LineNr">2049 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) -<span id="L2050" class="Folded">2050 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span> +<span id="L2050" class="Folded">2050 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------</span> <span id="L2056" class="LineNr">2056 </span> <span class="subxComment"># check output</span> <span id="L2057" class="LineNr">2057 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"ff 0/subop/increment %eax"</span> <span class="Constant">"F - test-increment-register"</span>) <span id="L2058" class="LineNr">2058 </span> <span class="subxS1Comment"># . epilogue</span> @@ -2124,7 +2124,7 @@ if ('onhashchange' in window) { <span id="L2107" class="LineNr">2107 </span> <span class="subxComment"># convert</span> <span id="L2108" class="LineNr">2108 </span> (<a href='mu.subx.html#L976'>emit-subx-statement</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a> %esi %edx <span class="SpecialChar"><a href='mu.subx.html#L1026'>Primitives</a></span> 0) <span id="L2109" class="LineNr">2109 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) -<span id="L2110" class="Folded">2110 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span> +<span id="L2110" class="Folded">2110 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------</span> <span id="L2116" class="LineNr">2116 </span> <span class="subxComment"># check output</span> <span id="L2117" class="LineNr">2117 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"ff 0/subop/increment %eax"</span> <span class="Constant">"F - test-increment-var"</span>) <span id="L2118" class="LineNr">2118 </span> <span class="subxS1Comment"># . epilogue</span> @@ -2175,7 +2175,7 @@ if ('onhashchange' in window) { <span id="L2163" class="LineNr">2163 </span> <span class="subxComment"># convert</span> <span id="L2164" class="LineNr">2164 </span> (<a href='mu.subx.html#L976'>emit-subx-statement</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a> %esi 0 <span class="SpecialChar"><a href='mu.subx.html#L1026'>Primitives</a></span> 0) <span id="L2165" class="LineNr">2165 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) -<span id="L2166" class="Folded">2166 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span> +<span id="L2166" class="Folded">2166 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------</span> <span id="L2172" class="LineNr">2172 </span> <span class="subxComment"># check output</span> <span id="L2173" class="LineNr">2173 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"01 %eax 0x00000001/r32"</span> <span class="Constant">"F - test-add-reg-to-reg"</span>) <span id="L2174" class="LineNr">2174 </span> <span class="subxS1Comment"># . epilogue</span> @@ -2183,10 +2183,10 @@ if ('onhashchange' in window) { <span id="L2176" class="LineNr">2176 </span> 5d/pop-to-ebp <span id="L2177" class="LineNr">2177 </span> c3/return <span id="L2178" class="LineNr">2178 </span> -<span id="L2179" class="LineNr">2179 </span><span class="subxTest">test-add-literal-to-reg</span>: -<span id="L2180" class="LineNr">2180 </span> <span class="subxComment"># var1/eax <- add 0x34</span> +<span id="L2179" class="LineNr">2179 </span><span class="subxTest">test-add-reg-to-mem</span>: +<span id="L2180" class="LineNr">2180 </span> <span class="subxComment"># add-to var1 var2/reg</span> <span id="L2181" class="LineNr">2181 </span> <span class="subxComment"># =></span> -<span id="L2182" class="LineNr">2182 </span> <span class="subxComment"># 81 0/subop/add %eax 0x34/imm32</span> +<span id="L2182" class="LineNr">2182 </span> <span class="subxComment"># 01 *(ebp+__) var2</span> <span id="L2183" class="LineNr">2183 </span> <span class="subxComment">#</span> <span id="L2184" class="LineNr">2184 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2185" class="LineNr">2185 </span> 55/push-ebp @@ -2194,50 +2194,50 @@ if ('onhashchange' in window) { <span id="L2187" class="LineNr">2187 </span> <span class="subxComment"># setup</span> <span id="L2188" class="LineNr">2188 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a>) <span id="L2189" class="LineNr">2189 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../064write-byte.subx.html#L331'>_test-output-buffered-file->buffer</a>) -<span id="L2190" class="LineNr">2190 </span> <span class="subxComment"># var-var1/ecx : var in eax</span> -<span id="L2191" class="LineNr">2191 </span> 68/push <span class="Constant">"eax"</span>/imm32/register -<span id="L2192" class="LineNr">2192 </span> 68/push 0/imm32/no-stack-offset +<span id="L2190" class="LineNr">2190 </span> <span class="subxComment"># var-var1/ecx : var</span> +<span id="L2191" class="LineNr">2191 </span> 68/push 0/imm32/no-register +<span id="L2192" class="LineNr">2192 </span> 68/push 8/imm32/stack-offset <span id="L2193" class="LineNr">2193 </span> 68/push 1/imm32/block-depth <span id="L2194" class="LineNr">2194 </span> 68/push 1/imm32/type-int <span id="L2195" class="LineNr">2195 </span> 68/push <span class="Constant">"var1"</span>/imm32 <span id="L2196" class="LineNr">2196 </span> 89/<- %ecx 4/r32/esp -<span id="L2197" class="LineNr">2197 </span> <span class="subxComment"># var-var2/edx : var literal</span> -<span id="L2198" class="LineNr">2198 </span> 68/push 0/imm32/no-register +<span id="L2197" class="LineNr">2197 </span> <span class="subxComment"># var-var2/edx : var in ecx</span> +<span id="L2198" class="LineNr">2198 </span> 68/push <span class="Constant">"ecx"</span>/imm32/register <span id="L2199" class="LineNr">2199 </span> 68/push 0/imm32/no-stack-offset <span id="L2200" class="LineNr">2200 </span> 68/push 1/imm32/block-depth -<span id="L2201" class="LineNr">2201 </span> 68/push 0/imm32/type-literal -<span id="L2202" class="LineNr">2202 </span> 68/push <span class="Constant">"0x34"</span>/imm32 +<span id="L2201" class="LineNr">2201 </span> 68/push 1/imm32/type-int +<span id="L2202" class="LineNr">2202 </span> 68/push <span class="Constant">"var2"</span>/imm32 <span id="L2203" class="LineNr">2203 </span> 89/<- %edx 4/r32/esp <span id="L2204" class="LineNr">2204 </span> <span class="subxComment"># inouts/esi : (list var2)</span> <span id="L2205" class="LineNr">2205 </span> 68/push 0/imm32/next <span id="L2206" class="LineNr">2206 </span> 52/push-edx/var-var2 <span id="L2207" class="LineNr">2207 </span> 89/<- %esi 4/r32/esp -<span id="L2208" class="LineNr">2208 </span> <span class="subxComment"># outputs/edi : (list var1)</span> -<span id="L2209" class="LineNr">2209 </span> 68/push 0/imm32/next +<span id="L2208" class="LineNr">2208 </span> <span class="subxComment"># inouts = (list var1 var2)</span> +<span id="L2209" class="LineNr">2209 </span> 56/push-esi/next <span id="L2210" class="LineNr">2210 </span> 51/push-ecx/var-var1 -<span id="L2211" class="LineNr">2211 </span> 89/<- %edi 4/r32/esp +<span id="L2211" class="LineNr">2211 </span> 89/<- %esi 4/r32/esp <span id="L2212" class="LineNr">2212 </span> <span class="subxComment"># stmt/esi : statement</span> <span id="L2213" class="LineNr">2213 </span> 68/push 0/imm32/next -<span id="L2214" class="LineNr">2214 </span> 57/push-edi/outputs +<span id="L2214" class="LineNr">2214 </span> 68/push 0/imm32/outputs <span id="L2215" class="LineNr">2215 </span> 56/push-esi/inouts -<span id="L2216" class="LineNr">2216 </span> 68/push <span class="Constant">"add"</span>/imm32/operation +<span id="L2216" class="LineNr">2216 </span> 68/push <span class="Constant">"add-to"</span>/imm32/operation <span id="L2217" class="LineNr">2217 </span> 68/push 1/imm32 <span id="L2218" class="LineNr">2218 </span> 89/<- %esi 4/r32/esp <span id="L2219" class="LineNr">2219 </span> <span class="subxComment"># convert</span> <span id="L2220" class="LineNr">2220 </span> (<a href='mu.subx.html#L976'>emit-subx-statement</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a> %esi 0 <span class="SpecialChar"><a href='mu.subx.html#L1026'>Primitives</a></span> 0) <span id="L2221" class="LineNr">2221 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) -<span id="L2222" class="Folded">2222 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span> +<span id="L2222" class="Folded">2222 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------</span> <span id="L2228" class="LineNr">2228 </span> <span class="subxComment"># check output</span> -<span id="L2229" class="LineNr">2229 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"81 0/subop/add %eax 0x34/imm32"</span> <span class="Constant">"F - test-add-literal-to-reg"</span>) +<span id="L2229" class="LineNr">2229 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"01 *(ebp+0x00000008) 0x00000001/r32"</span> <span class="Constant">"F - test-add-reg-to-mem"</span>) <span id="L2230" class="LineNr">2230 </span> <span class="subxS1Comment"># . epilogue</span> <span id="L2231" class="LineNr">2231 </span> 89/<- %esp 5/r32/ebp <span id="L2232" class="LineNr">2232 </span> 5d/pop-to-ebp <span id="L2233" class="LineNr">2233 </span> c3/return <span id="L2234" class="LineNr">2234 </span> -<span id="L2235" class="LineNr">2235 </span><span class="subxTest">test-add-literal-to-mem</span>: -<span id="L2236" class="LineNr">2236 </span> <span class="subxComment"># add-to var1, 0x34</span> +<span id="L2235" class="LineNr">2235 </span><span class="subxTest">test-add-mem-to-reg</span>: +<span id="L2236" class="LineNr">2236 </span> <span class="subxComment"># var1/reg <- add var2</span> <span id="L2237" class="LineNr">2237 </span> <span class="subxComment"># =></span> -<span id="L2238" class="LineNr">2238 </span> <span class="subxComment"># 81 0/subop/add %eax 0x34/imm32</span> +<span id="L2238" class="LineNr">2238 </span> <span class="subxComment"># 03 *(ebp+__) var1</span> <span id="L2239" class="LineNr">2239 </span> <span class="subxComment">#</span> <span id="L2240" class="LineNr">2240 </span> <span class="subxS1Comment"># . prologue</span> <span id="L2241" class="LineNr">2241 </span> 55/push-ebp @@ -2245,196 +2245,298 @@ if ('onhashchange' in window) { <span id="L2243" class="LineNr">2243 </span> <span class="subxComment"># setup</span> <span id="L2244" class="LineNr">2244 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a>) <span id="L2245" class="LineNr">2245 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../064write-byte.subx.html#L331'>_test-output-buffered-file->buffer</a>) -<span id="L2246" class="LineNr">2246 </span> <span class="subxComment"># var-var1/ecx : var</span> -<span id="L2247" class="LineNr">2247 </span> 68/push 0/imm32/no-register -<span id="L2248" class="LineNr">2248 </span> 68/push 8/imm32/stack-offset +<span id="L2246" class="LineNr">2246 </span> <span class="subxComment"># var-var1/ecx : var in eax</span> +<span id="L2247" class="LineNr">2247 </span> 68/push <span class="Constant">"eax"</span>/imm32/register +<span id="L2248" class="LineNr">2248 </span> 68/push 0/imm32/no-stack-offset <span id="L2249" class="LineNr">2249 </span> 68/push 1/imm32/block-depth <span id="L2250" class="LineNr">2250 </span> 68/push 1/imm32/type-int <span id="L2251" class="LineNr">2251 </span> 68/push <span class="Constant">"var1"</span>/imm32 <span id="L2252" class="LineNr">2252 </span> 89/<- %ecx 4/r32/esp -<span id="L2253" class="LineNr">2253 </span> <span class="subxComment"># var-var2/edx : var literal</span> +<span id="L2253" class="LineNr">2253 </span> <span class="subxComment"># var-var2/edx : var</span> <span id="L2254" class="LineNr">2254 </span> 68/push 0/imm32/no-register -<span id="L2255" class="LineNr">2255 </span> 68/push 0/imm32/no-stack-offset +<span id="L2255" class="LineNr">2255 </span> 68/push 8/imm32/stack-offset <span id="L2256" class="LineNr">2256 </span> 68/push 1/imm32/block-depth -<span id="L2257" class="LineNr">2257 </span> 68/push 0/imm32/type-literal -<span id="L2258" class="LineNr">2258 </span> 68/push <span class="Constant">"0x34"</span>/imm32 +<span id="L2257" class="LineNr">2257 </span> 68/push 1/imm32/type-int +<span id="L2258" class="LineNr">2258 </span> 68/push <span class="Constant">"var2"</span>/imm32 <span id="L2259" class="LineNr">2259 </span> 89/<- %edx 4/r32/esp <span id="L2260" class="LineNr">2260 </span> <span class="subxComment"># inouts/esi : (list var2)</span> <span id="L2261" class="LineNr">2261 </span> 68/push 0/imm32/next <span id="L2262" class="LineNr">2262 </span> 52/push-edx/var-var2 <span id="L2263" class="LineNr">2263 </span> 89/<- %esi 4/r32/esp -<span id="L2264" class="LineNr">2264 </span> <span class="subxComment"># inouts = (list var1 inouts)</span> -<span id="L2265" class="LineNr">2265 </span> 56/push-esi/next +<span id="L2264" class="LineNr">2264 </span> <span class="subxComment"># outputs/edi : (list var1)</span> +<span id="L2265" class="LineNr">2265 </span> 68/push 0/imm32/next <span id="L2266" class="LineNr">2266 </span> 51/push-ecx/var-var1 -<span id="L2267" class="LineNr">2267 </span> 89/<- %esi 4/r32/esp +<span id="L2267" class="LineNr">2267 </span> 89/<- %edi 4/r32/esp <span id="L2268" class="LineNr">2268 </span> <span class="subxComment"># stmt/esi : statement</span> <span id="L2269" class="LineNr">2269 </span> 68/push 0/imm32/next -<span id="L2270" class="LineNr">2270 </span> 68/push 0/imm32/outputs +<span id="L2270" class="LineNr">2270 </span> 57/push-edi/outputs <span id="L2271" class="LineNr">2271 </span> 56/push-esi/inouts -<span id="L2272" class="LineNr">2272 </span> 68/push <span class="Constant">"add-to"</span>/imm32/operation +<span id="L2272" class="LineNr">2272 </span> 68/push <span class="Constant">"add"</span>/imm32/operation <span id="L2273" class="LineNr">2273 </span> 68/push 1/imm32 <span id="L2274" class="LineNr">2274 </span> 89/<- %esi 4/r32/esp <span id="L2275" class="LineNr">2275 </span> <span class="subxComment"># convert</span> <span id="L2276" class="LineNr">2276 </span> (<a href='mu.subx.html#L976'>emit-subx-statement</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a> %esi 0 <span class="SpecialChar"><a href='mu.subx.html#L1026'>Primitives</a></span> 0) <span id="L2277" class="LineNr">2277 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) -<span id="L2278" class="Folded">2278 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span> +<span id="L2278" class="Folded">2278 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------</span> <span id="L2284" class="LineNr">2284 </span> <span class="subxComment"># check output</span> -<span id="L2285" class="LineNr">2285 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"81 0/subop/add *(ebp+0x00000008) 0x34/imm32"</span> <span class="Constant">"F - test-add-literal-to-mem"</span>) +<span id="L2285" class="LineNr">2285 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"03 *(ebp+0x00000008) 0x00000000/r32"</span> <span class="Constant">"F - test-add-mem-to-reg"</span>) <span id="L2286" class="LineNr">2286 </span> <span class="subxS1Comment"># . epilogue</span> <span id="L2287" class="LineNr">2287 </span> 89/<- %esp 5/r32/ebp <span id="L2288" class="LineNr">2288 </span> 5d/pop-to-ebp <span id="L2289" class="LineNr">2289 </span> c3/return <span id="L2290" class="LineNr">2290 </span> -<span id="L2291" class="LineNr">2291 </span><span class="subxTest">test-emit-subx-statement-function-call</span>: -<span id="L2292" class="LineNr">2292 </span> <span class="subxComment"># Call a function on a variable on the stack.</span> -<span id="L2293" class="LineNr">2293 </span> <span class="subxComment"># f foo</span> -<span id="L2294" class="LineNr">2294 </span> <span class="subxComment"># =></span> -<span id="L2295" class="LineNr">2295 </span> <span class="subxComment"># (f2 *(ebp-8))</span> -<span id="L2296" class="LineNr">2296 </span> <span class="subxComment"># (Changing the function name supports overloading in general, but here it</span> -<span id="L2297" class="LineNr">2297 </span> <span class="subxComment"># just serves to help disambiguate things.)</span> -<span id="L2298" class="LineNr">2298 </span> <span class="subxComment">#</span> -<span id="L2299" class="LineNr">2299 </span> <span class="subxComment"># There's a variable on the var stack as follows:</span> -<span id="L2300" class="LineNr">2300 </span> <span class="subxComment"># name: 'foo'</span> -<span id="L2301" class="LineNr">2301 </span> <span class="subxComment"># type: int</span> -<span id="L2302" class="LineNr">2302 </span> <span class="subxComment"># stack-offset: -8</span> -<span id="L2303" class="LineNr">2303 </span> <span class="subxComment">#</span> -<span id="L2304" class="LineNr">2304 </span> <span class="subxComment"># There's nothing in primitives.</span> -<span id="L2305" class="LineNr">2305 </span> <span class="subxComment">#</span> -<span id="L2306" class="LineNr">2306 </span> <span class="subxComment"># There's a function with this info:</span> -<span id="L2307" class="LineNr">2307 </span> <span class="subxComment"># name: 'f'</span> -<span id="L2308" class="LineNr">2308 </span> <span class="subxComment"># inout: int/mem</span> -<span id="L2309" class="LineNr">2309 </span> <span class="subxComment"># value: 'f2'</span> -<span id="L2310" class="LineNr">2310 </span> <span class="subxComment">#</span> -<span id="L2311" class="LineNr">2311 </span> <span class="subxS1Comment"># . prologue</span> -<span id="L2312" class="LineNr">2312 </span> 55/push-ebp -<span id="L2313" class="LineNr">2313 </span> 89/<- %ebp 4/r32/esp -<span id="L2314" class="LineNr">2314 </span> <span class="subxComment"># setup</span> -<span id="L2315" class="LineNr">2315 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a>) -<span id="L2316" class="LineNr">2316 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../064write-byte.subx.html#L331'>_test-output-buffered-file->buffer</a>) -<span id="L2317" class="LineNr">2317 </span> <span class="subxComment"># var-foo/ecx : var</span> -<span id="L2318" class="LineNr">2318 </span> 68/push 0/imm32/no-register -<span id="L2319" class="LineNr">2319 </span> 68/push -8/imm32/stack-offset -<span id="L2320" class="LineNr">2320 </span> 68/push 0/imm32/block-depth -<span id="L2321" class="LineNr">2321 </span> 68/push 1/imm32/type-int -<span id="L2322" class="LineNr">2322 </span> 68/push <span class="Constant">"foo"</span>/imm32 -<span id="L2323" class="LineNr">2323 </span> 89/<- %ecx 4/r32/esp -<span id="L2324" class="LineNr">2324 </span> <span class="subxComment"># vars/edx = (stack 1)</span> -<span id="L2325" class="LineNr">2325 </span> 51/push-ecx/var-foo -<span id="L2326" class="LineNr">2326 </span> 68/push 1/imm32/data-length -<span id="L2327" class="LineNr">2327 </span> 68/push 1/imm32/top -<span id="L2328" class="LineNr">2328 </span> 89/<- %edx 4/r32/esp -<span id="L2329" class="LineNr">2329 </span> <span class="subxComment"># operands/esi : (list var)</span> -<span id="L2330" class="LineNr">2330 </span> 68/push 0/imm32/next -<span id="L2331" class="LineNr">2331 </span> 51/push-ecx/var-foo -<span id="L2332" class="LineNr">2332 </span> 89/<- %esi 4/r32/esp -<span id="L2333" class="LineNr">2333 </span> <span class="subxComment"># stmt/esi : statement</span> -<span id="L2334" class="LineNr">2334 </span> 68/push 0/imm32/next -<span id="L2335" class="LineNr">2335 </span> 68/push 0/imm32/outputs -<span id="L2336" class="LineNr">2336 </span> 56/push-esi/inouts -<span id="L2337" class="LineNr">2337 </span> 68/push <span class="Constant">"f"</span>/imm32/operation -<span id="L2338" class="LineNr">2338 </span> 68/push 1/imm32 -<span id="L2339" class="LineNr">2339 </span> 89/<- %esi 4/r32/esp -<span id="L2340" class="LineNr">2340 </span> <span class="subxComment"># functions/ebx : function</span> -<span id="L2341" class="LineNr">2341 </span> 68/push 0/imm32/next -<span id="L2342" class="LineNr">2342 </span> 68/push 0/imm32/body -<span id="L2343" class="LineNr">2343 </span> 68/push 0/imm32/outputs -<span id="L2344" class="LineNr">2344 </span> 51/push-ecx/inouts <span class="subxComment"># hack; in practice we won't have the same var in function definition and call</span> -<span id="L2345" class="LineNr">2345 </span> 68/push <span class="Constant">"f2"</span>/imm32/subx-name -<span id="L2346" class="LineNr">2346 </span> 68/push <span class="Constant">"f"</span>/imm32/name -<span id="L2347" class="LineNr">2347 </span> 89/<- %ebx 4/r32/esp -<span id="L2348" class="LineNr">2348 </span> <span class="subxComment"># convert</span> -<span id="L2349" class="LineNr">2349 </span> (<a href='mu.subx.html#L976'>emit-subx-statement</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a> %esi %edx 0 %ebx) -<span id="L2350" class="LineNr">2350 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) -<span id="L2351" class="Folded">2351 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span> -<span id="L2357" class="LineNr">2357 </span> <span class="subxComment"># check output</span> -<span id="L2358" class="LineNr">2358 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"(f2 *(ebp+0xfffffff8))"</span> <span class="Constant">"F - test-emit-subx-statement-function-call"</span>) -<span id="L2359" class="LineNr">2359 </span> <span class="subxS1Comment"># . epilogue</span> -<span id="L2360" class="LineNr">2360 </span> 89/<- %esp 5/r32/ebp -<span id="L2361" class="LineNr">2361 </span> 5d/pop-to-ebp -<span id="L2362" class="LineNr">2362 </span> c3/return -<span id="L2363" class="LineNr">2363 </span> -<span id="L2364" class="LineNr">2364 </span><span class="subxTest">test-emit-subx-statement-function-call-with-literal-arg</span>: -<span id="L2365" class="LineNr">2365 </span> <span class="subxComment"># Call a function on a literal.</span> -<span id="L2366" class="LineNr">2366 </span> <span class="subxComment"># f 34</span> -<span id="L2367" class="LineNr">2367 </span> <span class="subxComment"># =></span> -<span id="L2368" class="LineNr">2368 </span> <span class="subxComment"># (f2 34)</span> -<span id="L2369" class="LineNr">2369 </span> <span class="subxComment">#</span> -<span id="L2370" class="LineNr">2370 </span> <span class="subxS1Comment"># . prologue</span> -<span id="L2371" class="LineNr">2371 </span> 55/push-ebp -<span id="L2372" class="LineNr">2372 </span> 89/<- %ebp 4/r32/esp -<span id="L2373" class="LineNr">2373 </span> <span class="subxComment"># setup</span> -<span id="L2374" class="LineNr">2374 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a>) -<span id="L2375" class="LineNr">2375 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../064write-byte.subx.html#L331'>_test-output-buffered-file->buffer</a>) -<span id="L2376" class="LineNr">2376 </span> <span class="subxComment"># var-foo/ecx : literal</span> -<span id="L2377" class="LineNr">2377 </span> 68/push 0/imm32/no-register -<span id="L2378" class="LineNr">2378 </span> 68/push 0/imm32/no-stack-offset -<span id="L2379" class="LineNr">2379 </span> 68/push 0/imm32/block-depth -<span id="L2380" class="LineNr">2380 </span> 68/push 0/imm32/type-literal -<span id="L2381" class="LineNr">2381 </span> 68/push <span class="Constant">"34"</span>/imm32 -<span id="L2382" class="LineNr">2382 </span> 89/<- %ecx 4/r32/esp -<span id="L2383" class="LineNr">2383 </span> <span class="subxComment"># vars/edx = (stack 1)</span> -<span id="L2384" class="LineNr">2384 </span> 51/push-ecx/var-foo -<span id="L2385" class="LineNr">2385 </span> 68/push 1/imm32/data-length -<span id="L2386" class="LineNr">2386 </span> 68/push 1/imm32/top -<span id="L2387" class="LineNr">2387 </span> 89/<- %edx 4/r32/esp -<span id="L2388" class="LineNr">2388 </span> <span class="subxComment"># operands/esi : (list var)</span> -<span id="L2389" class="LineNr">2389 </span> 68/push 0/imm32/next -<span id="L2390" class="LineNr">2390 </span> 51/push-ecx/var-foo -<span id="L2391" class="LineNr">2391 </span> 89/<- %esi 4/r32/esp -<span id="L2392" class="LineNr">2392 </span> <span class="subxComment"># stmt/esi : statement</span> -<span id="L2393" class="LineNr">2393 </span> 68/push 0/imm32/next -<span id="L2394" class="LineNr">2394 </span> 68/push 0/imm32/outputs -<span id="L2395" class="LineNr">2395 </span> 56/push-esi/inouts -<span id="L2396" class="LineNr">2396 </span> 68/push <span class="Constant">"f"</span>/imm32/operation -<span id="L2397" class="LineNr">2397 </span> 68/push 1/imm32 -<span id="L2398" class="LineNr">2398 </span> 89/<- %esi 4/r32/esp -<span id="L2399" class="LineNr">2399 </span> <span class="subxComment"># functions/ebx : function</span> -<span id="L2400" class="LineNr">2400 </span> 68/push 0/imm32/next -<span id="L2401" class="LineNr">2401 </span> 68/push 0/imm32/body -<span id="L2402" class="LineNr">2402 </span> 68/push 0/imm32/outputs -<span id="L2403" class="LineNr">2403 </span> 51/push-ecx/inouts <span class="subxComment"># hack; in practice we won't have the same var in function definition and call</span> -<span id="L2404" class="LineNr">2404 </span> 68/push <span class="Constant">"f2"</span>/imm32/subx-name -<span id="L2405" class="LineNr">2405 </span> 68/push <span class="Constant">"f"</span>/imm32/name -<span id="L2406" class="LineNr">2406 </span> 89/<- %ebx 4/r32/esp -<span id="L2407" class="LineNr">2407 </span> <span class="subxComment"># convert</span> -<span id="L2408" class="LineNr">2408 </span> (<a href='mu.subx.html#L976'>emit-subx-statement</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a> %esi %edx 0 %ebx) -<span id="L2409" class="LineNr">2409 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) -<span id="L2410" class="Folded">2410 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span> -<span id="L2416" class="LineNr">2416 </span> <span class="subxComment"># check output</span> -<span id="L2417" class="LineNr">2417 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"(f2 34)"</span> <span class="Constant">"F - test-emit-subx-statement-function-call-with-literal-arg"</span>) -<span id="L2418" class="LineNr">2418 </span> <span class="subxS1Comment"># . epilogue</span> -<span id="L2419" class="LineNr">2419 </span> 89/<- %esp 5/r32/ebp -<span id="L2420" class="LineNr">2420 </span> 5d/pop-to-ebp -<span id="L2421" class="LineNr">2421 </span> c3/return -<span id="L2422" class="LineNr">2422 </span> -<span id="L2423" class="LineNr">2423 </span><span class="subxFunction">emit-subx-prologue</span>: <span class="subxComment"># out : (address buffered-file)</span> -<span id="L2424" class="LineNr">2424 </span> <span class="subxS1Comment"># . prologue</span> -<span id="L2425" class="LineNr">2425 </span> 55/push-ebp -<span id="L2426" class="LineNr">2426 </span> 89/<- %ebp 4/r32/esp -<span id="L2427" class="LineNr">2427 </span> <span class="subxComment">#</span> -<span id="L2428" class="LineNr">2428 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">"# . prologue\n"</span>) -<span id="L2429" class="LineNr">2429 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">"55/push-ebp\n"</span>) -<span id="L2430" class="LineNr">2430 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">"89/<- %ebp 4/r32/esp\n"</span>) -<span id="L2431" class="LineNr">2431 </span><span class="Constant">$emit-subx-prologue:end</span>: -<span id="L2432" class="LineNr">2432 </span> <span class="subxS1Comment"># . epilogue</span> -<span id="L2433" class="LineNr">2433 </span> 89/<- %esp 5/r32/ebp -<span id="L2434" class="LineNr">2434 </span> 5d/pop-to-ebp -<span id="L2435" class="LineNr">2435 </span> c3/return -<span id="L2436" class="LineNr">2436 </span> -<span id="L2437" class="LineNr">2437 </span><span class="subxFunction">emit-subx-epilogue</span>: <span class="subxComment"># out : (address buffered-file)</span> -<span id="L2438" class="LineNr">2438 </span> <span class="subxS1Comment"># . prologue</span> -<span id="L2439" class="LineNr">2439 </span> 55/push-ebp -<span id="L2440" class="LineNr">2440 </span> 89/<- %ebp 4/r32/esp -<span id="L2441" class="LineNr">2441 </span> <span class="subxComment">#</span> -<span id="L2442" class="LineNr">2442 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">"# . epilogue\n"</span>) -<span id="L2443" class="LineNr">2443 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">"89/<- %esp 5/r32/ebp\n"</span>) -<span id="L2444" class="LineNr">2444 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">"5d/pop-to-ebp\n"</span>) -<span id="L2445" class="LineNr">2445 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">"c3/return\n"</span>) -<span id="L2446" class="LineNr">2446 </span><span class="Constant">$emit-subx-epilogue:end</span>: -<span id="L2447" class="LineNr">2447 </span> <span class="subxS1Comment"># . epilogue</span> -<span id="L2448" class="LineNr">2448 </span> 89/<- %esp 5/r32/ebp -<span id="L2449" class="LineNr">2449 </span> 5d/pop-to-ebp -<span id="L2450" class="LineNr">2450 </span> c3/return +<span id="L2291" class="LineNr">2291 </span><span class="subxTest">test-add-literal-to-reg</span>: +<span id="L2292" class="LineNr">2292 </span> <span class="subxComment"># var1/eax <- add 0x34</span> +<span id="L2293" class="LineNr">2293 </span> <span class="subxComment"># =></span> +<span id="L2294" class="LineNr">2294 </span> <span class="subxComment"># 81 0/subop/add %eax 0x34/imm32</span> +<span id="L2295" class="LineNr">2295 </span> <span class="subxComment">#</span> +<span id="L2296" class="LineNr">2296 </span> <span class="subxS1Comment"># . prologue</span> +<span id="L2297" class="LineNr">2297 </span> 55/push-ebp +<span id="L2298" class="LineNr">2298 </span> 89/<- %ebp 4/r32/esp +<span id="L2299" class="LineNr">2299 </span> <span class="subxComment"># setup</span> +<span id="L2300" class="LineNr">2300 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a>) +<span id="L2301" class="LineNr">2301 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../064write-byte.subx.html#L331'>_test-output-buffered-file->buffer</a>) +<span id="L2302" class="LineNr">2302 </span> <span class="subxComment"># var-var1/ecx : var in eax</span> +<span id="L2303" class="LineNr">2303 </span> 68/push <span class="Constant">"eax"</span>/imm32/register +<span id="L2304" class="LineNr">2304 </span> 68/push 0/imm32/no-stack-offset +<span id="L2305" class="LineNr">2305 </span> 68/push 1/imm32/block-depth +<span id="L2306" class="LineNr">2306 </span> 68/push 1/imm32/type-int +<span id="L2307" class="LineNr">2307 </span> 68/push <span class="Constant">"var1"</span>/imm32 +<span id="L2308" class="LineNr">2308 </span> 89/<- %ecx 4/r32/esp +<span id="L2309" class="LineNr">2309 </span> <span class="subxComment"># var-var2/edx : var literal</span> +<span id="L2310" class="LineNr">2310 </span> 68/push 0/imm32/no-register +<span id="L2311" class="LineNr">2311 </span> 68/push 0/imm32/no-stack-offset +<span id="L2312" class="LineNr">2312 </span> 68/push 1/imm32/block-depth +<span id="L2313" class="LineNr">2313 </span> 68/push 0/imm32/type-literal +<span id="L2314" class="LineNr">2314 </span> 68/push <span class="Constant">"0x34"</span>/imm32 +<span id="L2315" class="LineNr">2315 </span> 89/<- %edx 4/r32/esp +<span id="L2316" class="LineNr">2316 </span> <span class="subxComment"># inouts/esi : (list var2)</span> +<span id="L2317" class="LineNr">2317 </span> 68/push 0/imm32/next +<span id="L2318" class="LineNr">2318 </span> 52/push-edx/var-var2 +<span id="L2319" class="LineNr">2319 </span> 89/<- %esi 4/r32/esp +<span id="L2320" class="LineNr">2320 </span> <span class="subxComment"># outputs/edi : (list var1)</span> +<span id="L2321" class="LineNr">2321 </span> 68/push 0/imm32/next +<span id="L2322" class="LineNr">2322 </span> 51/push-ecx/var-var1 +<span id="L2323" class="LineNr">2323 </span> 89/<- %edi 4/r32/esp +<span id="L2324" class="LineNr">2324 </span> <span class="subxComment"># stmt/esi : statement</span> +<span id="L2325" class="LineNr">2325 </span> 68/push 0/imm32/next +<span id="L2326" class="LineNr">2326 </span> 57/push-edi/outputs +<span id="L2327" class="LineNr">2327 </span> 56/push-esi/inouts +<span id="L2328" class="LineNr">2328 </span> 68/push <span class="Constant">"add"</span>/imm32/operation +<span id="L2329" class="LineNr">2329 </span> 68/push 1/imm32 +<span id="L2330" class="LineNr">2330 </span> 89/<- %esi 4/r32/esp +<span id="L2331" class="LineNr">2331 </span> <span class="subxComment"># convert</span> +<span id="L2332" class="LineNr">2332 </span> (<a href='mu.subx.html#L976'>emit-subx-statement</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a> %esi 0 <span class="SpecialChar"><a href='mu.subx.html#L1026'>Primitives</a></span> 0) +<span id="L2333" class="LineNr">2333 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) +<span id="L2334" class="Folded">2334 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------</span> +<span id="L2340" class="LineNr">2340 </span> <span class="subxComment"># check output</span> +<span id="L2341" class="LineNr">2341 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"81 0/subop/add %eax 0x34/imm32"</span> <span class="Constant">"F - test-add-literal-to-reg"</span>) +<span id="L2342" class="LineNr">2342 </span> <span class="subxS1Comment"># . epilogue</span> +<span id="L2343" class="LineNr">2343 </span> 89/<- %esp 5/r32/ebp +<span id="L2344" class="LineNr">2344 </span> 5d/pop-to-ebp +<span id="L2345" class="LineNr">2345 </span> c3/return +<span id="L2346" class="LineNr">2346 </span> +<span id="L2347" class="LineNr">2347 </span><span class="subxTest">test-add-literal-to-mem</span>: +<span id="L2348" class="LineNr">2348 </span> <span class="subxComment"># add-to var1, 0x34</span> +<span id="L2349" class="LineNr">2349 </span> <span class="subxComment"># =></span> +<span id="L2350" class="LineNr">2350 </span> <span class="subxComment"># 81 0/subop/add %eax 0x34/imm32</span> +<span id="L2351" class="LineNr">2351 </span> <span class="subxComment">#</span> +<span id="L2352" class="LineNr">2352 </span> <span class="subxS1Comment"># . prologue</span> +<span id="L2353" class="LineNr">2353 </span> 55/push-ebp +<span id="L2354" class="LineNr">2354 </span> 89/<- %ebp 4/r32/esp +<span id="L2355" class="LineNr">2355 </span> <span class="subxComment"># setup</span> +<span id="L2356" class="LineNr">2356 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a>) +<span id="L2357" class="LineNr">2357 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../064write-byte.subx.html#L331'>_test-output-buffered-file->buffer</a>) +<span id="L2358" class="LineNr">2358 </span> <span class="subxComment"># var-var1/ecx : var</span> +<span id="L2359" class="LineNr">2359 </span> 68/push 0/imm32/no-register +<span id="L2360" class="LineNr">2360 </span> 68/push 8/imm32/stack-offset +<span id="L2361" class="LineNr">2361 </span> 68/push 1/imm32/block-depth +<span id="L2362" class="LineNr">2362 </span> 68/push 1/imm32/type-int +<span id="L2363" class="LineNr">2363 </span> 68/push <span class="Constant">"var1"</span>/imm32 +<span id="L2364" class="LineNr">2364 </span> 89/<- %ecx 4/r32/esp +<span id="L2365" class="LineNr">2365 </span> <span class="subxComment"># var-var2/edx : var literal</span> +<span id="L2366" class="LineNr">2366 </span> 68/push 0/imm32/no-register +<span id="L2367" class="LineNr">2367 </span> 68/push 0/imm32/no-stack-offset +<span id="L2368" class="LineNr">2368 </span> 68/push 1/imm32/block-depth +<span id="L2369" class="LineNr">2369 </span> 68/push 0/imm32/type-literal +<span id="L2370" class="LineNr">2370 </span> 68/push <span class="Constant">"0x34"</span>/imm32 +<span id="L2371" class="LineNr">2371 </span> 89/<- %edx 4/r32/esp +<span id="L2372" class="LineNr">2372 </span> <span class="subxComment"># inouts/esi : (list var2)</span> +<span id="L2373" class="LineNr">2373 </span> 68/push 0/imm32/next +<span id="L2374" class="LineNr">2374 </span> 52/push-edx/var-var2 +<span id="L2375" class="LineNr">2375 </span> 89/<- %esi 4/r32/esp +<span id="L2376" class="LineNr">2376 </span> <span class="subxComment"># inouts = (list var1 inouts)</span> +<span id="L2377" class="LineNr">2377 </span> 56/push-esi/next +<span id="L2378" class="LineNr">2378 </span> 51/push-ecx/var-var1 +<span id="L2379" class="LineNr">2379 </span> 89/<- %esi 4/r32/esp +<span id="L2380" class="LineNr">2380 </span> <span class="subxComment"># stmt/esi : statement</span> +<span id="L2381" class="LineNr">2381 </span> 68/push 0/imm32/next +<span id="L2382" class="LineNr">2382 </span> 68/push 0/imm32/outputs +<span id="L2383" class="LineNr">2383 </span> 56/push-esi/inouts +<span id="L2384" class="LineNr">2384 </span> 68/push <span class="Constant">"add-to"</span>/imm32/operation +<span id="L2385" class="LineNr">2385 </span> 68/push 1/imm32 +<span id="L2386" class="LineNr">2386 </span> 89/<- %esi 4/r32/esp +<span id="L2387" class="LineNr">2387 </span> <span class="subxComment"># convert</span> +<span id="L2388" class="LineNr">2388 </span> (<a href='mu.subx.html#L976'>emit-subx-statement</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a> %esi 0 <span class="SpecialChar"><a href='mu.subx.html#L1026'>Primitives</a></span> 0) +<span id="L2389" class="LineNr">2389 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) +<span id="L2390" class="Folded">2390 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------</span> +<span id="L2396" class="LineNr">2396 </span> <span class="subxComment"># check output</span> +<span id="L2397" class="LineNr">2397 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"81 0/subop/add *(ebp+0x00000008) 0x34/imm32"</span> <span class="Constant">"F - test-add-literal-to-mem"</span>) +<span id="L2398" class="LineNr">2398 </span> <span class="subxS1Comment"># . epilogue</span> +<span id="L2399" class="LineNr">2399 </span> 89/<- %esp 5/r32/ebp +<span id="L2400" class="LineNr">2400 </span> 5d/pop-to-ebp +<span id="L2401" class="LineNr">2401 </span> c3/return +<span id="L2402" class="LineNr">2402 </span> +<span id="L2403" class="LineNr">2403 </span><span class="subxTest">test-emit-subx-statement-function-call</span>: +<span id="L2404" class="LineNr">2404 </span> <span class="subxComment"># Call a function on a variable on the stack.</span> +<span id="L2405" class="LineNr">2405 </span> <span class="subxComment"># f foo</span> +<span id="L2406" class="LineNr">2406 </span> <span class="subxComment"># =></span> +<span id="L2407" class="LineNr">2407 </span> <span class="subxComment"># (f2 *(ebp-8))</span> +<span id="L2408" class="LineNr">2408 </span> <span class="subxComment"># (Changing the function name supports overloading in general, but here it</span> +<span id="L2409" class="LineNr">2409 </span> <span class="subxComment"># just serves to help disambiguate things.)</span> +<span id="L2410" class="LineNr">2410 </span> <span class="subxComment">#</span> +<span id="L2411" class="LineNr">2411 </span> <span class="subxComment"># There's a variable on the var stack as follows:</span> +<span id="L2412" class="LineNr">2412 </span> <span class="subxComment"># name: 'foo'</span> +<span id="L2413" class="LineNr">2413 </span> <span class="subxComment"># type: int</span> +<span id="L2414" class="LineNr">2414 </span> <span class="subxComment"># stack-offset: -8</span> +<span id="L2415" class="LineNr">2415 </span> <span class="subxComment">#</span> +<span id="L2416" class="LineNr">2416 </span> <span class="subxComment"># There's nothing in primitives.</span> +<span id="L2417" class="LineNr">2417 </span> <span class="subxComment">#</span> +<span id="L2418" class="LineNr">2418 </span> <span class="subxComment"># There's a function with this info:</span> +<span id="L2419" class="LineNr">2419 </span> <span class="subxComment"># name: 'f'</span> +<span id="L2420" class="LineNr">2420 </span> <span class="subxComment"># inout: int/mem</span> +<span id="L2421" class="LineNr">2421 </span> <span class="subxComment"># value: 'f2'</span> +<span id="L2422" class="LineNr">2422 </span> <span class="subxComment">#</span> +<span id="L2423" class="LineNr">2423 </span> <span class="subxS1Comment"># . prologue</span> +<span id="L2424" class="LineNr">2424 </span> 55/push-ebp +<span id="L2425" class="LineNr">2425 </span> 89/<- %ebp 4/r32/esp +<span id="L2426" class="LineNr">2426 </span> <span class="subxComment"># setup</span> +<span id="L2427" class="LineNr">2427 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a>) +<span id="L2428" class="LineNr">2428 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../064write-byte.subx.html#L331'>_test-output-buffered-file->buffer</a>) +<span id="L2429" class="LineNr">2429 </span> <span class="subxComment"># var-foo/ecx : var</span> +<span id="L2430" class="LineNr">2430 </span> 68/push 0/imm32/no-register +<span id="L2431" class="LineNr">2431 </span> 68/push -8/imm32/stack-offset +<span id="L2432" class="LineNr">2432 </span> 68/push 0/imm32/block-depth +<span id="L2433" class="LineNr">2433 </span> 68/push 1/imm32/type-int +<span id="L2434" class="LineNr">2434 </span> 68/push <span class="Constant">"foo"</span>/imm32 +<span id="L2435" class="LineNr">2435 </span> 89/<- %ecx 4/r32/esp +<span id="L2436" class="LineNr">2436 </span> <span class="subxComment"># vars/edx = (stack 1)</span> +<span id="L2437" class="LineNr">2437 </span> 51/push-ecx/var-foo +<span id="L2438" class="LineNr">2438 </span> 68/push 1/imm32/data-length +<span id="L2439" class="LineNr">2439 </span> 68/push 1/imm32/top +<span id="L2440" class="LineNr">2440 </span> 89/<- %edx 4/r32/esp +<span id="L2441" class="LineNr">2441 </span> <span class="subxComment"># operands/esi : (list var)</span> +<span id="L2442" class="LineNr">2442 </span> 68/push 0/imm32/next +<span id="L2443" class="LineNr">2443 </span> 51/push-ecx/var-foo +<span id="L2444" class="LineNr">2444 </span> 89/<- %esi 4/r32/esp +<span id="L2445" class="LineNr">2445 </span> <span class="subxComment"># stmt/esi : statement</span> +<span id="L2446" class="LineNr">2446 </span> 68/push 0/imm32/next +<span id="L2447" class="LineNr">2447 </span> 68/push 0/imm32/outputs +<span id="L2448" class="LineNr">2448 </span> 56/push-esi/inouts +<span id="L2449" class="LineNr">2449 </span> 68/push <span class="Constant">"f"</span>/imm32/operation +<span id="L2450" class="LineNr">2450 </span> 68/push 1/imm32 +<span id="L2451" class="LineNr">2451 </span> 89/<- %esi 4/r32/esp +<span id="L2452" class="LineNr">2452 </span> <span class="subxComment"># functions/ebx : function</span> +<span id="L2453" class="LineNr">2453 </span> 68/push 0/imm32/next +<span id="L2454" class="LineNr">2454 </span> 68/push 0/imm32/body +<span id="L2455" class="LineNr">2455 </span> 68/push 0/imm32/outputs +<span id="L2456" class="LineNr">2456 </span> 51/push-ecx/inouts <span class="subxComment"># hack; in practice we won't have the same var in function definition and call</span> +<span id="L2457" class="LineNr">2457 </span> 68/push <span class="Constant">"f2"</span>/imm32/subx-name +<span id="L2458" class="LineNr">2458 </span> 68/push <span class="Constant">"f"</span>/imm32/name +<span id="L2459" class="LineNr">2459 </span> 89/<- %ebx 4/r32/esp +<span id="L2460" class="LineNr">2460 </span> <span class="subxComment"># convert</span> +<span id="L2461" class="LineNr">2461 </span> (<a href='mu.subx.html#L976'>emit-subx-statement</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a> %esi %edx 0 %ebx) +<span id="L2462" class="LineNr">2462 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) +<span id="L2463" class="Folded">2463 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------</span> +<span id="L2469" class="LineNr">2469 </span> <span class="subxComment"># check output</span> +<span id="L2470" class="LineNr">2470 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"(f2 *(ebp+0xfffffff8))"</span> <span class="Constant">"F - test-emit-subx-statement-function-call"</span>) +<span id="L2471" class="LineNr">2471 </span> <span class="subxS1Comment"># . epilogue</span> +<span id="L2472" class="LineNr">2472 </span> 89/<- %esp 5/r32/ebp +<span id="L2473" class="LineNr">2473 </span> 5d/pop-to-ebp +<span id="L2474" class="LineNr">2474 </span> c3/return +<span id="L2475" class="LineNr">2475 </span> +<span id="L2476" class="LineNr">2476 </span><span class="subxTest">test-emit-subx-statement-function-call-with-literal-arg</span>: +<span id="L2477" class="LineNr">2477 </span> <span class="subxComment"># Call a function on a literal.</span> +<span id="L2478" class="LineNr">2478 </span> <span class="subxComment"># f 34</span> +<span id="L2479" class="LineNr">2479 </span> <span class="subxComment"># =></span> +<span id="L2480" class="LineNr">2480 </span> <span class="subxComment"># (f2 34)</span> +<span id="L2481" class="LineNr">2481 </span> <span class="subxComment">#</span> +<span id="L2482" class="LineNr">2482 </span> <span class="subxS1Comment"># . prologue</span> +<span id="L2483" class="LineNr">2483 </span> 55/push-ebp +<span id="L2484" class="LineNr">2484 </span> 89/<- %ebp 4/r32/esp +<span id="L2485" class="LineNr">2485 </span> <span class="subxComment"># setup</span> +<span id="L2486" class="LineNr">2486 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a>) +<span id="L2487" class="LineNr">2487 </span> (<a href='../055stream.subx.html#L17'>clear-stream</a> <a href='../064write-byte.subx.html#L331'>_test-output-buffered-file->buffer</a>) +<span id="L2488" class="LineNr">2488 </span> <span class="subxComment"># var-foo/ecx : literal</span> +<span id="L2489" class="LineNr">2489 </span> 68/push 0/imm32/no-register +<span id="L2490" class="LineNr">2490 </span> 68/push 0/imm32/no-stack-offset +<span id="L2491" class="LineNr">2491 </span> 68/push 0/imm32/block-depth +<span id="L2492" class="LineNr">2492 </span> 68/push 0/imm32/type-literal +<span id="L2493" class="LineNr">2493 </span> 68/push <span class="Constant">"34"</span>/imm32 +<span id="L2494" class="LineNr">2494 </span> 89/<- %ecx 4/r32/esp +<span id="L2495" class="LineNr">2495 </span> <span class="subxComment"># vars/edx = (stack 1)</span> +<span id="L2496" class="LineNr">2496 </span> 51/push-ecx/var-foo +<span id="L2497" class="LineNr">2497 </span> 68/push 1/imm32/data-length +<span id="L2498" class="LineNr">2498 </span> 68/push 1/imm32/top +<span id="L2499" class="LineNr">2499 </span> 89/<- %edx 4/r32/esp +<span id="L2500" class="LineNr">2500 </span> <span class="subxComment"># operands/esi : (list var)</span> +<span id="L2501" class="LineNr">2501 </span> 68/push 0/imm32/next +<span id="L2502" class="LineNr">2502 </span> 51/push-ecx/var-foo +<span id="L2503" class="LineNr">2503 </span> 89/<- %esi 4/r32/esp +<span id="L2504" class="LineNr">2504 </span> <span class="subxComment"># stmt/esi : statement</span> +<span id="L2505" class="LineNr">2505 </span> 68/push 0/imm32/next +<span id="L2506" class="LineNr">2506 </span> 68/push 0/imm32/outputs +<span id="L2507" class="LineNr">2507 </span> 56/push-esi/inouts +<span id="L2508" class="LineNr">2508 </span> 68/push <span class="Constant">"f"</span>/imm32/operation +<span id="L2509" class="LineNr">2509 </span> 68/push 1/imm32 +<span id="L2510" class="LineNr">2510 </span> 89/<- %esi 4/r32/esp +<span id="L2511" class="LineNr">2511 </span> <span class="subxComment"># functions/ebx : function</span> +<span id="L2512" class="LineNr">2512 </span> 68/push 0/imm32/next +<span id="L2513" class="LineNr">2513 </span> 68/push 0/imm32/body +<span id="L2514" class="LineNr">2514 </span> 68/push 0/imm32/outputs +<span id="L2515" class="LineNr">2515 </span> 51/push-ecx/inouts <span class="subxComment"># hack; in practice we won't have the same var in function definition and call</span> +<span id="L2516" class="LineNr">2516 </span> 68/push <span class="Constant">"f2"</span>/imm32/subx-name +<span id="L2517" class="LineNr">2517 </span> 68/push <span class="Constant">"f"</span>/imm32/name +<span id="L2518" class="LineNr">2518 </span> 89/<- %ebx 4/r32/esp +<span id="L2519" class="LineNr">2519 </span> <span class="subxComment"># convert</span> +<span id="L2520" class="LineNr">2520 </span> (<a href='mu.subx.html#L976'>emit-subx-statement</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a> %esi %edx 0 %ebx) +<span id="L2521" class="LineNr">2521 </span> (<a href='../064write-byte.subx.html#L81'>flush</a> <a href='../064write-byte.subx.html#L328'>_test-output-buffered-file</a>) +<span id="L2522" class="Folded">2522 </span><span class="Folded">+-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------</span> +<span id="L2528" class="LineNr">2528 </span> <span class="subxComment"># check output</span> +<span id="L2529" class="LineNr">2529 </span> (<a href='../058stream-equal.subx.html#L563'>check-next-stream-line-equal</a> <a href='../064write-byte.subx.html#L286'>_test-output-stream</a> <span class="Constant">"(f2 34)"</span> <span class="Constant">"F - test-emit-subx-statement-function-call-with-literal-arg"</span>) +<span id="L2530" class="LineNr">2530 </span> <span class="subxS1Comment"># . epilogue</span> +<span id="L2531" class="LineNr">2531 </span> 89/<- %esp 5/r32/ebp +<span id="L2532" class="LineNr">2532 </span> 5d/pop-to-ebp +<span id="L2533" class="LineNr">2533 </span> c3/return +<span id="L2534" class="LineNr">2534 </span> +<span id="L2535" class="LineNr">2535 </span><span class="subxFunction">emit-subx-prologue</span>: <span class="subxComment"># out : (address buffered-file)</span> +<span id="L2536" class="LineNr">2536 </span> <span class="subxS1Comment"># . prologue</span> +<span id="L2537" class="LineNr">2537 </span> 55/push-ebp +<span id="L2538" class="LineNr">2538 </span> 89/<- %ebp 4/r32/esp +<span id="L2539" class="LineNr">2539 </span> <span class="subxComment">#</span> +<span id="L2540" class="LineNr">2540 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">"# . prologue\n"</span>) +<span id="L2541" class="LineNr">2541 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">"55/push-ebp\n"</span>) +<span id="L2542" class="LineNr">2542 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">"89/<- %ebp 4/r32/esp\n"</span>) +<span id="L2543" class="LineNr">2543 </span><span class="Constant">$emit-subx-prologue:end</span>: +<span id="L2544" class="LineNr">2544 </span> <span class="subxS1Comment"># . epilogue</span> +<span id="L2545" class="LineNr">2545 </span> 89/<- %esp 5/r32/ebp +<span id="L2546" class="LineNr">2546 </span> 5d/pop-to-ebp +<span id="L2547" class="LineNr">2547 </span> c3/return +<span id="L2548" class="LineNr">2548 </span> +<span id="L2549" class="LineNr">2549 </span><span class="subxFunction">emit-subx-epilogue</span>: <span class="subxComment"># out : (address buffered-file)</span> +<span id="L2550" class="LineNr">2550 </span> <span class="subxS1Comment"># . prologue</span> +<span id="L2551" class="LineNr">2551 </span> 55/push-ebp +<span id="L2552" class="LineNr">2552 </span> 89/<- %ebp 4/r32/esp +<span id="L2553" class="LineNr">2553 </span> <span class="subxComment">#</span> +<span id="L2554" class="LineNr">2554 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">"# . epilogue\n"</span>) +<span id="L2555" class="LineNr">2555 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">"89/<- %esp 5/r32/ebp\n"</span>) +<span id="L2556" class="LineNr">2556 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">"5d/pop-to-ebp\n"</span>) +<span id="L2557" class="LineNr">2557 </span> (<a href='../065write-buffered.subx.html#L8'>write-buffered</a> *(ebp+8) <span class="Constant">"c3/return\n"</span>) +<span id="L2558" class="LineNr">2558 </span><span class="Constant">$emit-subx-epilogue:end</span>: +<span id="L2559" class="LineNr">2559 </span> <span class="subxS1Comment"># . epilogue</span> +<span id="L2560" class="LineNr">2560 </span> 89/<- %esp 5/r32/ebp +<span id="L2561" class="LineNr">2561 </span> 5d/pop-to-ebp +<span id="L2562" class="LineNr">2562 </span> c3/return </pre> </body> </html> |