about summary refs log tree commit diff stats
path: root/html/apps/tile/rpn.mu.html
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-12-01 00:33:12 -0800
committerKartik Agaram <vc@akkartik.com>2020-12-01 00:33:12 -0800
commit8bb5d26cf13efae2574cd8a2afea1812f4216539 (patch)
treeea9be60111034dc9aa833959d36adce6fff51935 /html/apps/tile/rpn.mu.html
parenta06611f35cf39d201fb2581c81e56c7a8b7ddee6 (diff)
downloadmu-8bb5d26cf13efae2574cd8a2afea1812f4216539.tar.gz
7311
Diffstat (limited to 'html/apps/tile/rpn.mu.html')
-rw-r--r--html/apps/tile/rpn.mu.html40
1 files changed, 20 insertions, 20 deletions
diff --git a/html/apps/tile/rpn.mu.html b/html/apps/tile/rpn.mu.html
index 02d74cf5..afb4d47f 100644
--- a/html/apps/tile/rpn.mu.html
+++ b/html/apps/tile/rpn.mu.html
@@ -70,7 +70,7 @@ if ('onhashchange' in window) {
 <span id="L10" class="LineNr"> 10 </span>    compare curr, <span class="Constant">0</span>
 <span id="L11" class="LineNr"> 11 </span>    <span class="PreProc">break-if-=</span>
 <span id="L12" class="LineNr"> 12 </span>    <span class="muComment"># update curr-stream</span>
-<span id="L13" class="LineNr"> 13 </span>    <a href='word.mu.html#L502'>emit-word</a> curr, curr-stream
+<span id="L13" class="LineNr"> 13 </span>    <a href='word.mu.html#L501'>emit-word</a> curr, curr-stream
 <span id="L14" class="LineNr"> 14 </span><span class="CommentedCode">#?     print-string-to-real-screen &quot;eval: &quot;</span>
 <span id="L15" class="LineNr"> 15 </span><span class="CommentedCode">#?     print-stream-to-real-screen curr-stream</span>
 <span id="L16" class="LineNr"> 16 </span><span class="CommentedCode">#?     print-string-to-real-screen &quot;\n&quot;</span>
@@ -699,10 +699,10 @@ if ('onhashchange' in window) {
 <span id="L639" class="LineNr">639 </span>        <span class="PreProc">var</span> callee-h: (handle <a href='data.mu.html#L14'>function</a>)
 <span id="L640" class="LineNr">640 </span>        <span class="PreProc">var</span> callee-ah/<span class="Constant">eax</span>: (addr handle <a href='data.mu.html#L14'>function</a>) <span class="SpecialChar">&lt;-</span> address callee-h
 <span id="L641" class="LineNr">641 </span>        <a href='rpn.mu.html#L774'>find-function</a> functions, curr-stream, callee-ah
-<span id="L642" class="LineNr">642 </span>        <span class="PreProc">var</span> <a href='environment.mu.html#L1379'>callee</a>/<span class="Constant">eax</span>: (addr <a href='data.mu.html#L14'>function</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *callee-ah
-<span id="L643" class="LineNr">643 </span>        compare <a href='environment.mu.html#L1379'>callee</a>, <span class="Constant">0</span>
+<span id="L642" class="LineNr">642 </span>        <span class="PreProc">var</span> <a href='environment.mu.html#L1387'>callee</a>/<span class="Constant">eax</span>: (addr <a href='data.mu.html#L14'>function</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *callee-ah
+<span id="L643" class="LineNr">643 </span>        compare <a href='environment.mu.html#L1387'>callee</a>, <span class="Constant">0</span>
 <span id="L644" class="LineNr">644 </span>        <span class="PreProc">break-if-=</span>
-<span id="L645" class="LineNr">645 </span>        <a href='rpn.mu.html#L795'>perform-call</a> <a href='environment.mu.html#L1379'>callee</a>, out, functions
+<span id="L645" class="LineNr">645 </span>        <a href='rpn.mu.html#L795'>perform-call</a> <a href='environment.mu.html#L1387'>callee</a>, out, functions
 <span id="L646" class="LineNr">646 </span>        <span class="PreProc">break</span> $evaluate:process-word
 <span id="L647" class="LineNr">647 </span>      <span class="Delimiter">}</span>
 <span id="L648" class="LineNr">648 </span>      <span class="muComment">### if it's a name, push its value</span>
@@ -753,7 +753,7 @@ if ('onhashchange' in window) {
 <span id="L693" class="LineNr">693 </span>        <span class="PreProc">var</span> input/<span class="Constant">eax</span>: (addr array byte) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *input-ah
 <span id="L694" class="LineNr">694 </span>        <span class="PreProc">var</span> h2: (handle array int)
 <span id="L695" class="LineNr">695 </span>        <span class="PreProc">var</span> int-array-ah/<span class="Constant">esi</span>: (addr handle array int) <span class="SpecialChar">&lt;-</span> address h2
-<span id="L696" class="LineNr">696 </span>        <a href='../../311decimal-int.subx.html#L611'>parse-array-of-decimal-ints</a> input, int-array-ah  <span class="muComment"># leak</span>
+<span id="L696" class="LineNr">696 </span>        <a href='../../311decimal-int.subx.html#L623'>parse-array-of-decimal-ints</a> input, int-array-ah  <span class="muComment"># leak</span>
 <span id="L697" class="LineNr">697 </span>        <span class="PreProc">var</span> _int-array/<span class="Constant">eax</span>: (addr array int) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *int-array-ah
 <span id="L698" class="LineNr">698 </span>        <span class="PreProc">var</span> int-array/<span class="Constant">esi</span>: (addr array int) <span class="SpecialChar">&lt;-</span> copy _int-array
 <span id="L699" class="LineNr">699 </span>        <span class="PreProc">var</span> len/<span class="Constant">ebx</span>: int <span class="SpecialChar">&lt;-</span> length int-array
@@ -810,13 +810,13 @@ if ('onhashchange' in window) {
 <span id="L750" class="LineNr">750 </span>  <span class="PreProc">var</span> line-storage: <a href='data.mu.html#L22'>line</a>
 <span id="L751" class="LineNr">751 </span>  <span class="PreProc">var</span> <a href='data.mu.html#L22'>line</a>/<span class="Constant">esi</span>: (addr <a href='data.mu.html#L22'>line</a>) <span class="SpecialChar">&lt;-</span> address line-storage
 <span id="L752" class="LineNr">752 </span>  <span class="PreProc">var</span> first-word-ah/<span class="Constant">eax</span>: (addr handle <a href='data.mu.html#L30'>word</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> line-storage, data
-<span id="L753" class="LineNr">753 </span>  <a href='word.mu.html#L20'>allocate-word-with</a> first-word-ah, <span class="Constant">&quot;3&quot;</span>
-<span id="L754" class="LineNr">754 </span>  <a href='word.mu.html#L30'>append-word-with</a> *first-word-ah, <span class="Constant">&quot;=a&quot;</span>
+<span id="L753" class="LineNr">753 </span>  <a href='word.mu.html#L19'>allocate-word-with</a> first-word-ah, <span class="Constant">&quot;3&quot;</span>
+<span id="L754" class="LineNr">754 </span>  <a href='word.mu.html#L29'>append-word-with</a> *first-word-ah, <span class="Constant">&quot;=a&quot;</span>
 <span id="L755" class="LineNr">755 </span>  <span class="PreProc">var</span> next-line-ah/<span class="Constant">eax</span>: (addr handle <a href='data.mu.html#L22'>line</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> line-storage, next
 <span id="L756" class="LineNr">756 </span>  <a href='../../120allocate.subx.html#L66'>allocate</a> next-line-ah
 <span id="L757" class="LineNr">757 </span>  <span class="PreProc">var</span> next-line/<span class="Constant">eax</span>: (addr <a href='data.mu.html#L22'>line</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *next-line-ah
 <span id="L758" class="LineNr">758 </span>  <span class="PreProc">var</span> first-word-ah/<span class="Constant">eax</span>: (addr handle <a href='data.mu.html#L30'>word</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> next-line, data
-<span id="L759" class="LineNr">759 </span>  <a href='word.mu.html#L20'>allocate-word-with</a> first-word-ah, <span class="Constant">&quot;a&quot;</span>
+<span id="L759" class="LineNr">759 </span>  <a href='word.mu.html#L19'>allocate-word-with</a> first-word-ah, <span class="Constant">&quot;a&quot;</span>
 <span id="L760" class="LineNr">760 </span>  <span class="PreProc">var</span> functions-storage: (handle <a href='data.mu.html#L14'>function</a>)
 <span id="L761" class="LineNr">761 </span>  <span class="PreProc">var</span> functions/<span class="Constant">ecx</span>: (addr handle <a href='data.mu.html#L14'>function</a>) <span class="SpecialChar">&lt;-</span> address functions-storage
 <span id="L762" class="LineNr">762 </span>  <span class="PreProc">var</span> table-storage: <a href='data.mu.html#L47'>table</a>
@@ -853,14 +853,14 @@ if ('onhashchange' in window) {
 <span id="L793" class="LineNr">793 </span><span class="Delimiter">}</span>
 <span id="L794" class="LineNr">794 </span>
 <span id="L795" class="LineNr">795 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='rpn.mu.html#L795'>perform-call</a></span> _callee: (addr <a href='data.mu.html#L14'>function</a>), caller-stack: (addr <a href='value-stack.mu.html#L3'>value-stack</a>), functions: (addr handle <a href='data.mu.html#L14'>function</a>) <span class="Delimiter">{</span>
-<span id="L796" class="LineNr">796 </span>  <span class="PreProc">var</span> <a href='environment.mu.html#L1379'>callee</a>/<span class="Constant">ecx</span>: (addr <a href='data.mu.html#L14'>function</a>) <span class="SpecialChar">&lt;-</span> copy _callee
+<span id="L796" class="LineNr">796 </span>  <span class="PreProc">var</span> <a href='environment.mu.html#L1387'>callee</a>/<span class="Constant">ecx</span>: (addr <a href='data.mu.html#L14'>function</a>) <span class="SpecialChar">&lt;-</span> copy _callee
 <span id="L797" class="LineNr">797 </span>  <span class="muComment"># create bindings for args</span>
 <span id="L798" class="LineNr">798 </span>  <span class="PreProc">var</span> table-storage: <a href='data.mu.html#L47'>table</a>
 <span id="L799" class="LineNr">799 </span>  <span class="PreProc">var</span> <a href='data.mu.html#L47'>table</a>/<span class="Constant">esi</span>: (addr <a href='data.mu.html#L47'>table</a>) <span class="SpecialChar">&lt;-</span> address table-storage
 <span id="L800" class="LineNr">800 </span>  <a href='table.mu.html#L1'>initialize-table</a> <a href='data.mu.html#L47'>table</a>, <span class="Constant">0x10</span>
-<span id="L801" class="LineNr">801 </span>  <a href='rpn.mu.html#L828'>bind-args</a> <a href='environment.mu.html#L1379'>callee</a>, caller-stack, <a href='data.mu.html#L47'>table</a>
+<span id="L801" class="LineNr">801 </span>  <a href='rpn.mu.html#L828'>bind-args</a> <a href='environment.mu.html#L1387'>callee</a>, caller-stack, <a href='data.mu.html#L47'>table</a>
 <span id="L802" class="LineNr">802 </span>  <span class="muComment"># obtain body</span>
-<span id="L803" class="LineNr">803 </span>  <span class="PreProc">var</span> body-ah/<span class="Constant">eax</span>: (addr handle <a href='data.mu.html#L22'>line</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> <a href='environment.mu.html#L1379'>callee</a>, body
+<span id="L803" class="LineNr">803 </span>  <span class="PreProc">var</span> body-ah/<span class="Constant">eax</span>: (addr handle <a href='data.mu.html#L22'>line</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> <a href='environment.mu.html#L1387'>callee</a>, body
 <span id="L804" class="LineNr">804 </span>  <span class="PreProc">var</span> body/<span class="Constant">eax</span>: (addr <a href='data.mu.html#L22'>line</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *body-ah
 <span id="L805" class="LineNr">805 </span>  <span class="muComment"># perform call</span>
 <span id="L806" class="LineNr">806 </span>  <span class="PreProc">var</span> stack-storage: <a href='value-stack.mu.html#L3'>value-stack</a>
@@ -886,8 +886,8 @@ if ('onhashchange' in window) {
 <span id="L826" class="LineNr">826 </span><span class="muComment"># pop args from the caller-stack and bind them to successive args</span>
 <span id="L827" class="LineNr">827 </span><span class="muComment"># implies: function args are stored in reverse order</span>
 <span id="L828" class="LineNr">828 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='rpn.mu.html#L828'>bind-args</a></span> _callee: (addr <a href='data.mu.html#L14'>function</a>), _caller-stack: (addr <a href='value-stack.mu.html#L3'>value-stack</a>), <a href='data.mu.html#L47'>table</a>: (addr <a href='data.mu.html#L47'>table</a>) <span class="Delimiter">{</span>
-<span id="L829" class="LineNr">829 </span>  <span class="PreProc">var</span> <a href='environment.mu.html#L1379'>callee</a>/<span class="Constant">ecx</span>: (addr <a href='data.mu.html#L14'>function</a>) <span class="SpecialChar">&lt;-</span> copy _callee
-<span id="L830" class="LineNr">830 </span>  <span class="PreProc">var</span> curr-arg-ah/<span class="Constant">eax</span>: (addr handle <a href='data.mu.html#L30'>word</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> <a href='environment.mu.html#L1379'>callee</a>, args
+<span id="L829" class="LineNr">829 </span>  <span class="PreProc">var</span> <a href='environment.mu.html#L1387'>callee</a>/<span class="Constant">ecx</span>: (addr <a href='data.mu.html#L14'>function</a>) <span class="SpecialChar">&lt;-</span> copy _callee
+<span id="L830" class="LineNr">830 </span>  <span class="PreProc">var</span> curr-arg-ah/<span class="Constant">eax</span>: (addr handle <a href='data.mu.html#L30'>word</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> <a href='environment.mu.html#L1387'>callee</a>, args
 <span id="L831" class="LineNr">831 </span>  <span class="PreProc">var</span> curr-arg/<span class="Constant">eax</span>: (addr <a href='data.mu.html#L30'>word</a>) <span class="SpecialChar">&lt;-</span> <a href='../../120allocate.subx.html#L256'>lookup</a> *curr-arg-ah
 <span id="L832" class="LineNr">832 </span>  <span class="muComment">#</span>
 <span id="L833" class="LineNr">833 </span>  <span class="PreProc">var</span> curr-key-storage: (handle array byte)
@@ -896,7 +896,7 @@ if ('onhashchange' in window) {
 <span id="L836" class="LineNr">836 </span>    compare curr-arg, <span class="Constant">0</span>
 <span id="L837" class="LineNr">837 </span>    <span class="PreProc">break-if-=</span>
 <span id="L838" class="LineNr">838 </span>    <span class="muComment"># create binding</span>
-<span id="L839" class="LineNr">839 </span>    <a href='word.mu.html#L509'>word-to-string</a> curr-arg, curr-key
+<span id="L839" class="LineNr">839 </span>    <a href='word.mu.html#L508'>word-to-string</a> curr-arg, curr-key
 <span id="L840" class="LineNr">840 </span>    <span class="Delimiter">{</span>
 <span id="L841" class="LineNr">841 </span>      <span class="muComment"># pop target-val from caller-stack</span>
 <span id="L842" class="LineNr">842 </span>      <span class="PreProc">var</span> caller-stack/<span class="Constant">esi</span>: (addr <a href='value-stack.mu.html#L3'>value-stack</a>) <span class="SpecialChar">&lt;-</span> copy _caller-stack
@@ -921,29 +921,29 @@ if ('onhashchange' in window) {
 <span id="L861" class="LineNr">861 </span>
 <span id="L862" class="LineNr">862 </span><span class="muComment"># Copy of 'simplify' that just tracks the maximum stack depth needed</span>
 <span id="L863" class="LineNr">863 </span><span class="muComment"># Doesn't actually need to simulate the stack, since every word has a predictable effect.</span>
-<span id="L864" class="LineNr">864 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='rpn.mu.html#L864'>max-stack-depth</a></span> <a href='word.mu.html#L115'>first-word</a>: (addr <a href='data.mu.html#L30'>word</a>), <a href='word.mu.html#L130'>final-word</a>: (addr <a href='data.mu.html#L30'>word</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">edi</span>: int <span class="Delimiter">{</span>
-<span id="L865" class="LineNr">865 </span>  <span class="PreProc">var</span> curr-word/<span class="Constant">eax</span>: (addr <a href='data.mu.html#L30'>word</a>) <span class="SpecialChar">&lt;-</span> copy <a href='word.mu.html#L115'>first-word</a>
+<span id="L864" class="LineNr">864 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='rpn.mu.html#L864'>max-stack-depth</a></span> <a href='word.mu.html#L114'>first-word</a>: (addr <a href='data.mu.html#L30'>word</a>), <a href='word.mu.html#L129'>final-word</a>: (addr <a href='data.mu.html#L30'>word</a>)<span class="PreProc"> -&gt; </span>_/<span class="Constant">edi</span>: int <span class="Delimiter">{</span>
+<span id="L865" class="LineNr">865 </span>  <span class="PreProc">var</span> curr-word/<span class="Constant">eax</span>: (addr <a href='data.mu.html#L30'>word</a>) <span class="SpecialChar">&lt;-</span> copy <a href='word.mu.html#L114'>first-word</a>
 <span id="L866" class="LineNr">866 </span>  <span class="PreProc">var</span> curr-depth/<span class="Constant">ecx</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
 <span id="L867" class="LineNr">867 </span>  <span class="PreProc">var</span> <a href='data.mu.html#L70'>result</a>/<span class="Constant">edi</span>: int <span class="SpecialChar">&lt;-</span> copy <span class="Constant">0</span>
 <span id="L868" class="LineNr">868 </span>  $max-stack-depth:<span class="PreProc">loop</span>: <span class="Delimiter">{</span>
 <span id="L869" class="LineNr">869 </span>    $max-stack-depth:process-word: <span class="Delimiter">{</span>
 <span id="L870" class="LineNr">870 </span>      <span class="muComment"># handle operators</span>
 <span id="L871" class="LineNr">871 </span>      <span class="Delimiter">{</span>
-<span id="L872" class="LineNr">872 </span>        <span class="PreProc">var</span> is-add?/<span class="Constant">eax</span>: boolean <span class="SpecialChar">&lt;-</span> <a href='word.mu.html#L99'>word-equal?</a> curr-word, <span class="Constant">&quot;+&quot;</span>
+<span id="L872" class="LineNr">872 </span>        <span class="PreProc">var</span> is-add?/<span class="Constant">eax</span>: boolean <span class="SpecialChar">&lt;-</span> <a href='word.mu.html#L98'>word-equal?</a> curr-word, <span class="Constant">&quot;+&quot;</span>
 <span id="L873" class="LineNr">873 </span>        compare is-add?, <span class="Constant">0</span>
 <span id="L874" class="LineNr">874 </span>        <span class="PreProc">break-if-=</span>
 <span id="L875" class="LineNr">875 </span>        curr-depth <span class="SpecialChar">&lt;-</span> decrement
 <span id="L876" class="LineNr">876 </span>        <span class="PreProc">break</span> $max-stack-depth:process-word
 <span id="L877" class="LineNr">877 </span>      <span class="Delimiter">}</span>
 <span id="L878" class="LineNr">878 </span>      <span class="Delimiter">{</span>
-<span id="L879" class="LineNr">879 </span>        <span class="PreProc">var</span> is-sub?/<span class="Constant">eax</span>: boolean <span class="SpecialChar">&lt;-</span> <a href='word.mu.html#L99'>word-equal?</a> curr-word, <span class="Constant">&quot;-&quot;</span>
+<span id="L879" class="LineNr">879 </span>        <span class="PreProc">var</span> is-sub?/<span class="Constant">eax</span>: boolean <span class="SpecialChar">&lt;-</span> <a href='word.mu.html#L98'>word-equal?</a> curr-word, <span class="Constant">&quot;-&quot;</span>
 <span id="L880" class="LineNr">880 </span>        compare is-sub?, <span class="Constant">0</span>
 <span id="L881" class="LineNr">881 </span>        <span class="PreProc">break-if-=</span>
 <span id="L882" class="LineNr">882 </span>        curr-depth <span class="SpecialChar">&lt;-</span> decrement
 <span id="L883" class="LineNr">883 </span>        <span class="PreProc">break</span> $max-stack-depth:process-word
 <span id="L884" class="LineNr">884 </span>      <span class="Delimiter">}</span>
 <span id="L885" class="LineNr">885 </span>      <span class="Delimiter">{</span>
-<span id="L886" class="LineNr">886 </span>        <span class="PreProc">var</span> is-mul?/<span class="Constant">eax</span>: boolean <span class="SpecialChar">&lt;-</span> <a href='word.mu.html#L99'>word-equal?</a> curr-word, <span class="Constant">&quot;*&quot;</span>
+<span id="L886" class="LineNr">886 </span>        <span class="PreProc">var</span> is-mul?/<span class="Constant">eax</span>: boolean <span class="SpecialChar">&lt;-</span> <a href='word.mu.html#L98'>word-equal?</a> curr-word, <span class="Constant">&quot;*&quot;</span>
 <span id="L887" class="LineNr">887 </span>        compare is-mul?, <span class="Constant">0</span>
 <span id="L888" class="LineNr">888 </span>        <span class="PreProc">break-if-=</span>
 <span id="L889" class="LineNr">889 </span>        curr-depth <span class="SpecialChar">&lt;-</span> decrement
@@ -959,7 +959,7 @@ if ('onhashchange' in window) {
 <span id="L899" class="LineNr">899 </span>      <span class="Delimiter">}</span>
 <span id="L900" class="LineNr">900 </span>    <span class="Delimiter">}</span>
 <span id="L901" class="LineNr">901 </span>    <span class="muComment"># if curr-word == final-word break</span>
-<span id="L902" class="LineNr">902 </span>    compare curr-word, <a href='word.mu.html#L130'>final-word</a>
+<span id="L902" class="LineNr">902 </span>    compare curr-word, <a href='word.mu.html#L129'>final-word</a>
 <span id="L903" class="LineNr">903 </span>    <span class="PreProc">break-if-=</span>
 <span id="L904" class="LineNr">904 </span>    <span class="muComment"># curr-word = curr-word-&gt;next</span>
 <span id="L905" class="LineNr">905 </span>    <span class="PreProc">var</span> next-word-ah/<span class="Constant">edx</span>: (addr handle <a href='data.mu.html#L30'>word</a>) <span class="SpecialChar">&lt;-</span> <a href='../../131table.subx.html#L26'>get</a> curr-word, next