diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-03-05 23:19:50 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-03-05 23:19:50 -0800 |
commit | 35870198e2356ee55e662fac97d88ba6b0137042 (patch) | |
tree | a77c92054a93057f4c643b70677a28b8a4b4c2c5 | |
parent | e06ff621795cccdae9c512b1a1734ec80196b634 (diff) | |
download | mu-35870198e2356ee55e662fac97d88ba6b0137042.tar.gz |
3755
-rw-r--r-- | html/022arithmetic.cc.html | 81 | ||||
-rw-r--r-- | html/043space.cc.html | 2 |
2 files changed, 53 insertions, 30 deletions
diff --git a/html/022arithmetic.cc.html b/html/022arithmetic.cc.html index 4c483ad9..b4c29d2f 100644 --- a/html/022arithmetic.cc.html +++ b/html/022arithmetic.cc.html @@ -824,42 +824,65 @@ if ('onhashchange' in window) { <span id="L762" class="LineNr">762 </span><span class="traceContains">+mem: storing -12 in location 1</span> <span id="L763" class="LineNr">763 </span> <span id="L764" class="LineNr">764 </span><span class="Delimiter">:(before "End Primitive Recipe Declarations")</span> -<span id="L765" class="LineNr">765 </span>CHARACTER_TO_CODE<span class="Delimiter">,</span> +<span id="L765" class="LineNr">765 </span>SQUARE_ROOT<span class="Delimiter">,</span> <span id="L766" class="LineNr">766 </span><span class="Delimiter">:(before "End Primitive Recipe Numbers")</span> -<span id="L767" class="LineNr">767 </span><a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"character-to-code"</span><span class="Delimiter">,</span> CHARACTER_TO_CODE<span class="Delimiter">);</span> +<span id="L767" class="LineNr">767 </span><a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"square-root"</span><span class="Delimiter">,</span> SQUARE_ROOT<span class="Delimiter">);</span> <span id="L768" class="LineNr">768 </span><span class="Delimiter">:(before "End Primitive Recipe Checks")</span> -<span id="L769" class="LineNr">769 </span><span class="Normal">case</span> CHARACTER_TO_CODE: <span class="Delimiter">{</span> +<span id="L769" class="LineNr">769 </span><span class="Normal">case</span> SQUARE_ROOT: <span class="Delimiter">{</span> <span id="L770" class="LineNr">770 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">)</span> != <span class="Constant">1</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L771" class="LineNr">771 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"'character-to-code' requires exactly one ingredient, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L771" class="LineNr">771 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"'square-root' requires exactly one ingredient, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L772" class="LineNr">772 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L773" class="LineNr">773 </span> <span class="Delimiter">}</span> -<span id="L774" class="LineNr">774 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_mu_character<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> -<span id="L775" class="LineNr">775 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"first ingredient of 'character-to-code' should be a character, but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L774" class="LineNr">774 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_mu_number<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> +<span id="L775" class="LineNr">775 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"first ingredient of 'square-root' should be a number, but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L776" class="LineNr">776 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L777" class="LineNr">777 </span> <span class="Delimiter">}</span> -<span id="L778" class="LineNr">778 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">)</span> != <span class="Constant">1</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L779" class="LineNr">779 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"'character-to-code' requires exactly one product, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L780" class="LineNr">780 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L781" class="LineNr">781 </span> <span class="Delimiter">}</span> -<span id="L782" class="LineNr">782 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_mu_number<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> -<span id="L783" class="LineNr">783 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"first product of 'character-to-code' should be a number, but got '"</span> << inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L784" class="LineNr">784 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L785" class="LineNr">785 </span> <span class="Delimiter">}</span> -<span id="L786" class="LineNr">786 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L787" class="LineNr">787 </span><span class="Delimiter">}</span> -<span id="L788" class="LineNr">788 </span><span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> -<span id="L789" class="LineNr">789 </span><span class="Normal">case</span> CHARACTER_TO_CODE: <span class="Delimiter">{</span> -<span id="L790" class="LineNr">790 </span> <span class="Normal">double</span> result = <span class="Constant">0</span><span class="Delimiter">;</span> -<span id="L791" class="LineNr">791 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L792" class="LineNr">792 </span> result += ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L793" class="LineNr">793 </span> <span class="Delimiter">}</span> -<span id="L794" class="LineNr">794 </span> products<span class="Delimiter">.</span>resize<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> -<span id="L795" class="LineNr">795 </span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>result<span class="Delimiter">);</span> -<span id="L796" class="LineNr">796 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L797" class="LineNr">797 </span><span class="Delimiter">}</span> -<span id="L798" class="LineNr">798 </span> -<span id="L799" class="LineNr">799 </span><span class="Delimiter">:(before "End Includes")</span> -<span id="L800" class="LineNr">800 </span><span class="PreProc">#include </span><span class="Constant"><math.h></span> +<span id="L778" class="LineNr">778 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L779" class="LineNr">779 </span><span class="Delimiter">}</span> +<span id="L780" class="LineNr">780 </span><span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> +<span id="L781" class="LineNr">781 </span><span class="Normal">case</span> SQUARE_ROOT: <span class="Delimiter">{</span> +<span id="L782" class="LineNr">782 </span> products<span class="Delimiter">.</span>resize<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> +<span id="L783" class="LineNr">783 </span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>sqrt<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)));</span> +<span id="L784" class="LineNr">784 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L785" class="LineNr">785 </span><span class="Delimiter">}</span> +<span id="L786" class="LineNr">786 </span> +<span id="L787" class="LineNr">787 </span><span class="Delimiter">:(before "End Primitive Recipe Declarations")</span> +<span id="L788" class="LineNr">788 </span>CHARACTER_TO_CODE<span class="Delimiter">,</span> +<span id="L789" class="LineNr">789 </span><span class="Delimiter">:(before "End Primitive Recipe Numbers")</span> +<span id="L790" class="LineNr">790 </span><a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"character-to-code"</span><span class="Delimiter">,</span> CHARACTER_TO_CODE<span class="Delimiter">);</span> +<span id="L791" class="LineNr">791 </span><span class="Delimiter">:(before "End Primitive Recipe Checks")</span> +<span id="L792" class="LineNr">792 </span><span class="Normal">case</span> CHARACTER_TO_CODE: <span class="Delimiter">{</span> +<span id="L793" class="LineNr">793 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">)</span> != <span class="Constant">1</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L794" class="LineNr">794 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"'character-to-code' requires exactly one ingredient, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L795" class="LineNr">795 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L796" class="LineNr">796 </span> <span class="Delimiter">}</span> +<span id="L797" class="LineNr">797 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_mu_character<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> +<span id="L798" class="LineNr">798 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"first ingredient of 'character-to-code' should be a character, but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L799" class="LineNr">799 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L800" class="LineNr">800 </span> <span class="Delimiter">}</span> +<span id="L801" class="LineNr">801 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">)</span> != <span class="Constant">1</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L802" class="LineNr">802 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"'character-to-code' requires exactly one product, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L803" class="LineNr">803 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L804" class="LineNr">804 </span> <span class="Delimiter">}</span> +<span id="L805" class="LineNr">805 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_mu_number<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> +<span id="L806" class="LineNr">806 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"first product of 'character-to-code' should be a number, but got '"</span> << inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L807" class="LineNr">807 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L808" class="LineNr">808 </span> <span class="Delimiter">}</span> +<span id="L809" class="LineNr">809 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L810" class="LineNr">810 </span><span class="Delimiter">}</span> +<span id="L811" class="LineNr">811 </span><span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> +<span id="L812" class="LineNr">812 </span><span class="Normal">case</span> CHARACTER_TO_CODE: <span class="Delimiter">{</span> +<span id="L813" class="LineNr">813 </span> <span class="Normal">double</span> result = <span class="Constant">0</span><span class="Delimiter">;</span> +<span id="L814" class="LineNr">814 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L815" class="LineNr">815 </span> result += ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L816" class="LineNr">816 </span> <span class="Delimiter">}</span> +<span id="L817" class="LineNr">817 </span> products<span class="Delimiter">.</span>resize<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> +<span id="L818" class="LineNr">818 </span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>result<span class="Delimiter">);</span> +<span id="L819" class="LineNr">819 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L820" class="LineNr">820 </span><span class="Delimiter">}</span> +<span id="L821" class="LineNr">821 </span> +<span id="L822" class="LineNr">822 </span><span class="Delimiter">:(before "End Includes")</span> +<span id="L823" class="LineNr">823 </span><span class="PreProc">#include </span><span class="Constant"><math.h></span> </pre> </body> </html> diff --git a/html/043space.cc.html b/html/043space.cc.html index a73959b0..d5a43d67 100644 --- a/html/043space.cc.html +++ b/html/043space.cc.html @@ -470,7 +470,7 @@ if ('onhashchange' in window) { <span id="L406" class="LineNr">406 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>caller<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L407" class="LineNr">407 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>caller<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>products<span class="Delimiter">.</span>empty<span class="Delimiter">()</span> <span id="L408" class="LineNr">408 </span> || caller<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>name != <span class="Constant">"default-space"</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L409" class="LineNr">409 </span> <a href='003trace.cc.html#L168'>raise</a> << caller<span class="Delimiter">.</span>name << <span class="Constant">" does not seem to start with default-space or local-scope</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L409" class="LineNr">409 </span> <a href='003trace.cc.html#L168'>raise</a> << caller<span class="Delimiter">.</span>name << <span class="Constant">" does not seem to start with 'local-scope' or 'default-space'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L410" class="LineNr">410 </span> <span class="Delimiter">}</span> <span id="L411" class="LineNr">411 </span><span class="Delimiter">}</span> <span id="L412" class="LineNr">412 </span><span class="Delimiter">:(after "Load Mu Prelude")</span> |