diff options
Diffstat (limited to 'html/036refcount.cc.html')
-rw-r--r-- | html/036refcount.cc.html | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/html/036refcount.cc.html b/html/036refcount.cc.html index 1f3b3fc7..41c7a557 100644 --- a/html/036refcount.cc.html +++ b/html/036refcount.cc.html @@ -107,7 +107,7 @@ if ('onhashchange' in window) { <span id="L44" class="LineNr"> 44 </span> assert<span class="Delimiter">(</span>new_address >= <span class="Constant">0</span><span class="Delimiter">);</span> <span id="L45" class="LineNr"> 45 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>new_address == <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L46" class="LineNr"> 46 </span> <span class="Normal">int</span> new_refcount = <a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> new_address<span class="Delimiter">);</span> -<span id="L47" class="LineNr"> 47 </span> <a href='003trace.cc.html#L169'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"incrementing refcount of "</span> << new_address << <span class="Constant">": "</span> << new_refcount << <span class="Constant">" -> "</span> << new_refcount+<span class="Constant">1</span> << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L47" class="LineNr"> 47 </span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"incrementing refcount of "</span> << new_address << <span class="Constant">": "</span> << new_refcount << <span class="Constant">" -> "</span> << new_refcount+<span class="Constant">1</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L48" class="LineNr"> 48 </span> <a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> new_address<span class="Delimiter">,</span> new_refcount+<span class="Constant">1</span><span class="Delimiter">);</span> <span id="L49" class="LineNr"> 49 </span><span class="Delimiter">}</span> <span id="L50" class="LineNr"> 50 </span> @@ -124,16 +124,16 @@ if ('onhashchange' in window) { <span id="L61" class="LineNr"> 61 </span> assert<span class="Delimiter">(</span>old_address >= <span class="Constant">0</span><span class="Delimiter">);</span> <span id="L62" class="LineNr"> 62 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>old_address<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L63" class="LineNr"> 63 </span> <span class="Normal">int</span> old_refcount = <a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> old_address<span class="Delimiter">);</span> -<span id="L64" class="LineNr"> 64 </span> <a href='003trace.cc.html#L169'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"decrementing refcount of "</span> << old_address << <span class="Constant">": "</span> << old_refcount << <span class="Constant">" -> "</span> << old_refcount-<span class="Constant">1</span> << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L64" class="LineNr"> 64 </span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"decrementing refcount of "</span> << old_address << <span class="Constant">": "</span> << old_refcount << <span class="Constant">" -> "</span> << old_refcount-<span class="Constant">1</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L65" class="LineNr"> 65 </span> --old_refcount<span class="Delimiter">;</span> <span id="L66" class="LineNr"> 66 </span> <a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> old_address<span class="Delimiter">,</span> old_refcount<span class="Delimiter">);</span> <span id="L67" class="LineNr"> 67 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>old_refcount < <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L68" class="LineNr"> 68 </span> tb_shutdown<span class="Delimiter">();</span> <span id="L69" class="LineNr"> 69 </span> cerr << <span class="Constant">"Negative refcount!!! "</span> << old_address << <span class="Constant">' '</span> << old_refcount << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> <span id="L70" class="LineNr"> 70 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Trace_stream<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L71" class="LineNr"> 71 </span> cerr << <span class="Constant">"Saving <a href='003trace.cc.html#L169'>trace</a> to last_trace.</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">;</span> +<span id="L71" class="LineNr"> 71 </span> cerr << <span class="Constant">"Saving <a href='003trace.cc.html#L161'>trace</a> to last_trace.</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">;</span> <span id="L72" class="LineNr"> 72 </span> ofstream fout<span class="Delimiter">(</span><span class="Constant">"last_trace"</span><span class="Delimiter">);</span> -<span id="L73" class="LineNr"> 73 </span> fout << Trace_stream<span class="Delimiter">-></span><a href='003trace.cc.html#L151'>readable_contents</a><span class="Delimiter">(</span><span class="Constant">""</span><span class="Delimiter">);</span> +<span id="L73" class="LineNr"> 73 </span> fout << Trace_stream<span class="Delimiter">-></span><a href='003trace.cc.html#L143'>readable_contents</a><span class="Delimiter">(</span><span class="Constant">""</span><span class="Delimiter">);</span> <span id="L74" class="LineNr"> 74 </span> fout<span class="Delimiter">.</span>close<span class="Delimiter">();</span> <span id="L75" class="LineNr"> 75 </span> <span class="Delimiter">}</span> <span id="L76" class="LineNr"> 76 </span> exit<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> @@ -325,7 +325,7 @@ if ('onhashchange' in window) { <span id="L262" class="LineNr"> 262 </span><span class="Delimiter">:(code)</span> <span id="L263" class="LineNr"> 263 </span><span class="Normal">bool</span> <span class="Normal">operator</span><<span class="Delimiter">(</span><span class="Normal">const</span> set<tag_condition_info>& a<span class="Delimiter">,</span> <span class="Normal">const</span> set<tag_condition_info>& b<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L264" class="LineNr"> 264 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>a<span class="Delimiter">.</span>size<span class="Delimiter">()</span> != b<span class="Delimiter">.</span>size<span class="Delimiter">())</span> <span class="Identifier">return</span> a<span class="Delimiter">.</span>size<span class="Delimiter">()</span> < b<span class="Delimiter">.</span>size<span class="Delimiter">();</span> -<span id="L265" class="LineNr"> 265 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>set<tag_condition_info>::const_iterator pa = a<span class="Delimiter">.</span>begin<span class="Delimiter">(),</span> pb = b<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> pa != a<span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> ++pa<span class="Delimiter">,</span> ++pb<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L265" class="LineNr"> 265 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>set<tag_condition_info>::const_iterator pa = a<span class="Delimiter">.</span>begin<span class="Delimiter">(),</span> pb = b<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> pa != a<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++pa<span class="Delimiter">,</span> ++pb<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L266" class="LineNr"> 266 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>pa<span class="Delimiter">-></span>offset != pb<span class="Delimiter">-></span>offset<span class="Delimiter">)</span> <span class="Identifier">return</span> pa<span class="Delimiter">-></span>offset < pb<span class="Delimiter">-></span>offset<span class="Delimiter">;</span> <span id="L267" class="LineNr"> 267 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>pa<span class="Delimiter">-></span>tag != pb<span class="Delimiter">-></span>tag<span class="Delimiter">)</span> <span class="Identifier">return</span> pa<span class="Delimiter">-></span>tag < pb<span class="Delimiter">-></span>tag<span class="Delimiter">;</span> <span id="L268" class="LineNr"> 268 </span> <span class="Delimiter">}</span> @@ -338,7 +338,7 @@ if ('onhashchange' in window) { <span id="L275" class="LineNr"> 275 </span><span class="Delimiter">}</span> <span id="L276" class="LineNr"> 276 </span><span class="Normal">bool</span> <span class="Normal">operator</span><<span class="Delimiter">(</span><span class="Normal">const</span> set<address_element_info>& a<span class="Delimiter">,</span> <span class="Normal">const</span> set<address_element_info>& b<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L277" class="LineNr"> 277 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>a<span class="Delimiter">.</span>size<span class="Delimiter">()</span> != b<span class="Delimiter">.</span>size<span class="Delimiter">())</span> <span class="Identifier">return</span> a<span class="Delimiter">.</span>size<span class="Delimiter">()</span> < b<span class="Delimiter">.</span>size<span class="Delimiter">();</span> -<span id="L278" class="LineNr"> 278 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>set<address_element_info>::const_iterator pa = a<span class="Delimiter">.</span>begin<span class="Delimiter">(),</span> pb = b<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> pa != a<span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> ++pa<span class="Delimiter">,</span> ++pb<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L278" class="LineNr"> 278 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>set<address_element_info>::const_iterator pa = a<span class="Delimiter">.</span>begin<span class="Delimiter">(),</span> pb = b<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> pa != a<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++pa<span class="Delimiter">,</span> ++pb<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L279" class="LineNr"> 279 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>pa<span class="Delimiter">-></span>offset != pb<span class="Delimiter">-></span>offset<span class="Delimiter">)</span> <span class="Identifier">return</span> pa<span class="Delimiter">-></span>offset < pb<span class="Delimiter">-></span>offset<span class="Delimiter">;</span> <span id="L280" class="LineNr"> 280 </span> <span class="Delimiter">}</span> <span id="L281" class="LineNr"> 281 </span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Comment">// equal</span> @@ -356,10 +356,10 @@ if ('onhashchange' in window) { <span id="L293" class="LineNr"> 293 </span><span class="Delimiter">:(code)</span> <span id="L294" class="LineNr"> 294 </span><span class="Normal">void</span> compute_container_address_offsets<span class="Delimiter">(</span><span class="Normal">const</span> <a href='010vm.cc.html#L14'>recipe_ordinal</a> r<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L295" class="LineNr"> 295 </span> recipe& caller = get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">);</span> -<span id="L296" class="LineNr"> 296 </span> <a href='003trace.cc.html#L169'>trace</a><span class="Delimiter">(</span><span class="Constant">9992</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"--- compute <a href='043space.cc.html#L76'>address</a> offsets for "</span> << caller<span class="Delimiter">.</span>name << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L296" class="LineNr"> 296 </span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9992</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"--- compute <a href='043space.cc.html#L76'>address</a> offsets for "</span> << caller<span class="Delimiter">.</span>name << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L297" class="LineNr"> 297 </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>caller<span class="Delimiter">.</span>steps<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L298" class="LineNr"> 298 </span> instruction& inst = caller<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">);</span> -<span id="L299" class="LineNr"> 299 </span> <a href='003trace.cc.html#L169'>trace</a><span class="Delimiter">(</span><span class="Constant">9993</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"- compute <a href='043space.cc.html#L76'>address</a> offsets for "</span> << <a href='028call_return.cc.html#L158'>to_string</a><span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L299" class="LineNr"> 299 </span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9993</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"- compute <a href='043space.cc.html#L76'>address</a> offsets for "</span> << <a href='028call_return.cc.html#L158'>to_string</a><span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L300" class="LineNr"> 300 </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>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span id="L301" class="LineNr"> 301 </span> compute_container_address_offsets<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">),</span> <span class="Constant">" in '"</span>+to_original_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span>+<span class="Constant">"'"</span><span class="Delimiter">);</span> <span id="L302" class="LineNr"> 302 </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>inst<span class="Delimiter">.</span>products<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> @@ -380,7 +380,7 @@ if ('onhashchange' in window) { <span id="L317" class="LineNr"> 317 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!type<span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L318" class="LineNr"> 318 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!type<span class="Delimiter">-></span>atom<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L319" class="LineNr"> 319 </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="L320" class="LineNr"> 320 </span> <a href='003trace.cc.html#L176'>raise</a> << <span class="Constant">"invalid type "</span> << <a href='028call_return.cc.html#L158'>to_string</a><span class="Delimiter">(</span>type<span class="Delimiter">)</span> << location_for_error_messages << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L320" class="LineNr"> 320 </span> <a href='003trace.cc.html#L168'>raise</a> << <span class="Constant">"invalid type "</span> << <a href='028call_return.cc.html#L158'>to_string</a><span class="Delimiter">(</span>type<span class="Delimiter">)</span> << location_for_error_messages << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L321" class="LineNr"> 321 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L322" class="LineNr"> 322 </span> <span class="Delimiter">}</span> <span id="L323" class="LineNr"> 323 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>type<span class="Delimiter">-></span>left<span class="Delimiter">-></span>name == <span class="Constant">"address"</span><span class="Delimiter">)</span> @@ -404,13 +404,13 @@ if ('onhashchange' in window) { <span id="L341" class="LineNr"> 341 </span><span class="Normal">void</span> compute_container_address_offsets<span class="Delimiter">(</span><span class="Normal">const</span> type_info& container_info<span class="Delimiter">,</span> <span class="Normal">const</span> type_tree* full_type<span class="Delimiter">,</span> <span class="Normal">const</span> string& location_for_error_messages<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L342" class="LineNr"> 342 </span> container_metadata& metadata = get<span class="Delimiter">(</span>Container_metadata<span class="Delimiter">,</span> full_type<span class="Delimiter">);</span> <span id="L343" class="LineNr"> 343 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!metadata<span class="Delimiter">.</span><a href='043space.cc.html#L76'>address</a><span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> -<span id="L344" class="LineNr"> 344 </span> <a href='003trace.cc.html#L169'>trace</a><span class="Delimiter">(</span><span class="Constant">9994</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"compute <a href='043space.cc.html#L76'>address</a> offsets for container "</span> << container_info<span class="Delimiter">.</span>name << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L344" class="LineNr"> 344 </span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9994</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"compute <a href='043space.cc.html#L76'>address</a> offsets for container "</span> << container_info<span class="Delimiter">.</span>name << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L345" class="LineNr"> 345 </span> <a href='036refcount.cc.html#L358'>append_addresses</a><span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">,</span> full_type<span class="Delimiter">,</span> metadata<span class="Delimiter">.</span><a href='043space.cc.html#L76'>address</a><span class="Delimiter">,</span> set<tag_condition_info><span class="Delimiter">(),</span> location_for_error_messages<span class="Delimiter">);</span> <span id="L346" class="LineNr"> 346 </span><span class="Delimiter">}</span> <span id="L347" class="LineNr"> 347 </span> <span id="L348" class="LineNr"> 348 </span><span class="Normal">void</span> <a href='036refcount.cc.html#L348'>compute_exclusive_container_address_offsets</a><span class="Delimiter">(</span><span class="Normal">const</span> type_info& exclusive_container_info<span class="Delimiter">,</span> <span class="Normal">const</span> type_tree* full_type<span class="Delimiter">,</span> <span class="Normal">const</span> string& location_for_error_messages<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L349" class="LineNr"> 349 </span> container_metadata& metadata = get<span class="Delimiter">(</span>Container_metadata<span class="Delimiter">,</span> full_type<span class="Delimiter">);</span> -<span id="L350" class="LineNr"> 350 </span> <a href='003trace.cc.html#L169'>trace</a><span class="Delimiter">(</span><span class="Constant">9994</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"compute <a href='043space.cc.html#L76'>address</a> offsets for exclusive container "</span> << exclusive_container_info<span class="Delimiter">.</span>name << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L350" class="LineNr"> 350 </span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9994</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"compute <a href='043space.cc.html#L76'>address</a> offsets for exclusive container "</span> << exclusive_container_info<span class="Delimiter">.</span>name << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L351" class="LineNr"> 351 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> tag = <span class="Constant">0</span><span class="Delimiter">;</span> tag < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>exclusive_container_info<span class="Delimiter">.</span>elements<span class="Delimiter">);</span> ++tag<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L352" class="LineNr"> 352 </span> set<tag_condition_info> key<span class="Delimiter">;</span> <span id="L353" class="LineNr"> 353 </span> key<span class="Delimiter">.</span>insert<span class="Delimiter">(</span>tag_condition_info<span class="Delimiter">(</span><span class="Comment">/*</span><span class="Comment">tag is at offset</span><span class="Comment">*/</span><span class="Constant">0</span><span class="Delimiter">,</span> tag<span class="Delimiter">));</span> @@ -428,11 +428,11 @@ if ('onhashchange' in window) { <span id="L365" class="LineNr"> 365 </span> <span class="Normal">const</span> type_info& info = get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> base_type<span class="Delimiter">-></span>value<span class="Delimiter">);</span> <span id="L366" class="LineNr"> 366 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>info<span class="Delimiter">.</span>kind == <a href='010vm.cc.html#L173'>CONTAINER</a><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L367" class="LineNr"> 367 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> curr_index = <span class="Constant">0</span><span class="Delimiter">,</span> curr_offset = base_offset<span class="Delimiter">;</span> curr_index < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>info<span class="Delimiter">.</span>elements<span class="Delimiter">);</span> ++curr_index<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L368" class="LineNr"> 368 </span> <a href='003trace.cc.html#L169'>trace</a><span class="Delimiter">(</span><span class="Constant">9993</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"checking container "</span> << base_type<span class="Delimiter">-></span>name << <span class="Constant">", element "</span> << curr_index << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L368" class="LineNr"> 368 </span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9993</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"checking container "</span> << base_type<span class="Delimiter">-></span>name << <span class="Constant">", element "</span> << curr_index << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L369" class="LineNr"> 369 </span> reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> element = <a href='030container.cc.html#L430'>element_type</a><span class="Delimiter">(</span>type<span class="Delimiter">,</span> curr_index<span class="Delimiter">);</span> <span class="Comment">// not base_type</span> <span id="L370" class="LineNr"> 370 </span> <span class="Comment">// Compute Container Address Offset(element)</span> <span id="L371" class="LineNr"> 371 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_mu_address<span class="Delimiter">(</span>element<span class="Delimiter">))</span> <span class="Delimiter">{</span> -<span id="L372" class="LineNr"> 372 </span> <a href='003trace.cc.html#L169'>trace</a><span class="Delimiter">(</span><span class="Constant">9993</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"address at offset "</span> << curr_offset << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L372" class="LineNr"> 372 </span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9993</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"address at offset "</span> << curr_offset << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L373" class="LineNr"> 373 </span> <a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>out<span class="Delimiter">,</span> key<span class="Delimiter">).</span>insert<span class="Delimiter">(</span>address_element_info<span class="Delimiter">(</span>curr_offset<span class="Delimiter">,</span> <span class="Normal">new</span> type_tree<span class="Delimiter">(</span>*payload_type<span class="Delimiter">(</span>element<span class="Delimiter">.</span>type<span class="Delimiter">))));</span> <span id="L374" class="LineNr"> 374 </span> ++curr_offset<span class="Delimiter">;</span> <span id="L375" class="LineNr"> 375 </span> <span class="Delimiter">}</span> @@ -757,26 +757,26 @@ if ('onhashchange' in window) { <span id="L694" class="LineNr"> 694 </span><span class="Delimiter">:(before "End Increment Refcounts(canonized_x)")</span> <span id="L695" class="LineNr"> 695 </span><span class="Normal">if</span> <span class="Delimiter">(</span>is_mu_container<span class="Delimiter">(</span>canonized_x<span class="Delimiter">)</span> || is_mu_exclusive_container<span class="Delimiter">(</span>canonized_x<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span id="L696" class="LineNr"> 696 </span> <span class="Normal">const</span> container_metadata& metadata = get<span class="Delimiter">(</span>Container_metadata<span class="Delimiter">,</span> canonized_x<span class="Delimiter">.</span>type<span class="Delimiter">);</span> -<span id="L697" class="LineNr"> 697 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>map<set<tag_condition_info><span class="Delimiter">,</span> set<address_element_info> >::const_iterator p = metadata<span class="Delimiter">.</span><a href='043space.cc.html#L76'>address</a><span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != metadata<span class="Delimiter">.</span><a href='043space.cc.html#L76'>address</a><span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L697" class="LineNr"> 697 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>map<set<tag_condition_info><span class="Delimiter">,</span> set<address_element_info> >::const_iterator p = metadata<span class="Delimiter">.</span><a href='043space.cc.html#L76'>address</a><span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != metadata<span class="Delimiter">.</span><a href='043space.cc.html#L76'>address</a><span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L698" class="LineNr"> 698 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!all_match<span class="Delimiter">(</span>data<span class="Delimiter">,</span> p<span class="Delimiter">-></span>first<span class="Delimiter">))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> -<span id="L699" class="LineNr"> 699 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>set<address_element_info>::const_iterator info = p<span class="Delimiter">-></span>second<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> info != p<span class="Delimiter">-></span>second<span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> ++info<span class="Delimiter">)</span> +<span id="L699" class="LineNr"> 699 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>set<address_element_info>::const_iterator info = p<span class="Delimiter">-></span>second<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> info != p<span class="Delimiter">-></span>second<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++info<span class="Delimiter">)</span> <span id="L700" class="LineNr"> 700 </span> <a href='036refcount.cc.html#L43'>increment_refcount</a><span class="Delimiter">(</span>data<span class="Delimiter">.</span>at<span class="Delimiter">(</span>info<span class="Delimiter">-></span>offset<span class="Delimiter">));</span> <span id="L701" class="LineNr"> 701 </span> <span class="Delimiter">}</span> <span id="L702" class="LineNr"> 702 </span><span class="Delimiter">}</span> <span id="L703" class="LineNr"> 703 </span> <span id="L704" class="LineNr"> 704 </span><span class="Delimiter">:(before "End Decrement Refcounts(canonized_x)")</span> <span id="L705" class="LineNr"> 705 </span><span class="Normal">if</span> <span class="Delimiter">(</span>is_mu_container<span class="Delimiter">(</span>canonized_x<span class="Delimiter">)</span> || is_mu_exclusive_container<span class="Delimiter">(</span>canonized_x<span class="Delimiter">))</span> <span class="Delimiter">{</span> -<span id="L706" class="LineNr"> 706 </span> <a href='003trace.cc.html#L169'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"need to read old value of '"</span> << to_string<span class="Delimiter">(</span>canonized_x<span class="Delimiter">)</span> << <span class="Constant">"' to figure out what refcounts to decrement"</span> << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L706" class="LineNr"> 706 </span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"need to read old value of '"</span> << to_string<span class="Delimiter">(</span>canonized_x<span class="Delimiter">)</span> << <span class="Constant">"' to figure out what refcounts to decrement"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L707" class="LineNr"> 707 </span> <span class="Comment">// read from canonized_x but without canonizing again</span> <span id="L708" class="LineNr"> 708 </span> <span class="Comment">// todo: inline without running canonize all over again</span> <span id="L709" class="LineNr"> 709 </span> reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> tmp = canonized_x<span class="Delimiter">;</span> <span id="L710" class="LineNr"> 710 </span> tmp<span class="Delimiter">.</span>properties<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>pair<string<span class="Delimiter">,</span> string_tree*><span class="Delimiter">(</span><span class="Constant">"raw"</span><span class="Delimiter">,</span> <span class="Constant">NULL</span><span class="Delimiter">));</span> <span id="L711" class="LineNr"> 711 </span> vector<<span class="Normal">double</span>> data = read_memory<span class="Delimiter">(</span>tmp<span class="Delimiter">);</span> -<span id="L712" class="LineNr"> 712 </span> <a href='003trace.cc.html#L169'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"done reading old value of '"</span> << to_string<span class="Delimiter">(</span>canonized_x<span class="Delimiter">)</span> << <span class="Constant">"'"</span> << <a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> +<span id="L712" class="LineNr"> 712 </span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"done reading old value of '"</span> << to_string<span class="Delimiter">(</span>canonized_x<span class="Delimiter">)</span> << <span class="Constant">"'"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L713" class="LineNr"> 713 </span> <span class="Normal">const</span> container_metadata& metadata = get<span class="Delimiter">(</span>Container_metadata<span class="Delimiter">,</span> canonized_x<span class="Delimiter">.</span>type<span class="Delimiter">);</span> -<span id="L714" class="LineNr"> 714 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>map<set<tag_condition_info><span class="Delimiter">,</span> set<address_element_info> >::const_iterator p = metadata<span class="Delimiter">.</span><a href='043space.cc.html#L76'>address</a><span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != metadata<span class="Delimiter">.</span><a href='043space.cc.html#L76'>address</a><span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L714" class="LineNr"> 714 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>map<set<tag_condition_info><span class="Delimiter">,</span> set<address_element_info> >::const_iterator p = metadata<span class="Delimiter">.</span><a href='043space.cc.html#L76'>address</a><span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != metadata<span class="Delimiter">.</span><a href='043space.cc.html#L76'>address</a><span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L715" class="LineNr"> 715 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!all_match<span class="Delimiter">(</span>data<span class="Delimiter">,</span> p<span class="Delimiter">-></span>first<span class="Delimiter">))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> -<span id="L716" class="LineNr"> 716 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>set<address_element_info>::const_iterator info = p<span class="Delimiter">-></span>second<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> info != p<span class="Delimiter">-></span>second<span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> ++info<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L716" class="LineNr"> 716 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>set<address_element_info>::const_iterator info = p<span class="Delimiter">-></span>second<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> info != p<span class="Delimiter">-></span>second<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++info<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L717" class="LineNr"> 717 </span> <span class="Normal">int</span> element_address = <a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> canonized_x<span class="Delimiter">.</span>value + info<span class="Delimiter">-></span>offset<span class="Delimiter">);</span> <span id="L718" class="LineNr"> 718 </span> reagent<span class="Comment">/*</span><span class="Comment">local</span><span class="Comment">*/</span> element<span class="Delimiter">;</span> <span id="L719" class="LineNr"> 719 </span> element<span class="Delimiter">.</span><a href='010vm.cc.html#L65'>set_value</a><span class="Delimiter">(</span>element_address+<span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">);</span> @@ -788,7 +788,7 @@ if ('onhashchange' in window) { <span id="L725" class="LineNr"> 725 </span> <span id="L726" class="LineNr"> 726 </span><span class="Delimiter">:(code)</span> <span id="L727" class="LineNr"> 727 </span><span class="Normal">bool</span> <a href='036refcount.cc.html#L727'>all_match</a><span class="Delimiter">(</span><span class="Normal">const</span> vector<<span class="Normal">double</span>>& data<span class="Delimiter">,</span> <span class="Normal">const</span> set<tag_condition_info>& conditions<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L728" class="LineNr"> 728 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>set<tag_condition_info>::const_iterator p = conditions<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != conditions<span class="Delimiter">.</span><a href='003trace.cc.html#L193'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L728" class="LineNr"> 728 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>set<tag_condition_info>::const_iterator p = conditions<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != conditions<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L729" class="LineNr"> 729 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>data<span class="Delimiter">.</span>at<span class="Delimiter">(</span>p<span class="Delimiter">-></span>offset<span class="Delimiter">)</span> != p<span class="Delimiter">-></span>tag<span class="Delimiter">)</span> <span id="L730" class="LineNr"> 730 </span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span id="L731" class="LineNr"> 731 </span> <span class="Delimiter">}</span> |