about summary refs log blame commit diff stats
path: root/056trace.subx
blob: cc6a7b4345d2a505cbbc08c7ff6c50212cfad9dc (plain) (tree)
ss="s">"Delimiter">:(scenario merge_exclusive_container_indirect)</span> <span id="L405" class="LineNr">405 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ <span id="L406" class="LineNr">406 </span> <span class="Constant">1</span>:<a href='043space.cc.html#L80'>address</a>:number-<span class="Normal">or</span>-point<span class="Special"> &lt;- </span>copy <span class="Constant">10</span>/unsafe <span id="L407" class="LineNr">407 </span> <span class="Constant">1</span>:<a href='043space.cc.html#L80'>address</a>:number-<span class="Normal">or</span>-point/lookup<span class="Special"> &lt;- </span>merge <span class="Constant">0</span>/number<span class="Delimiter">,</span> <span class="Constant">34</span> <span id="L408" class="LineNr">408 </span>] <span id="L409" class="LineNr">409 </span><span class="traceContains">+mem: storing 0 in location 10</span> <span id="L410" class="LineNr">410 </span><span class="traceContains">+mem: storing 34 in location 11</span> <span id="L411" class="LineNr">411 </span> <span id="L412" class="LineNr">412 </span><span class="Delimiter">:(before &quot;Update size_mismatch Check for MERGE(x)</span> <span id="L413" class="LineNr">413 </span>canonize<span class="Delimiter">(</span>x<span class="Delimiter">);</span> <span id="L414" class="LineNr">414 </span> <span id="L415" class="LineNr">415 </span><span class="Comment">//: abbreviation for '/lookup': a prefix '*'</span> <span id="L416" class="LineNr">416 </span> <span id="L417" class="LineNr">417 </span><span class="Delimiter">:(scenario lookup_abbreviation)</span> <span id="L418" class="LineNr">418 </span><span class="muRecipe">def</span> <a href='000organization.cc.html#L113'>main</a> [ <span id="L419" class="LineNr">419 </span> <span class="Constant">1</span>:<a href='043space.cc.html#L80'>address</a>:number<span class="Special"> &lt;- </span>copy <span class="Constant">10</span>/unsafe <span id="L420" class="LineNr">420 </span> <span class="Constant">10</span>:number<span class="Special"> &lt;- </span>copy <span class="Constant">34</span> <span id="L421" class="LineNr">421 </span> <span class="Constant">3</span>:number<span class="Special"> &lt;- </span>copy *<span class="Constant">1</span>:<a href='043space.cc.html#L80'>address</a>:number <span id="L422" class="LineNr">422 </span>] <span id="L423" class="LineNr">423 </span><span class="traceContains">+parse: ingredient: {1: (&quot;address&quot; &quot;number&quot;), &quot;lookup&quot;: ()}</span> <span id="L424" class="LineNr">424 </span><span class="traceContains">+mem: storing 34 in location 3</span> <span id="L425" class="LineNr">425 </span> <span id="L426" class="LineNr">426 </span><span class="Delimiter">:(before &quot;End Parsing reagent&quot;)</span> <span id="L427" class="LineNr">427 </span><span class="Delimiter">{</span> <span id="L428" class="LineNr">428 </span> <span class="Normal">while</span> <span class="Delimiter">(</span><a href='001help.cc.html#L77'>starts_with</a><span class="Delimiter">(</span>name<span class="Delimiter">,</span> <span class="Constant">&quot;*&quot;</span><span class="Delimiter">))</span> <span class="Delimiter">{</span> <span id="L429" class="LineNr">429 </span> name<span class="Delimiter">.</span>erase<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> <span class="Constant">1</span><span class="Delimiter">);</span> <span id="L430" class="LineNr">430 </span> properties<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>pair&lt;string<span class="Delimiter">,</span> string_tree*&gt;<span class="Delimiter">(</span><span class="Constant">&quot;lookup&quot;</span><span class="Delimiter">,</span> <span class="Constant">NULL</span><span class="Delimiter">));</span> <span id="L431" class="LineNr">431 </span> <span class="Delimiter">}</span> <span id="L432" class="LineNr">432 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>name<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span id="L433" class="LineNr">433 </span> <a href='003trace.cc.html#L174'>raise</a> &lt;&lt; <span class="Constant">&quot;illegal name '&quot;</span> &lt;&lt; original_string &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; <a href='003trace.cc.html#L203'>end</a><span class="Delimiter">();</span> <span id="L434" class="LineNr">434 </span><span class="Delimiter">}</span> <span id="L435" class="LineNr">435 </span> <span id="L436" class="LineNr">436 </span><span class="SalientComment">//:: helpers for debugging</span> <span id="L437" class="LineNr">437 </span> <span id="L438" class="LineNr">438 </span><span class="Delimiter">:(before &quot;End Primitive Recipe Declarations&quot;)</span> <span id="L439" class="LineNr">439 </span>_DUMP<span class="Delimiter">,</span> <span id="L440" class="LineNr">440 </span><span class="Delimiter">:(before &quot;End Primitive Recipe Numbers&quot;)</span> <span id="L441" class="LineNr">441 </span><a href='001help.cc.html#L221'>put</a><span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">&quot;$dump&quot;</span><span class="Delimiter">,</span> _DUMP<span class="Delimiter">);</span> <span id="L442" class="LineNr">442 </span><span class="Delimiter">:(before &quot;End Primitive Recipe Implementations&quot;)</span> <span id="L443" class="LineNr">443 </span><span class="Normal">case</span> _DUMP: <span class="Delimiter">{</span> <span id="L444" class="LineNr">444 </span> reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> after_canonize = <a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> <span id="L445" class="LineNr">445 </span> canonize<span class="Delimiter">(</span>after_canonize<span class="Delimiter">);</span> <span id="L446" class="LineNr">446 </span> cerr &lt;&lt; <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> &lt;&lt; <a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>name &lt;&lt; <span class="Constant">' '</span> &lt;&lt; no_scientific<span class="Delimiter">(</span><a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>value<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; =&gt; &quot;</span> &lt;&lt; no_scientific<span class="Delimiter">(</span>after_canonize<span class="Delimiter">.</span>value<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; =&gt; &quot;</span> &lt;&lt; no_scientific<span class="Delimiter">(</span><a href='001help.cc.html#L229'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> after_canonize<span class="Delimiter">.</span>value<span class="Delimiter">))</span> &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> <span id="L447" class="LineNr">447 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L448" class="LineNr">448 </span><span class="Delimiter">}</span> <span id="L449" class="LineNr">449 </span> <span id="L450" class="LineNr">450 </span><span class="Comment">//: grab an address, and then dump its value at intervals</span> <span id="L451" class="LineNr">451 </span><span class="Comment">//: useful for tracking down memory corruption (writing to an out-of-bounds address)</span> <span id="L452" class="LineNr">452 </span><span class="Delimiter">:(before &quot;End Globals&quot;)</span> <span id="L453" class="LineNr">453 </span><span class="Normal">int</span> Bar = -<span class="Constant">1</span><span class="Delimiter">;</span> <span id="L454" class="LineNr">454 </span><span class="Delimiter">:(before &quot;End Primitive Recipe Declarations&quot;)</span> <span id="L455" class="LineNr">455 </span>_BAR<span class="Delimiter">,</span> <span id="L456" class="LineNr">456 </span><span class="Delimiter">:(before &quot;End Primitive Recipe Numbers&quot;)</span> <span id="L457" class="LineNr">457 </span><a href='001help.cc.html#L221'>put</a><span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">&quot;$bar&quot;</span><span class="Delimiter">,</span> _BAR<span class="Delimiter">);</span> <span id="L458" class="LineNr">458 </span><span class="Delimiter">:(before &quot;End Primitive Recipe Implementations&quot;)</span> <span id="L459" class="LineNr">459 </span><span class="Normal">case</span> _BAR: <span class="Delimiter">{</span> <span id="L460" class="LineNr">460 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> <span id="L461" class="LineNr">461 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Bar != -<span class="Constant">1</span><span class="Delimiter">)</span> cerr &lt;&lt; Bar &lt;&lt; <span class="Constant">&quot;: &quot;</span> &lt;&lt; no_scientific<span class="Delimiter">(</span><a href='001help.cc.html#L229'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> Bar<span class="Delimiter">))</span> &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> <span id="L462" class="LineNr">462 </span> <span class="Normal">else</span> cerr &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> <span id="L463" class="LineNr">463 </span> <span class="Delimiter">}</span> <span id="L464" class="LineNr">464 </span> <span class="Normal">else</span> <span class="Delimiter">{</span> <span id="L465" class="LineNr">465 </span> reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> tmp = <a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> <span id="L466" class="LineNr">466 </span> canonize<span class="Delimiter">(</span>tmp<span class="Delimiter">);</span> <span id="L467" class="LineNr">467 </span> Bar = tmp<span class="Delimiter">.</span>value<span class="Delimiter">;</span> <span id="L468" class="LineNr">468 </span> <span class="Delimiter">}</span> <span id="L469" class="LineNr">469 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L470" class="LineNr">470 </span><span class="Delimiter">}</span> </pre> </body> </html> <!-- vim: set foldmethod=manual : -->