diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-05-12 10:22:26 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-05-12 10:22:26 -0700 |
commit | cdf2822743b3beeb37ebc3deea8e08b6130698c5 (patch) | |
tree | b7946314d79e8df95eb16703b65832e20f7ee620 /html/010vm.cc.html | |
parent | bd222553d7bc7d91d3eebae5639b01f58c8f7c75 (diff) | |
download | mu-cdf2822743b3beeb37ebc3deea8e08b6130698c5.tar.gz |
4242 - get rid of refcounts entirely
We're going to lean back into the experiment of commit 4179 back in Jan. If we delete memory it's up to us to ensure no pointers into it survive. Since deep-copy depends on our refcounting infrastructure, it's gone as well. So we're going to have to start watching out for pointers shared over channels.
Diffstat (limited to 'html/010vm.cc.html')
-rw-r--r-- | html/010vm.cc.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/html/010vm.cc.html b/html/010vm.cc.html index 096cc89f..a22385f6 100644 --- a/html/010vm.cc.html +++ b/html/010vm.cc.html @@ -408,7 +408,7 @@ if ('onhashchange' in window) { <span id="L345" class="LineNr">345 </span> <span class="Normal">int</span> value = <span class="Constant">0</span><span class="Delimiter">;</span> <span id="L346" class="LineNr">346 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>contains_key<span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> type_name<span class="Delimiter">))</span> <span id="L347" class="LineNr">347 </span> value = get<span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> type_name<span class="Delimiter">);</span> -<span id="L348" class="LineNr">348 </span> <span class="Normal">else</span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_integer<span class="Delimiter">(</span>type_name<span class="Delimiter">))</span> <span class="Comment">// sometimes types will contain non-type tags, like numbers for the size of an array</span> +<span id="L348" class="LineNr">348 </span> <span class="Normal">else</span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_integer<span class="Delimiter">(</span>type_name<span class="Delimiter">))</span> <span class="Comment">// sometimes types will contain literal integers, like for the size of an array</span> <span id="L349" class="LineNr">349 </span> value = <span class="Constant">0</span><span class="Delimiter">;</span> <span id="L350" class="LineNr">350 </span> <span class="Normal">else</span> <span class="Normal">if</span> <span class="Delimiter">(</span>properties<span class="Delimiter">-></span>value == <span class="Constant">"->"</span><span class="Delimiter">)</span> <span class="Comment">// used in recipe types</span> <span id="L351" class="LineNr">351 </span> value = <span class="Constant">0</span><span class="Delimiter">;</span> @@ -464,7 +464,7 @@ if ('onhashchange' in window) { <span id="L401" class="LineNr">401 </span><span class="Comment">// only constraint we care about: if a < b then !(b < a)</span> <span id="L402" class="LineNr">402 </span><span class="Normal">bool</span> type_tree::<span class="Normal">operator</span><<span class="Delimiter">(</span><span class="Normal">const</span> type_tree& other<span class="Delimiter">)</span> <span class="Normal">const</span> <span class="Delimiter">{</span> <span id="L403" class="LineNr">403 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>atom != other<span class="Delimiter">.</span>atom<span class="Delimiter">)</span> <span class="Identifier">return</span> atom > other<span class="Delimiter">.</span>atom<span class="Delimiter">;</span> <span class="Comment">// atoms before non-atoms</span> -<span id="L404" class="LineNr">404 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>atom<span class="Delimiter">)</span> <span class="Identifier">return</span> name < other<span class="Delimiter">.</span>name<span class="Delimiter">;</span> <span class="Comment">// sort atoms in lexical order</span> +<span id="L404" class="LineNr">404 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>atom<span class="Delimiter">)</span> <span class="Identifier">return</span> value < other<span class="Delimiter">.</span>value<span class="Delimiter">;</span> <span id="L405" class="LineNr">405 </span> <span class="Comment">// first location in one that's missing in the other makes that side 'smaller'</span> <span id="L406" class="LineNr">406 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>left && !other<span class="Delimiter">.</span>left<span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span id="L407" class="LineNr">407 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!left && other<span class="Delimiter">.</span>left<span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> @@ -518,7 +518,7 @@ if ('onhashchange' in window) { <span id="L455" class="LineNr">455 </span> <a href='002test.cc.html#L24'>CHECK</a><span class="Delimiter">(</span>!<span class="Delimiter">(</span>*b<span class="Delimiter">.</span>type < *a<span class="Delimiter">.</span>type<span class="Delimiter">));</span> <span id="L456" class="LineNr">456 </span><span class="Delimiter">}</span> <span id="L457" class="LineNr">457 </span><span class="Normal">void</span> test_compare_list_with_smaller_left_but_larger_right<span class="Delimiter">()</span> <span class="Delimiter">{</span> -<span id="L458" class="LineNr">458 </span> reagent a<span class="Delimiter">(</span><span class="Constant">"a:<a href='043space.cc.html#L80'>address</a>:number"</span><span class="Delimiter">),</span> b<span class="Delimiter">(</span><span class="Constant">"b:character:array"</span><span class="Delimiter">);</span> +<span id="L458" class="LineNr">458 </span> reagent a<span class="Delimiter">(</span><span class="Constant">"a:number:character"</span><span class="Delimiter">),</span> b<span class="Delimiter">(</span><span class="Constant">"b:boolean:array"</span><span class="Delimiter">);</span> <span id="L459" class="LineNr">459 </span> <a href='002test.cc.html#L24'>CHECK</a><span class="Delimiter">(</span>*a<span class="Delimiter">.</span>type < *b<span class="Delimiter">.</span>type<span class="Delimiter">);</span> <span id="L460" class="LineNr">460 </span> <a href='002test.cc.html#L24'>CHECK</a><span class="Delimiter">(</span>!<span class="Delimiter">(</span>*b<span class="Delimiter">.</span>type < *a<span class="Delimiter">.</span>type<span class="Delimiter">));</span> <span id="L461" class="LineNr">461 </span><span class="Delimiter">}</span> |