diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-11-16 20:44:02 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-11-16 20:44:02 -0800 |
commit | dd60a1d73c8017fd3d80ccf91e4549fc47a90760 (patch) | |
tree | 2b0e24d15102aa7dd53284511371c0f579c14bbe /html/apps/tile/value.mu.html | |
parent | 3d31467c0dae1d879111901635d257353aae27c9 (diff) | |
download | mu-dd60a1d73c8017fd3d80ccf91e4549fc47a90760.tar.gz |
7252
Diffstat (limited to 'html/apps/tile/value.mu.html')
-rw-r--r-- | html/apps/tile/value.mu.html | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/html/apps/tile/value.mu.html b/html/apps/tile/value.mu.html index e982b2bd..6a14baf9 100644 --- a/html/apps/tile/value.mu.html +++ b/html/apps/tile/value.mu.html @@ -57,9 +57,9 @@ if ('onhashchange' in window) { <body onload='JumpToLine();'> <a href='https://github.com/akkartik/mu/blob/master/apps/tile/value.mu'>https://github.com/akkartik/mu/blob/master/apps/tile/value.mu</a> <pre id='vimCodeElement'> -<span id="L1" class="LineNr"> 1 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L1'>render-value-at</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), row: int, col: int, _val: (addr value), max-width: int <span class="Delimiter">{</span> +<span id="L1" class="LineNr"> 1 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L1'>render-value-at</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), row: int, col: int, _val: (addr <a href='data.mu.html#L37'>value</a>), max-width: int <span class="Delimiter">{</span> <span id="L2" class="LineNr"> 2 </span> <a href='../../405screen.mu.html#L109'>move-cursor</a> <a href='../../405screen.mu.html#L9'>screen</a>, row, col -<span id="L3" class="LineNr"> 3 </span> <span class="PreProc">var</span> val/<span class="Constant">esi</span>: (addr value) <span class="SpecialChar"><-</span> copy _val +<span id="L3" class="LineNr"> 3 </span> <span class="PreProc">var</span> val/<span class="Constant">esi</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> copy _val <span id="L4" class="LineNr"> 4 </span> <span class="PreProc">var</span> val-type/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar"><-</span> <a href='../../131table.subx.html#L26'>get</a> val, <span class="PreProc">type</span> <span id="L5" class="LineNr"> 5 </span> <span class="muComment"># per-type rendering logic goes here</span> <span id="L6" class="LineNr"> 6 </span> compare *val-type, <span class="Constant">1</span> <span class="muComment"># string</span> @@ -90,8 +90,8 @@ if ('onhashchange' in window) { <span id="L31" class="LineNr"> 31 </span> compare *val-type, <span class="Constant">2</span> <span class="muComment"># array</span> <span id="L32" class="LineNr"> 32 </span> <span class="Delimiter">{</span> <span id="L33" class="LineNr"> 33 </span> <span class="PreProc">break-if-!=</span> -<span id="L34" class="LineNr"> 34 </span> <span class="PreProc">var</span> val-ah/<span class="Constant">eax</span>: (addr handle array value) <span class="SpecialChar"><-</span> <a href='../../131table.subx.html#L26'>get</a> val, array-data -<span id="L35" class="LineNr"> 35 </span> <span class="PreProc">var</span> val-array/<span class="Constant">eax</span>: (addr array value) <span class="SpecialChar"><-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *val-ah +<span id="L34" class="LineNr"> 34 </span> <span class="PreProc">var</span> val-ah/<span class="Constant">eax</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> <a href='../../131table.subx.html#L26'>get</a> val, array-data +<span id="L35" class="LineNr"> 35 </span> <span class="PreProc">var</span> val-array/<span class="Constant">eax</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *val-ah <span id="L36" class="LineNr"> 36 </span> <a href='value.mu.html#L98'>render-array-at</a> <a href='../../405screen.mu.html#L9'>screen</a>, row, col, val-array <span id="L37" class="LineNr"> 37 </span> <span class="PreProc">return</span> <span id="L38" class="LineNr"> 38 </span> <span class="Delimiter">}</span> @@ -154,24 +154,24 @@ if ('onhashchange' in window) { <span id="L95" class="LineNr"> 95 </span><span class="Delimiter">}</span> <span id="L96" class="LineNr"> 96 </span><span class="Delimiter">}</span> <span id="L97" class="LineNr"> 97 </span> -<span id="L98" class="LineNr"> 98 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L98'>render-array-at</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), row: int, col: int, _a: (addr array value) <span class="Delimiter">{</span> +<span id="L98" class="LineNr"> 98 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L98'>render-array-at</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), row: int, col: int, _a: (addr array <a href='data.mu.html#L37'>value</a>) <span class="Delimiter">{</span> <span id="L99" class="LineNr"> 99 </span> <a href='../../405screen.mu.html#L508'>start-color</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0xf2</span>, <span class="Constant">7</span> <span id="L100" class="LineNr">100 </span> <span class="muComment"># don't surround in spaces</span> <span id="L101" class="LineNr">101 </span> <a href='../../405screen.mu.html#L210'>print-grapheme</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x5b</span> <span class="muComment"># '['</span> <span id="L102" class="LineNr">102 </span> increment col -<span id="L103" class="LineNr">103 </span> <span class="PreProc">var</span> a/<span class="Constant">esi</span>: (addr array value) <span class="SpecialChar"><-</span> copy _a -<span id="L104" class="LineNr">104 </span> <span class="PreProc">var</span> max/<span class="Constant">ecx</span>: int <span class="SpecialChar"><-</span> length a +<span id="L103" class="LineNr">103 </span> <span class="PreProc">var</span> a/<span class="Constant">esi</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> copy _a +<span id="L104" class="LineNr">104 </span> <span class="PreProc">var</span> <a href='surface.mu.html#L209'>max</a>/<span class="Constant">ecx</span>: int <span class="SpecialChar"><-</span> length a <span id="L105" class="LineNr">105 </span> <span class="PreProc">var</span> i/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> copy <span class="Constant">0</span> <span id="L106" class="LineNr">106 </span> <span class="Delimiter">{</span> -<span id="L107" class="LineNr">107 </span> compare i, max +<span id="L107" class="LineNr">107 </span> compare i, <a href='surface.mu.html#L209'>max</a> <span id="L108" class="LineNr">108 </span> <span class="PreProc">break-if->=</span> <span id="L109" class="LineNr">109 </span> <span class="Delimiter">{</span> <span id="L110" class="LineNr">110 </span> compare i, <span class="Constant">0</span> <span id="L111" class="LineNr">111 </span> <span class="PreProc">break-if-=</span> <span id="L112" class="LineNr">112 </span> <a href='../../405screen.mu.html#L169'>print-string</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">" "</span> <span id="L113" class="LineNr">113 </span> <span class="Delimiter">}</span> -<span id="L114" class="LineNr">114 </span> <span class="PreProc">var</span> off/<span class="Constant">ecx</span>: (offset value) <span class="SpecialChar"><-</span> compute-offset a, i -<span id="L115" class="LineNr">115 </span> <span class="PreProc">var</span> x/<span class="Constant">ecx</span>: (addr value) <span class="SpecialChar"><-</span> index a, off +<span id="L114" class="LineNr">114 </span> <span class="PreProc">var</span> off/<span class="Constant">ecx</span>: (offset <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> compute-offset a, i +<span id="L115" class="LineNr">115 </span> <span class="PreProc">var</span> x/<span class="Constant">ecx</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> index a, off <span id="L116" class="LineNr">116 </span> <a href='value.mu.html#L1'>render-value-at</a> <a href='../../405screen.mu.html#L9'>screen</a>, row, col, x, <span class="Constant">0</span> <span id="L117" class="LineNr">117 </span> <span class="Delimiter">{</span> <span id="L118" class="LineNr">118 </span> <span class="PreProc">var</span> w/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> <a href='value.mu.html#L216'>value-width</a> x, <span class="Constant">0</span> @@ -216,8 +216,8 @@ if ('onhashchange' in window) { <span id="L157" class="LineNr">157 </span><span class="Delimiter">}</span> <span id="L158" class="LineNr">158 </span> <span id="L159" class="LineNr">159 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L159'>hash-color</a></span> val: int<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span> -<span id="L160" class="LineNr">160 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> <a href='../../406try-divide.mu.html#L87'>try-modulo</a> val, <span class="Constant">7</span> <span class="muComment"># assumes that 7 is always the background color</span> -<span id="L161" class="LineNr">161 </span> <span class="PreProc">return</span> result +<span id="L160" class="LineNr">160 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> <a href='../../406try-divide.mu.html#L87'>try-modulo</a> val, <span class="Constant">7</span> <span class="muComment"># assumes that 7 is always the background color</span> +<span id="L161" class="LineNr">161 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a> <span id="L162" class="LineNr">162 </span><span class="Delimiter">}</span> <span id="L163" class="LineNr">163 </span> <span id="L164" class="LineNr">164 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L164'>print-screen-cell-of-fake-screen</a></span> <a href='../../405screen.mu.html#L9'>screen</a>: (addr <a href='../../405screen.mu.html#L9'>screen</a>), _target: (addr <a href='../../405screen.mu.html#L9'>screen</a>), _row: int, _col: int <span class="Delimiter">{</span> @@ -272,15 +272,15 @@ if ('onhashchange' in window) { <span id="L213" class="LineNr">213 </span> <a href='../../405screen.mu.html#L431'>print-code-point</a> <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0x2518</span> <span class="muComment"># bottom-right corner</span> <span id="L214" class="LineNr">214 </span><span class="Delimiter">}</span> <span id="L215" class="LineNr">215 </span> -<span id="L216" class="LineNr">216 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L216'>value-width</a></span> _v: (addr value), top-level: boolean<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span> -<span id="L217" class="LineNr">217 </span> <span class="PreProc">var</span> v/<span class="Constant">esi</span>: (addr value) <span class="SpecialChar"><-</span> copy _v +<span id="L216" class="LineNr">216 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L216'>value-width</a></span> _v: (addr <a href='data.mu.html#L37'>value</a>), top-level: boolean<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span> +<span id="L217" class="LineNr">217 </span> <span class="PreProc">var</span> v/<span class="Constant">esi</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> copy _v <span id="L218" class="LineNr">218 </span> <span class="PreProc">var</span> <span class="PreProc">type</span>/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar"><-</span> <a href='../../131table.subx.html#L26'>get</a> v, <span class="PreProc">type</span> <span id="L219" class="LineNr">219 </span> <span class="Delimiter">{</span> <span id="L220" class="LineNr">220 </span> compare *<span class="PreProc">type</span>, <span class="Constant">0</span> <span class="muComment"># int</span> <span id="L221" class="LineNr">221 </span> <span class="PreProc">break-if-!=</span> <span id="L222" class="LineNr">222 </span> <span class="PreProc">var</span> v-int/<span class="Constant">edx</span>: (addr int) <span class="SpecialChar"><-</span> <a href='../../131table.subx.html#L26'>get</a> v, int-data -<span id="L223" class="LineNr">223 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> <a href='../../311decimal-int.subx.html#L300'>decimal-size</a> *v-int -<span id="L224" class="LineNr">224 </span> <span class="PreProc">return</span> result +<span id="L223" class="LineNr">223 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> <a href='../../311decimal-int.subx.html#L300'>decimal-size</a> *v-int +<span id="L224" class="LineNr">224 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a> <span id="L225" class="LineNr">225 </span> <span class="Delimiter">}</span> <span id="L226" class="LineNr">226 </span> <span class="Delimiter">{</span> <span id="L227" class="LineNr">227 </span> compare *<span class="PreProc">type</span>, <span class="Constant">1</span> <span class="muComment"># string</span> @@ -289,11 +289,11 @@ if ('onhashchange' in window) { <span id="L230" class="LineNr">230 </span> <span class="PreProc">var</span> s/<span class="Constant">eax</span>: (addr array byte) <span class="SpecialChar"><-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *s-ah <span id="L231" class="LineNr">231 </span> compare s, <span class="Constant">0</span> <span id="L232" class="LineNr">232 </span> <span class="PreProc">break-if-=</span> -<span id="L233" class="LineNr">233 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> length s -<span id="L234" class="LineNr">234 </span> compare result, <span class="Constant">0xd</span> <span class="muComment"># max string size</span> +<span id="L233" class="LineNr">233 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> length s +<span id="L234" class="LineNr">234 </span> compare <a href='data.mu.html#L70'>result</a>, <span class="Constant">0xd</span> <span class="muComment"># max string size</span> <span id="L235" class="LineNr">235 </span> <span class="Delimiter">{</span> <span id="L236" class="LineNr">236 </span> <span class="PreProc">break-if-<=</span> -<span id="L237" class="LineNr">237 </span> result <span class="SpecialChar"><-</span> copy <span class="Constant">0xd</span> +<span id="L237" class="LineNr">237 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar"><-</span> copy <span class="Constant">0xd</span> <span id="L238" class="LineNr">238 </span> <span class="Delimiter">}</span> <span id="L239" class="LineNr">239 </span> <span class="muComment"># if it's a nested string, include space for quotes</span> <span id="L240" class="LineNr">240 </span> <span class="muComment"># we don't do this for the top-level, where the quotes will overflow</span> @@ -301,19 +301,19 @@ if ('onhashchange' in window) { <span id="L242" class="LineNr">242 </span> compare top-level, <span class="Constant">0</span> <span class="muComment"># false</span> <span id="L243" class="LineNr">243 </span> <span class="Delimiter">{</span> <span id="L244" class="LineNr">244 </span> <span class="PreProc">break-if-!=</span> -<span id="L245" class="LineNr">245 </span> result <span class="SpecialChar"><-</span> add <span class="Constant">2</span> +<span id="L245" class="LineNr">245 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar"><-</span> add <span class="Constant">2</span> <span id="L246" class="LineNr">246 </span> <span class="Delimiter">}</span> -<span id="L247" class="LineNr">247 </span> <span class="PreProc">return</span> result +<span id="L247" class="LineNr">247 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a> <span id="L248" class="LineNr">248 </span> <span class="Delimiter">}</span> <span id="L249" class="LineNr">249 </span> <span class="Delimiter">{</span> <span id="L250" class="LineNr">250 </span> compare *<span class="PreProc">type</span>, <span class="Constant">2</span> <span class="muComment"># array</span> <span id="L251" class="LineNr">251 </span> <span class="PreProc">break-if-!=</span> -<span id="L252" class="LineNr">252 </span> <span class="PreProc">var</span> a-ah/<span class="Constant">eax</span>: (addr handle array value) <span class="SpecialChar"><-</span> <a href='../../131table.subx.html#L26'>get</a> v, array-data -<span id="L253" class="LineNr">253 </span> <span class="PreProc">var</span> a/<span class="Constant">eax</span>: (addr array value) <span class="SpecialChar"><-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *a-ah +<span id="L252" class="LineNr">252 </span> <span class="PreProc">var</span> a-ah/<span class="Constant">eax</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> <a href='../../131table.subx.html#L26'>get</a> v, array-data +<span id="L253" class="LineNr">253 </span> <span class="PreProc">var</span> a/<span class="Constant">eax</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *a-ah <span id="L254" class="LineNr">254 </span> compare a, <span class="Constant">0</span> <span id="L255" class="LineNr">255 </span> <span class="PreProc">break-if-=</span> -<span id="L256" class="LineNr">256 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> <a href='value.mu.html#L285'>array-width</a> a -<span id="L257" class="LineNr">257 </span> <span class="PreProc">return</span> result +<span id="L256" class="LineNr">256 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> <a href='value.mu.html#L285'>array-width</a> a +<span id="L257" class="LineNr">257 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a> <span id="L258" class="LineNr">258 </span> <span class="Delimiter">}</span> <span id="L259" class="LineNr">259 </span> <span class="Delimiter">{</span> <span id="L260" class="LineNr">260 </span> compare *<span class="PreProc">type</span>, <span class="Constant">3</span> <span class="muComment"># file handle</span> @@ -333,43 +333,43 @@ if ('onhashchange' in window) { <span id="L274" class="LineNr">274 </span> compare <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0</span> <span id="L275" class="LineNr">275 </span> <span class="PreProc">break-if-=</span> <span id="L276" class="LineNr">276 </span> <span class="PreProc">var</span> ncols/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar"><-</span> <a href='../../131table.subx.html#L26'>get</a> <a href='../../405screen.mu.html#L9'>screen</a>, num-cols -<span id="L277" class="LineNr">277 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> copy *ncols -<span id="L278" class="LineNr">278 </span> result <span class="SpecialChar"><-</span> add <span class="Constant">2</span> <span class="muComment"># left/right margins</span> +<span id="L277" class="LineNr">277 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> copy *ncols +<span id="L278" class="LineNr">278 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar"><-</span> add <span class="Constant">2</span> <span class="muComment"># left/right margins</span> <span id="L279" class="LineNr">279 </span> <span class="PreProc">return</span> *ncols <span id="L280" class="LineNr">280 </span> <span class="Delimiter">}</span> <span id="L281" class="LineNr">281 </span> <span class="PreProc">return</span> <span class="Constant">0</span> <span id="L282" class="LineNr">282 </span><span class="Delimiter">}</span> <span id="L283" class="LineNr">283 </span> <span id="L284" class="LineNr">284 </span><span class="muComment"># keep sync'd with render-array-at</span> -<span id="L285" class="LineNr">285 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L285'>array-width</a></span> _a: (addr array value)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span> -<span id="L286" class="LineNr">286 </span> <span class="PreProc">var</span> a/<span class="Constant">esi</span>: (addr array value) <span class="SpecialChar"><-</span> copy _a -<span id="L287" class="LineNr">287 </span> <span class="PreProc">var</span> max/<span class="Constant">ecx</span>: int <span class="SpecialChar"><-</span> length a +<span id="L285" class="LineNr">285 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L285'>array-width</a></span> _a: (addr array <a href='data.mu.html#L37'>value</a>)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span> +<span id="L286" class="LineNr">286 </span> <span class="PreProc">var</span> a/<span class="Constant">esi</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> copy _a +<span id="L287" class="LineNr">287 </span> <span class="PreProc">var</span> <a href='surface.mu.html#L209'>max</a>/<span class="Constant">ecx</span>: int <span class="SpecialChar"><-</span> length a <span id="L288" class="LineNr">288 </span> <span class="PreProc">var</span> i/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> copy <span class="Constant">0</span> -<span id="L289" class="LineNr">289 </span> <span class="PreProc">var</span> result/<span class="Constant">edi</span>: int <span class="SpecialChar"><-</span> copy <span class="Constant">0</span> +<span id="L289" class="LineNr">289 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">edi</span>: int <span class="SpecialChar"><-</span> copy <span class="Constant">0</span> <span id="L290" class="LineNr">290 </span> <span class="Delimiter">{</span> -<span id="L291" class="LineNr">291 </span> compare i, max +<span id="L291" class="LineNr">291 </span> compare i, <a href='surface.mu.html#L209'>max</a> <span id="L292" class="LineNr">292 </span> <span class="PreProc">break-if->=</span> <span id="L293" class="LineNr">293 </span> <span class="Delimiter">{</span> <span id="L294" class="LineNr">294 </span> compare i, <span class="Constant">0</span> <span id="L295" class="LineNr">295 </span> <span class="PreProc">break-if-=</span> -<span id="L296" class="LineNr">296 </span> result <span class="SpecialChar"><-</span> increment <span class="muComment"># for space</span> +<span id="L296" class="LineNr">296 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar"><-</span> increment <span class="muComment"># for space</span> <span id="L297" class="LineNr">297 </span> <span class="Delimiter">}</span> -<span id="L298" class="LineNr">298 </span> <span class="PreProc">var</span> off/<span class="Constant">ecx</span>: (offset value) <span class="SpecialChar"><-</span> compute-offset a, i -<span id="L299" class="LineNr">299 </span> <span class="PreProc">var</span> x/<span class="Constant">ecx</span>: (addr value) <span class="SpecialChar"><-</span> index a, off +<span id="L298" class="LineNr">298 </span> <span class="PreProc">var</span> off/<span class="Constant">ecx</span>: (offset <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> compute-offset a, i +<span id="L299" class="LineNr">299 </span> <span class="PreProc">var</span> x/<span class="Constant">ecx</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> index a, off <span id="L300" class="LineNr">300 </span> <span class="Delimiter">{</span> <span id="L301" class="LineNr">301 </span> <span class="PreProc">var</span> w/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> <a href='value.mu.html#L216'>value-width</a> x, <span class="Constant">0</span> -<span id="L302" class="LineNr">302 </span> result <span class="SpecialChar"><-</span> add w +<span id="L302" class="LineNr">302 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar"><-</span> add w <span id="L303" class="LineNr">303 </span> <span class="Delimiter">}</span> <span id="L304" class="LineNr">304 </span> i <span class="SpecialChar"><-</span> increment <span id="L305" class="LineNr">305 </span> <span class="PreProc">loop</span> <span id="L306" class="LineNr">306 </span> <span class="Delimiter">}</span> <span id="L307" class="LineNr">307 </span> <span class="muComment"># we won't add 2 for surrounding brackets since we don't surround arrays in</span> <span id="L308" class="LineNr">308 </span> <span class="muComment"># spaces like other value types</span> -<span id="L309" class="LineNr">309 </span> <span class="PreProc">return</span> result +<span id="L309" class="LineNr">309 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a> <span id="L310" class="LineNr">310 </span><span class="Delimiter">}</span> <span id="L311" class="LineNr">311 </span> -<span id="L312" class="LineNr">312 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L312'>value-height</a></span> _v: (addr value)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span> -<span id="L313" class="LineNr">313 </span> <span class="PreProc">var</span> v/<span class="Constant">esi</span>: (addr value) <span class="SpecialChar"><-</span> copy _v +<span id="L312" class="LineNr">312 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L312'>value-height</a></span> _v: (addr <a href='data.mu.html#L37'>value</a>)<span class="PreProc"> -> </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span> +<span id="L313" class="LineNr">313 </span> <span class="PreProc">var</span> v/<span class="Constant">esi</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> copy _v <span id="L314" class="LineNr">314 </span> <span class="PreProc">var</span> <span class="PreProc">type</span>/<span class="Constant">eax</span>: (addr int) <span class="SpecialChar"><-</span> <a href='../../131table.subx.html#L26'>get</a> v, <span class="PreProc">type</span> <span id="L315" class="LineNr">315 </span> <span class="Delimiter">{</span> <span id="L316" class="LineNr">316 </span> compare *<span class="PreProc">type</span>, <span class="Constant">3</span> <span class="muComment"># file handle</span> @@ -385,17 +385,17 @@ if ('onhashchange' in window) { <span id="L326" class="LineNr">326 </span> compare <a href='../../405screen.mu.html#L9'>screen</a>, <span class="Constant">0</span> <span id="L327" class="LineNr">327 </span> <span class="PreProc">break-if-=</span> <span id="L328" class="LineNr">328 </span> <span class="PreProc">var</span> nrows/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar"><-</span> <a href='../../131table.subx.html#L26'>get</a> <a href='../../405screen.mu.html#L9'>screen</a>, num-rows -<span id="L329" class="LineNr">329 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> copy *nrows -<span id="L330" class="LineNr">330 </span> result <span class="SpecialChar"><-</span> add <span class="Constant">2</span> <span class="muComment"># top and bottom border</span> -<span id="L331" class="LineNr">331 </span> <span class="PreProc">return</span> result +<span id="L329" class="LineNr">329 </span> <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> copy *nrows +<span id="L330" class="LineNr">330 </span> <a href='data.mu.html#L70'>result</a> <span class="SpecialChar"><-</span> add <span class="Constant">2</span> <span class="muComment"># top and bottom border</span> +<span id="L331" class="LineNr">331 </span> <span class="PreProc">return</span> <a href='data.mu.html#L70'>result</a> <span id="L332" class="LineNr">332 </span> <span class="Delimiter">}</span> <span id="L333" class="LineNr">333 </span> <span class="PreProc">return</span> <span class="Constant">1</span> <span id="L334" class="LineNr">334 </span><span class="Delimiter">}</span> <span id="L335" class="LineNr">335 </span> -<span id="L336" class="LineNr">336 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L336'>deep-copy-value</a></span> _src: (addr value), _dest: (addr value) <span class="Delimiter">{</span> +<span id="L336" class="LineNr">336 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='value.mu.html#L336'>deep-copy-value</a></span> _src: (addr <a href='data.mu.html#L37'>value</a>), _dest: (addr <a href='data.mu.html#L37'>value</a>) <span class="Delimiter">{</span> <span id="L337" class="LineNr">337 </span><span class="CommentedCode">#? print-string 0, "deep-copy-value\n"</span> -<span id="L338" class="LineNr">338 </span> <span class="PreProc">var</span> src/<span class="Constant">esi</span>: (addr value) <span class="SpecialChar"><-</span> copy _src -<span id="L339" class="LineNr">339 </span> <span class="PreProc">var</span> dest/<span class="Constant">edi</span>: (addr value) <span class="SpecialChar"><-</span> copy _dest +<span id="L338" class="LineNr">338 </span> <span class="PreProc">var</span> src/<span class="Constant">esi</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> copy _src +<span id="L339" class="LineNr">339 </span> <span class="PreProc">var</span> dest/<span class="Constant">edi</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> copy _dest <span id="L340" class="LineNr">340 </span> <span class="PreProc">var</span> <span class="PreProc">type</span>/<span class="Constant">ebx</span>: (addr int) <span class="SpecialChar"><-</span> <a href='../../131table.subx.html#L26'>get</a> src, <span class="PreProc">type</span> <span id="L341" class="LineNr">341 </span> <span class="PreProc">var</span> y/<span class="Constant">ecx</span>: (addr int) <span class="SpecialChar"><-</span> <a href='../../131table.subx.html#L26'>get</a> dest, <span class="PreProc">type</span> <span id="L342" class="LineNr">342 </span> copy-object <span class="PreProc">type</span>, y @@ -422,22 +422,22 @@ if ('onhashchange' in window) { <span id="L363" class="LineNr">363 </span> <span class="Delimiter">{</span> <span id="L364" class="LineNr">364 </span> <span class="PreProc">break-if-!=</span> <span id="L365" class="LineNr">365 </span><span class="CommentedCode">#? print-string 0, "array value\n"</span> -<span id="L366" class="LineNr">366 </span> <span class="PreProc">var</span> src-ah/<span class="Constant">eax</span>: (addr handle array value) <span class="SpecialChar"><-</span> <a href='../../131table.subx.html#L26'>get</a> src, array-data -<span id="L367" class="LineNr">367 </span> <span class="PreProc">var</span> _src/<span class="Constant">eax</span>: (addr array value) <span class="SpecialChar"><-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *src-ah -<span id="L368" class="LineNr">368 </span> <span class="PreProc">var</span> src/<span class="Constant">esi</span>: (addr array value) <span class="SpecialChar"><-</span> copy _src +<span id="L366" class="LineNr">366 </span> <span class="PreProc">var</span> src-ah/<span class="Constant">eax</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> <a href='../../131table.subx.html#L26'>get</a> src, array-data +<span id="L367" class="LineNr">367 </span> <span class="PreProc">var</span> _src/<span class="Constant">eax</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *src-ah +<span id="L368" class="LineNr">368 </span> <span class="PreProc">var</span> src/<span class="Constant">esi</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> copy _src <span id="L369" class="LineNr">369 </span> <span class="PreProc">var</span> n/<span class="Constant">ecx</span>: int <span class="SpecialChar"><-</span> length src -<span id="L370" class="LineNr">370 </span> <span class="PreProc">var</span> dest-ah/<span class="Constant">edx</span>: (addr handle array value) <span class="SpecialChar"><-</span> <a href='../../131table.subx.html#L26'>get</a> dest, array-data +<span id="L370" class="LineNr">370 </span> <span class="PreProc">var</span> dest-ah/<span class="Constant">edx</span>: (addr handle array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> <a href='../../131table.subx.html#L26'>get</a> dest, array-data <span id="L371" class="LineNr">371 </span> populate dest-ah, n -<span id="L372" class="LineNr">372 </span> <span class="PreProc">var</span> _dest/<span class="Constant">eax</span>: (addr array value) <span class="SpecialChar"><-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *dest-ah -<span id="L373" class="LineNr">373 </span> <span class="PreProc">var</span> dest/<span class="Constant">edi</span>: (addr array value) <span class="SpecialChar"><-</span> copy _dest +<span id="L372" class="LineNr">372 </span> <span class="PreProc">var</span> _dest/<span class="Constant">eax</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *dest-ah +<span id="L373" class="LineNr">373 </span> <span class="PreProc">var</span> dest/<span class="Constant">edi</span>: (addr array <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> copy _dest <span id="L374" class="LineNr">374 </span> <span class="PreProc">var</span> i/<span class="Constant">eax</span>: int <span class="SpecialChar"><-</span> copy <span class="Constant">0</span> <span id="L375" class="LineNr">375 </span> <span class="Delimiter">{</span> <span id="L376" class="LineNr">376 </span> compare i, n <span id="L377" class="LineNr">377 </span> <span class="PreProc">break-if->=</span> <span id="L378" class="LineNr">378 </span> <span class="Delimiter">{</span> -<span id="L379" class="LineNr">379 </span> <span class="PreProc">var</span> offset/<span class="Constant">edx</span>: (offset value) <span class="SpecialChar"><-</span> compute-offset src, i -<span id="L380" class="LineNr">380 </span> <span class="PreProc">var</span> src-element/<span class="Constant">eax</span>: (addr value) <span class="SpecialChar"><-</span> index src, offset -<span id="L381" class="LineNr">381 </span> <span class="PreProc">var</span> dest-element/<span class="Constant">ecx</span>: (addr value) <span class="SpecialChar"><-</span> index dest, offset +<span id="L379" class="LineNr">379 </span> <span class="PreProc">var</span> offset/<span class="Constant">edx</span>: (offset <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> compute-offset src, i +<span id="L380" class="LineNr">380 </span> <span class="PreProc">var</span> src-element/<span class="Constant">eax</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> index src, offset +<span id="L381" class="LineNr">381 </span> <span class="PreProc">var</span> dest-element/<span class="Constant">ecx</span>: (addr <a href='data.mu.html#L37'>value</a>) <span class="SpecialChar"><-</span> index dest, offset <span id="L382" class="LineNr">382 </span> <a href='value.mu.html#L336'>deep-copy-value</a> src-element, dest-element <span id="L383" class="LineNr">383 </span> <span class="Delimiter">}</span> <span id="L384" class="LineNr">384 </span> i <span class="SpecialChar"><-</span> increment |