diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-10-17 07:08:47 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-10-17 07:08:47 -0700 |
commit | 104e521c04d1a0cad9c68fb11e250e12ad8917ef (patch) | |
tree | df4258ad26cb78e25abee64c80aedab47aa461ea /html/020run.cc.html | |
parent | 800320a70c981008302af56b2f35a142c1101401 (diff) | |
download | mu-104e521c04d1a0cad9c68fb11e250e12ad8917ef.tar.gz |
4709
Diffstat (limited to 'html/020run.cc.html')
-rw-r--r-- | html/020run.cc.html | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/html/020run.cc.html b/html/020run.cc.html index 5451e963..c2f8248b 100644 --- a/html/020run.cc.html +++ b/html/020run.cc.html @@ -128,10 +128,10 @@ if ('onhashchange' in window) { <span id="L63" class="LineNr"> 63 </span> <span class="Normal">while</span> <span class="Delimiter">(</span><a href='073scheduler.cc.html#L28'>should_continue_running</a><span class="Delimiter">(</span>Current_routine<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span class="Comment">// beware: may modify Current_routine</span> <span id="L64" class="LineNr"> 64 </span> <span class="Comment">// Running One Instruction</span> <span id="L65" class="LineNr"> 65 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">().</span>is_label<span class="Delimiter">)</span> <span class="Delimiter">{</span> ++current_step_index<span class="Delimiter">();</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> -<span id="L66" class="LineNr"> 66 </span> <a href='003trace.cc.html#L190'>trace</a><span class="Delimiter">(</span>Initial_callstack_depth + Trace_stream<span class="Delimiter">-></span>callstack_depth<span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <a href='028call_return.cc.html#L163'>to_string</a><span class="Delimiter">(</span><a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">())</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L66" class="LineNr"> 66 </span> <a href='003trace.cc.html#L189'>trace</a><span class="Delimiter">(</span>Initial_callstack_depth + Trace_stream<span class="Delimiter">-></span>callstack_depth<span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <a href='028call_return.cc.html#L163'>to_string</a><span class="Delimiter">(</span><a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">())</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L67" class="LineNr"> 67 </span><span class="CommentedCode">//? if (Foo) cerr << "run: " << to_string(current_instruction()) << '\n';</span> <span id="L68" class="LineNr"> 68 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L229'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> <span class="Constant">0</span><span class="Delimiter">)</span> != <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L69" class="LineNr"> 69 </span> <a href='003trace.cc.html#L197'>raise</a> << <span class="Constant">"something wrote to location 0; this should never happen</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L69" class="LineNr"> 69 </span> <a href='003trace.cc.html#L196'>raise</a> << <span class="Constant">"something wrote to location 0; this should never happen</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L70" class="LineNr"> 70 </span> <a href='001help.cc.html#L221'>put</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> <span class="Constant">0</span><span class="Delimiter">,</span> <span class="Constant">0</span><span class="Delimiter">);</span> <span id="L71" class="LineNr"> 71 </span> <span class="Delimiter">}</span> <span id="L72" class="LineNr"> 72 </span> <span class="Comment">// read all ingredients from memory, each potentially spanning multiple locations</span> @@ -151,18 +151,18 @@ if ('onhashchange' in window) { <span id="L86" class="LineNr"> 86 </span> <span class="Normal">switch</span> <span class="Delimiter">(</span><a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">().</span>operation<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L87" class="LineNr"> 87 </span> <span class="Comment">// Primitive Recipe Implementations</span> <span id="L88" class="LineNr"> 88 </span> <span class="Normal">case</span> <a href='010vm.cc.html#L196'>COPY</a>: <span class="Delimiter">{</span> -<span id="L89" class="LineNr"> 89 </span> copy<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>begin<span class="Delimiter">(),</span> ingredients<span class="Delimiter">.</span><a href='003trace.cc.html#L226'>end</a><span class="Delimiter">(),</span> inserter<span class="Delimiter">(</span>products<span class="Delimiter">,</span> products<span class="Delimiter">.</span>begin<span class="Delimiter">()));</span> +<span id="L89" class="LineNr"> 89 </span> copy<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>begin<span class="Delimiter">(),</span> ingredients<span class="Delimiter">.</span><a href='003trace.cc.html#L225'>end</a><span class="Delimiter">(),</span> inserter<span class="Delimiter">(</span>products<span class="Delimiter">,</span> products<span class="Delimiter">.</span>begin<span class="Delimiter">()));</span> <span id="L90" class="LineNr"> 90 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L91" class="LineNr"> 91 </span> <span class="Delimiter">}</span> <span id="L92" class="LineNr"> 92 </span> <span class="Comment">// End Primitive Recipe Implementations</span> <span id="L93" class="LineNr"> 93 </span> <span class="Normal">default</span>: <span class="Delimiter">{</span> -<span id="L94" class="LineNr"> 94 </span> <a href='003trace.cc.html#L197'>raise</a> << <span class="Constant">"not a primitive op: "</span> << <a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">().</span>operation << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L94" class="LineNr"> 94 </span> <a href='003trace.cc.html#L196'>raise</a> << <span class="Constant">"not a primitive op: "</span> << <a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">().</span>operation << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <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 class="Comment">//: used by a later layer</span> <span id="L98" class="LineNr"> 98 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>write_products<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L99" class="LineNr"> 99 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>products<span class="Delimiter">)</span> < <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span><a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">().</span>products<span class="Delimiter">))</span> <span class="Delimiter">{</span> -<span id="L100" class="LineNr">100 </span> <a href='003trace.cc.html#L197'>raise</a> << <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>products<span class="Delimiter">)</span> << <span class="Constant">" vs "</span> << <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span><a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">().</span>products<span class="Delimiter">)</span> << <span class="Constant">": failed to write to all products in '"</span> << to_original_string<span class="Delimiter">(</span>current_instruction<span class="Delimiter">())</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L100" class="LineNr">100 </span> <a href='003trace.cc.html#L196'>raise</a> << <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>products<span class="Delimiter">)</span> << <span class="Constant">" vs "</span> << <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span><a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">().</span>products<span class="Delimiter">)</span> << <span class="Constant">": failed to write to all products in '"</span> << to_original_string<span class="Delimiter">(</span>current_instruction<span class="Delimiter">())</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L101" class="LineNr">101 </span> <span class="Delimiter">}</span> <span id="L102" class="LineNr">102 </span> <span class="Normal">else</span> <span class="Delimiter">{</span> <span id="L103" class="LineNr">103 </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#L141'>SIZE</a><span class="Delimiter">(</span><a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">().</span>products<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> @@ -211,7 +211,7 @@ if ('onhashchange' in window) { <span id="L146" class="LineNr">146 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_literal<span class="Delimiter">(</span>type<span class="Delimiter">))</span> <span class="Identifier">return</span><span class="Constant"> false</span><span class="Delimiter">;</span> <span id="L147" class="LineNr">147 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>type<span class="Delimiter">-></span>atom<span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Constant"> false</span><span class="Delimiter">;</span> <span id="L148" class="LineNr">148 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!type<span class="Delimiter">-></span>left<span class="Delimiter">-></span>atom<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L149" class="LineNr">149 </span> <a href='003trace.cc.html#L197'>raise</a> << <span class="Constant">"invalid type "</span> << <a href='028call_return.cc.html#L163'>to_string</a><span class="Delimiter">(</span>type<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L149" class="LineNr">149 </span> <a href='003trace.cc.html#L196'>raise</a> << <span class="Constant">"invalid type "</span> << <a href='028call_return.cc.html#L163'>to_string</a><span class="Delimiter">(</span>type<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L150" class="LineNr">150 </span> <span class="Identifier">return</span><span class="Constant"> false</span><span class="Delimiter">;</span> <span id="L151" class="LineNr">151 </span> <span class="Delimiter">}</span> <span id="L152" class="LineNr">152 </span> <span class="Identifier">return</span> type<span class="Delimiter">-></span>left<span class="Delimiter">-></span>value == Address_type_ordinal<span class="Delimiter">;</span> @@ -285,7 +285,7 @@ if ('onhashchange' in window) { <span id="L220" class="LineNr">220 </span><span class="CommentedCode">//? cerr << to_original_string(get(Recipe, get(Recipe_ordinal, "event-loop"))) << '\n';</span> <span id="L221" class="LineNr">221 </span><span class="CommentedCode">//? DUMP("");</span> <span id="L222" class="LineNr">222 </span><span class="CommentedCode">//? exit(0);</span> -<span id="L223" class="LineNr">223 </span><span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L221'>trace_contains_errors</a><span class="Delimiter">())</span> <span class="Identifier">return</span> <span class="Constant">1</span><span class="Delimiter">;</span> +<span id="L223" class="LineNr">223 </span><span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L220'>trace_contains_errors</a><span class="Delimiter">())</span> <span class="Identifier">return</span> <span class="Constant">1</span><span class="Delimiter">;</span> <span id="L224" class="LineNr">224 </span><span class="Normal">if</span> <span class="Delimiter">(</span>Trace_stream && Run_tests<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L225" class="LineNr">225 </span> <span class="Comment">// We'll want a trace per test. Clear the trace.</span> <span id="L226" class="LineNr">226 </span> <span class="Normal">delete</span> Trace_stream<span class="Delimiter">;</span> @@ -299,7 +299,7 @@ if ('onhashchange' in window) { <span id="L234" class="LineNr">234 </span><span class="Normal">if</span> <span class="Delimiter">(</span>!Run_tests && <a href='001help.cc.html#L226'>contains_key</a><span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"main"</span><span class="Delimiter">)</span> && <a href='001help.cc.html#L226'>contains_key</a><span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"main"</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> <span id="L235" class="LineNr">235 </span> <span class="Comment">// Running Main</span> <span id="L236" class="LineNr">236 </span> <a href='000organization.cc.html#L134'>reset</a><span class="Delimiter">();</span> -<span id="L237" class="LineNr">237 </span> <a href='003trace.cc.html#L190'>trace</a><span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"=== Starting to run"</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L237" class="LineNr">237 </span> <a href='003trace.cc.html#L189'>trace</a><span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"=== Starting to run"</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L238" class="LineNr">238 </span> assert<span class="Delimiter">(</span>Num_calls_to_transform_all == <span class="Constant">1</span><span class="Delimiter">);</span> <span id="L239" class="LineNr">239 </span> <a href='073scheduler.cc.html#L122'>run_main</a><span class="Delimiter">(</span>argc<span class="Delimiter">,</span> argv<span class="Delimiter">);</span> <span id="L240" class="LineNr">240 </span><span class="Delimiter">}</span> @@ -317,10 +317,10 @@ if ('onhashchange' in window) { <span id="L252" class="LineNr">252 </span> <span class="Delimiter">}</span> <span id="L253" class="LineNr">253 </span> ifstream fin<span class="Delimiter">(</span>filename<span class="Delimiter">.</span>c_str<span class="Delimiter">());</span> <span id="L254" class="LineNr">254 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!fin<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L255" class="LineNr">255 </span> cerr << <span class="Constant">"no such file '"</span> << filename << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> <span class="Comment">// don't raise, just warn. just in case it's just a name for a scenario to run.</span> +<span id="L255" class="LineNr">255 </span> cerr << <span class="Constant">"no such file '"</span> << filename << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span class="Comment">// don't raise, just warn. just in case it's just a name for a scenario to run.</span> <span id="L256" class="LineNr">256 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L257" class="LineNr">257 </span> <span class="Delimiter">}</span> -<span id="L258" class="LineNr">258 </span> <a href='003trace.cc.html#L190'>trace</a><span class="Delimiter">(</span><span class="Constant">9990</span><span class="Delimiter">,</span> <span class="Constant">"load"</span><span class="Delimiter">)</span> << <span class="Constant">"=== "</span> << filename << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L258" class="LineNr">258 </span> <a href='003trace.cc.html#L189'>trace</a><span class="Delimiter">(</span><span class="Constant">9990</span><span class="Delimiter">,</span> <span class="Constant">"load"</span><span class="Delimiter">)</span> << <span class="Constant">"=== "</span> << filename << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L259" class="LineNr">259 </span> load<span class="Delimiter">(</span>fin<span class="Delimiter">);</span> <span id="L260" class="LineNr">260 </span> fin<span class="Delimiter">.</span>close<span class="Delimiter">();</span> <span id="L261" class="LineNr">261 </span><span class="Delimiter">}</span> @@ -371,7 +371,7 @@ if ('onhashchange' in window) { <span id="L306" class="LineNr">306 </span> <span class="Normal">int</span> size = size_of<span class="Delimiter">(</span>x<span class="Delimiter">);</span> <span id="L307" class="LineNr">307 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> offset = <span class="Constant">0</span><span class="Delimiter">;</span> offset < size<span class="Delimiter">;</span> ++offset<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L308" class="LineNr">308 </span> <span class="Normal">double</span> val = <a href='001help.cc.html#L229'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> x<span class="Delimiter">.</span>value+offset<span class="Delimiter">);</span> -<span id="L309" class="LineNr">309 </span> <a href='003trace.cc.html#L190'>trace</a><span class="Delimiter">(</span><span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"location "</span> << x<span class="Delimiter">.</span>value+offset << <span class="Constant">" is "</span> << no_scientific<span class="Delimiter">(</span>val<span class="Delimiter">)</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L309" class="LineNr">309 </span> <a href='003trace.cc.html#L189'>trace</a><span class="Delimiter">(</span><span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"location "</span> << x<span class="Delimiter">.</span>value+offset << <span class="Constant">" is "</span> << no_scientific<span class="Delimiter">(</span>val<span class="Delimiter">)</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L310" class="LineNr">310 </span> result<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>val<span class="Delimiter">);</span> <span id="L311" class="LineNr">311 </span> <span class="Delimiter">}</span> <span id="L312" class="LineNr">312 </span> <span class="Identifier">return</span> result<span class="Delimiter">;</span> @@ -381,24 +381,24 @@ if ('onhashchange' in window) { <span id="L316" class="LineNr">316 </span> assert<span class="Delimiter">(</span>Current_routine<span class="Delimiter">);</span> <span class="Comment">// run-time only</span> <span id="L317" class="LineNr">317 </span> <span class="Comment">// Begin Preprocess write_memory(x, data)</span> <span id="L318" class="LineNr">318 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!x<span class="Delimiter">.</span>type<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L319" class="LineNr">319 </span> <a href='003trace.cc.html#L197'>raise</a> << <span class="Constant">"can't write to '"</span> << <a href='028call_return.cc.html#L163'>to_string</a><span class="Delimiter">(</span>x<span class="Delimiter">)</span> << <span class="Constant">"'; no type</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> +<span id="L319" class="LineNr">319 </span> <a href='003trace.cc.html#L196'>raise</a> << <span class="Constant">"can't write to '"</span> << <a href='028call_return.cc.html#L163'>to_string</a><span class="Delimiter">(</span>x<span class="Delimiter">)</span> << <span class="Constant">"'; no type</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span id="L320" class="LineNr">320 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L321" class="LineNr">321 </span> <span class="Delimiter">}</span> <span id="L322" class="LineNr">322 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_dummy<span class="Delimiter">(</span>x<span class="Delimiter">))</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L323" class="LineNr">323 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_literal<span class="Delimiter">(</span>x<span class="Delimiter">))</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L324" class="LineNr">324 </span> <span class="Comment">// End Preprocess write_memory(x, data)</span> <span id="L325" class="LineNr">325 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>x<span class="Delimiter">.</span>value == <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L326" class="LineNr">326 </span> <a href='003trace.cc.html#L197'>raise</a> << <span class="Constant">"can't write to location 0 in '"</span> << to_original_string<span class="Delimiter">(</span><a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">())</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> +<span id="L326" class="LineNr">326 </span> <a href='003trace.cc.html#L196'>raise</a> << <span class="Constant">"can't write to location 0 in '"</span> << to_original_string<span class="Delimiter">(</span><a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">())</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> <span id="L327" class="LineNr">327 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L328" class="LineNr">328 </span> <span class="Delimiter">}</span> <span id="L329" class="LineNr">329 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>size_mismatch<span class="Delimiter">(</span>x<span class="Delimiter">,</span> data<span class="Delimiter">))</span> <span class="Delimiter">{</span> -<span id="L330" class="LineNr">330 </span> <a href='003trace.cc.html#L197'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span><a href='026call.cc.html#L87'>current_recipe_name</a><span class="Delimiter">())</span> << <span class="Constant">"size mismatch in storing to '"</span> << x<span class="Delimiter">.</span>original_string << <span class="Constant">"' ("</span> << size_of<span class="Delimiter">(</span>x<span class="Delimiter">)</span> << <span class="Constant">" vs "</span> << <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>data<span class="Delimiter">)</span> << <span class="Constant">") at '"</span> << to_original_string<span class="Delimiter">(</span>current_instruction<span class="Delimiter">())</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L330" class="LineNr">330 </span> <a href='003trace.cc.html#L196'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span><a href='026call.cc.html#L87'>current_recipe_name</a><span class="Delimiter">())</span> << <span class="Constant">"size mismatch in storing to '"</span> << x<span class="Delimiter">.</span>original_string << <span class="Constant">"' ("</span> << size_of<span class="Delimiter">(</span>x<span class="Delimiter">)</span> << <span class="Constant">" vs "</span> << <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>data<span class="Delimiter">)</span> << <span class="Constant">") at '"</span> << to_original_string<span class="Delimiter">(</span>current_instruction<span class="Delimiter">())</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L331" class="LineNr">331 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L332" class="LineNr">332 </span> <span class="Delimiter">}</span> <span id="L333" class="LineNr">333 </span> <span class="Comment">// End write_memory(x) Special-cases</span> <span id="L334" class="LineNr">334 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> offset = <span class="Constant">0</span><span class="Delimiter">;</span> offset < <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>data<span class="Delimiter">);</span> ++offset<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L335" class="LineNr">335 </span> assert<span class="Delimiter">(</span>x<span class="Delimiter">.</span>value+offset > <span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L336" class="LineNr">336 </span> <a href='003trace.cc.html#L190'>trace</a><span class="Delimiter">(</span><span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"storing "</span> << no_scientific<span class="Delimiter">(</span>data<span class="Delimiter">.</span>at<span class="Delimiter">(</span>offset<span class="Delimiter">))</span> << <span class="Constant">" in location "</span> << x<span class="Delimiter">.</span>value+offset << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L336" class="LineNr">336 </span> <a href='003trace.cc.html#L189'>trace</a><span class="Delimiter">(</span><span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"storing "</span> << no_scientific<span class="Delimiter">(</span>data<span class="Delimiter">.</span>at<span class="Delimiter">(</span>offset<span class="Delimiter">))</span> << <span class="Constant">" in location "</span> << x<span class="Delimiter">.</span>value+offset << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L337" class="LineNr">337 </span><span class="CommentedCode">//? if (Foo) cerr << "mem: storing " << no_scientific(data.at(offset)) << " in location " << x.value+offset << '\n';</span> <span id="L338" class="LineNr">338 </span> <a href='001help.cc.html#L221'>put</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> x<span class="Delimiter">.</span>value+offset<span class="Delimiter">,</span> data<span class="Delimiter">.</span>at<span class="Delimiter">(</span>offset<span class="Delimiter">));</span> <span id="L339" class="LineNr">339 </span> <span class="Delimiter">}</span> @@ -419,7 +419,7 @@ if ('onhashchange' in window) { <span id="L354" class="LineNr">354 </span> <span class="Delimiter">}</span> <span id="L355" class="LineNr">355 </span> <span class="Normal">else</span> <span class="Delimiter">{</span> <span id="L356" class="LineNr">356 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!type<span class="Delimiter">-></span>left<span class="Delimiter">-></span>atom<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L357" class="LineNr">357 </span> <a href='003trace.cc.html#L197'>raise</a> << <span class="Constant">"invalid type "</span> << <a href='028call_return.cc.html#L163'>to_string</a><span class="Delimiter">(</span>type<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L357" class="LineNr">357 </span> <a href='003trace.cc.html#L196'>raise</a> << <span class="Constant">"invalid type "</span> << <a href='028call_return.cc.html#L163'>to_string</a><span class="Delimiter">(</span>type<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L358" class="LineNr">358 </span> <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span> <span id="L359" class="LineNr">359 </span> <span class="Delimiter">}</span> <span id="L360" class="LineNr">360 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>type<span class="Delimiter">-></span>left<span class="Delimiter">-></span>value == Address_type_ordinal<span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">2</span><span class="Delimiter">;</span> <span class="Comment">// address and alloc id</span> @@ -457,7 +457,7 @@ if ('onhashchange' in window) { <span id="L392" class="LineNr">392 </span> vector<recipe_ordinal> tmp = load<span class="Delimiter">(</span>form<span class="Delimiter">);</span> <span id="L393" class="LineNr">393 </span> <a href='012transform.cc.html#L46'>transform_all</a><span class="Delimiter">();</span> <span id="L394" class="LineNr">394 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>tmp<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> -<span id="L395" class="LineNr">395 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L221'>trace_contains_errors</a><span class="Delimiter">())</span> <span class="Delimiter">{</span> +<span id="L395" class="LineNr">395 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='003trace.cc.html#L220'>trace_contains_errors</a><span class="Delimiter">())</span> <span class="Delimiter">{</span> <span id="L396" class="LineNr">396 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Save_trace && Trace_stream<span class="Delimiter">)</span> Trace_stream<span class="Delimiter">-></span><a href='003trace.cc.html#L133'>save</a><span class="Delimiter">();</span> <span id="L397" class="LineNr">397 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L398" class="LineNr">398 </span> <span class="Delimiter">}</span> @@ -554,7 +554,7 @@ if ('onhashchange' in window) { <span id="L489" class="LineNr">489 </span> ofstream fout<span class="Delimiter">;</span> <span id="L490" class="LineNr">490 </span> fout<span class="Delimiter">.</span>open<span class="Delimiter">(</span><span class="Constant">"profile.instructions"</span><span class="Delimiter">);</span> <span id="L491" class="LineNr">491 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>fout<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L492" class="LineNr">492 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>map<recipe_ordinal<span class="Delimiter">,</span> <span class="Normal">int</span>>::iterator p = Instructions_running<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Instructions_running<span class="Delimiter">.</span><a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L492" class="LineNr">492 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>map<recipe_ordinal<span class="Delimiter">,</span> <span class="Normal">int</span>>::iterator p = Instructions_running<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Instructions_running<span class="Delimiter">.</span><a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L493" class="LineNr">493 </span> fout << std::setw<span class="Delimiter">(</span><span class="Constant">9</span><span class="Delimiter">)</span> << p<span class="Delimiter">-></span>second << <span class="Constant">' '</span> << header_label<span class="Delimiter">(</span>p<span class="Delimiter">-></span>first<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> <span id="L494" class="LineNr">494 </span> <span class="Delimiter">}</span> <span id="L495" class="LineNr">495 </span> <span class="Delimiter">}</span> |