diff options
Diffstat (limited to 'html/037abandon.cc.html')
-rw-r--r-- | html/037abandon.cc.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/html/037abandon.cc.html b/html/037abandon.cc.html index 1339c4f0..89ea879c 100644 --- a/html/037abandon.cc.html +++ b/html/037abandon.cc.html @@ -63,7 +63,7 @@ map<<span class="Normal">int</span><span class="Delimiter">,</span> <span cla <span class="Normal">void</span> abandon<span class="Delimiter">(</span><span class="Normal">int</span> address<span class="Delimiter">,</span> <span class="Normal">const</span> type_tree* payload_type<span class="Delimiter">,</span> <span class="Normal">int</span> payload_size<span class="Delimiter">)</span> <span class="Delimiter">{</span> trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"abandon"</span><span class="Delimiter">)</span> << <span class="Constant">"updating refcounts inside "</span> << address << <span class="Constant">": "</span> << to_string<span class="Delimiter">(</span>payload_type<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span class="CommentedCode">//? Total_free += size;</span> -<span class="CommentedCode">//? Num_free++;</span> +<span class="CommentedCode">//? ++Num_free;</span> <span class="CommentedCode">//? cerr << "abandon: " << size << '\n';</span> <span class="Comment">// decrement any contained refcounts</span> <span class="Normal">if</span> <span class="Delimiter">(</span>payload_type<span class="Delimiter">-></span>name == <span class="Constant">"array"</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> @@ -73,7 +73,7 @@ map<<span class="Normal">int</span><span class="Delimiter">,</span> <span cla assert<span class="Delimiter">(</span>element<span class="Delimiter">.</span>type<span class="Delimiter">-></span>name != <span class="Constant">"array"</span><span class="Delimiter">);</span> <span class="Normal">int</span> element_size = size_of<span class="Delimiter">(</span>element<span class="Delimiter">);</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 < array_length<span class="Delimiter">;</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> - element<span class="Delimiter">.</span>set_value<span class="Delimiter">(</span>address + <span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span> + <span class="Comment">/*</span><span class="Comment">skip array length</span><span class="Comment">*/</span><span class="Constant">1</span> + i*element_size<span class="Delimiter">);</span> + element<span class="Delimiter">.</span>set_value<span class="Delimiter">(</span>address + <span class="Comment">/*</span><span class="Comment">skip refcount and length</span><span class="Comment">*/</span><span class="Constant">2</span> + i*element_size<span class="Delimiter">);</span> decrement_any_refcounts<span class="Delimiter">(</span>element<span class="Delimiter">);</span> <span class="Delimiter">}</span> <span class="Delimiter">}</span> |