diff options
Diffstat (limited to 'html/037abandon.cc.html')
-rw-r--r-- | html/037abandon.cc.html | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/html/037abandon.cc.html b/html/037abandon.cc.html index c686c4cc..78af3348 100644 --- a/html/037abandon.cc.html +++ b/html/037abandon.cc.html @@ -15,17 +15,18 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color a { text-decoration: none; } a:hover { text-decoration: underline; } * { font-size: 12pt; font-size: 1em; } -.Constant { color: #00a0a0; } -.Special { color: #c00000; } +.CommentedCode { color: #6c6c6c; } .muRecipe { color: #ff8700; } -.cSpecial { color: #008000; } -.Comment { color: #9090ff; } -.Delimiter { color: #800080; } +.muData { color: #ffff00; } .LineNr { color: #444444; } .traceContains { color: #008000; } +.Delimiter { color: #800080; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.muData { color: #ffff00; } -.CommentedCode { color: #6c6c6c; } +.cSpecial { color: #008000; } +.Conceal { color: #4e4e4e; } +.Comment { color: #9090ff; } +.Constant { color: #00a0a0; } +.Special { color: #c00000; } .Identifier { color: #c0a020; } --> </style> @@ -95,25 +96,25 @@ if ('onhashchange' in window) { <span id="L32" class="LineNr"> 32 </span><span class="CommentedCode">//? cerr << "abandon: " << size << '\n';</span> <span id="L33" class="LineNr"> 33 </span> <span class="Comment">// decrement any contained refcounts</span> <span id="L34" class="LineNr"> 34 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_mu_array<span class="Delimiter">(</span><a href='030container.cc.html#L238'>payload_type</a><span class="Delimiter">))</span> <span class="Delimiter">{</span> -<span id="L35" class="LineNr"> 35 </span> reagent<span class="Comment">/*</span><span class="Comment">local</span><span class="Comment">*/</span> element<span class="Delimiter">;</span> -<span id="L36" class="LineNr"> 36 </span> element<span class="Delimiter">.</span>type = <a href='032array.cc.html#L366'>copy_array_element</a><span class="Delimiter">(</span><a href='030container.cc.html#L238'>payload_type</a><span class="Delimiter">);</span> -<span id="L37" class="LineNr"> 37 </span> <span class="Normal">int</span> <a href='032array.cc.html#L386'>array_length</a> = <a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<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="Delimiter">);</span> -<span id="L38" class="LineNr"> 38 </span> 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 id="L39" class="LineNr"> 39 </span> <span class="Normal">int</span> element_size = size_of<span class="Delimiter">(</span>element<span class="Delimiter">);</span> -<span id="L40" class="LineNr"> 40 </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='032array.cc.html#L386'>array_length</a><span class="Delimiter">;</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L41" class="LineNr"> 41 </span> element<span class="Delimiter">.</span><a href='010vm.cc.html#L65'>set_value</a><span class="Delimiter">(</span><a href='043space.cc.html#L76'>address</a> + <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> -<span id="L42" class="LineNr"> 42 </span> <a href='036refcount.cc.html#L51'>decrement_any_refcounts</a><span class="Delimiter">(</span>element<span class="Delimiter">);</span> -<span id="L43" class="LineNr"> 43 </span> <span class="Delimiter">}</span> +<span id="L35" class="LineNr"> 35 </span> <span class="Conceal">¦</span> reagent<span class="Comment">/*</span><span class="Comment">local</span><span class="Comment">*/</span> element<span class="Delimiter">;</span> +<span id="L36" class="LineNr"> 36 </span> <span class="Conceal">¦</span> element<span class="Delimiter">.</span>type = <a href='032array.cc.html#L366'>copy_array_element</a><span class="Delimiter">(</span><a href='030container.cc.html#L238'>payload_type</a><span class="Delimiter">);</span> +<span id="L37" class="LineNr"> 37 </span> <span class="Conceal">¦</span> <span class="Normal">int</span> <a href='032array.cc.html#L386'>array_length</a> = <a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<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="Delimiter">);</span> +<span id="L38" class="LineNr"> 38 </span> <span class="Conceal">¦</span> 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 id="L39" class="LineNr"> 39 </span> <span class="Conceal">¦</span> <span class="Normal">int</span> element_size = size_of<span class="Delimiter">(</span>element<span class="Delimiter">);</span> +<span id="L40" class="LineNr"> 40 </span> <span class="Conceal">¦</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='032array.cc.html#L386'>array_length</a><span class="Delimiter">;</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L41" class="LineNr"> 41 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> element<span class="Delimiter">.</span><a href='010vm.cc.html#L65'>set_value</a><span class="Delimiter">(</span><a href='043space.cc.html#L76'>address</a> + <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> +<span id="L42" class="LineNr"> 42 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='036refcount.cc.html#L51'>decrement_any_refcounts</a><span class="Delimiter">(</span>element<span class="Delimiter">);</span> +<span id="L43" class="LineNr"> 43 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L44" class="LineNr"> 44 </span> <span class="Delimiter">}</span> <span id="L45" class="LineNr"> 45 </span> <span class="Normal">else</span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_mu_container<span class="Delimiter">(</span><a href='030container.cc.html#L238'>payload_type</a><span class="Delimiter">)</span> || is_mu_exclusive_container<span class="Delimiter">(</span><a href='030container.cc.html#L238'>payload_type</a><span class="Delimiter">))</span> <span class="Delimiter">{</span> -<span id="L46" class="LineNr"> 46 </span> reagent tmp<span class="Delimiter">;</span> -<span id="L47" class="LineNr"> 47 </span> tmp<span class="Delimiter">.</span>type = <span class="Normal">new</span> type_tree<span class="Delimiter">(</span>*payload_type<span class="Delimiter">);</span> -<span id="L48" class="LineNr"> 48 </span> tmp<span class="Delimiter">.</span><a href='010vm.cc.html#L65'>set_value</a><span class="Delimiter">(</span><a href='043space.cc.html#L76'>address</a> + <span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">);</span> -<span id="L49" class="LineNr"> 49 </span> <a href='036refcount.cc.html#L51'>decrement_any_refcounts</a><span class="Delimiter">(</span>tmp<span class="Delimiter">);</span> +<span id="L46" class="LineNr"> 46 </span> <span class="Conceal">¦</span> reagent tmp<span class="Delimiter">;</span> +<span id="L47" class="LineNr"> 47 </span> <span class="Conceal">¦</span> tmp<span class="Delimiter">.</span>type = <span class="Normal">new</span> type_tree<span class="Delimiter">(</span>*payload_type<span class="Delimiter">);</span> +<span id="L48" class="LineNr"> 48 </span> <span class="Conceal">¦</span> tmp<span class="Delimiter">.</span><a href='010vm.cc.html#L65'>set_value</a><span class="Delimiter">(</span><a href='043space.cc.html#L76'>address</a> + <span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">);</span> +<span id="L49" class="LineNr"> 49 </span> <span class="Conceal">¦</span> <a href='036refcount.cc.html#L51'>decrement_any_refcounts</a><span class="Delimiter">(</span>tmp<span class="Delimiter">);</span> <span id="L50" class="LineNr"> 50 </span> <span class="Delimiter">}</span> <span id="L51" class="LineNr"> 51 </span> <span class="Comment">// clear memory</span> <span id="L52" class="LineNr"> 52 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> curr = <a href='043space.cc.html#L76'>address</a><span class="Delimiter">;</span> curr < address+payload_size<span class="Delimiter">;</span> ++curr<span class="Delimiter">)</span> -<span id="L53" class="LineNr"> 53 </span> <a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">,</span> <span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L53" class="LineNr"> 53 </span> <span class="Conceal">¦</span> <a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">,</span> <span class="Constant">0</span><span class="Delimiter">);</span> <span id="L54" class="LineNr"> 54 </span> <span class="Comment">// append existing free list to address</span> <span id="L55" class="LineNr"> 55 </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">"abandon"</span><span class="Delimiter">)</span> << <span class="Constant">"saving "</span> << <a href='043space.cc.html#L76'>address</a> << <span class="Constant">" in free-list of size "</span> << <a href='036refcount.cc.html#L82'>payload_size</a> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> <span id="L56" class="LineNr"> 56 </span> <a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> <a href='043space.cc.html#L76'>address</a><span class="Delimiter">,</span> <a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Current_routine<span class="Delimiter">-></span>free_list<span class="Delimiter">,</span> <a href='036refcount.cc.html#L82'>payload_size</a><span class="Delimiter">));</span> @@ -128,10 +129,10 @@ if ('onhashchange' in window) { <span id="L65" class="LineNr"> 65 </span> <a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Current_routine<span class="Delimiter">-></span>free_list<span class="Delimiter">,</span> size<span class="Delimiter">,</span> <a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> result<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> result<span class="Delimiter">,</span> <span class="Constant">0</span><span class="Delimiter">);</span> <span id="L67" class="LineNr"> 67 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> curr = result<span class="Delimiter">;</span> curr < result+size<span class="Delimiter">;</span> ++curr<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L68" class="LineNr"> 68 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<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#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>current_recipe_name<span class="Delimiter">())</span> << <span class="Constant">"memory in free list was not zeroed out: "</span> << curr << <span class="Constant">'/'</span> << result << <span class="Constant">"; somebody wrote to us after free!!!</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L70" class="LineNr"> 70 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Comment">// always fatal</span> -<span id="L71" class="LineNr"> 71 </span> <span class="Delimiter">}</span> +<span id="L68" class="LineNr"> 68 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L225'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">)</span> != <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L69" class="LineNr"> 69 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>current_recipe_name<span class="Delimiter">())</span> << <span class="Constant">"memory in free list was not zeroed out: "</span> << curr << <span class="Constant">'/'</span> << result << <span class="Constant">"; somebody wrote to us after free!!!</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L70" class="LineNr"> 70 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Comment">// always fatal</span> +<span id="L71" class="LineNr"> 71 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L72" class="LineNr"> 72 </span> <span class="Delimiter">}</span> <span id="L73" class="LineNr"> 73 </span> <span class="Identifier">return</span> result<span class="Delimiter">;</span> <span id="L74" class="LineNr"> 74 </span><span class="Delimiter">}</span> |