about summary refs log tree commit diff stats
path: root/html/033exclusive_container.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2018-03-15 23:29:08 -0700
committerKartik K. Agaram <vc@akkartik.com>2018-03-15 23:29:08 -0700
commit7452d0525ecfc12c11fe005c31b089a5b4d7a102 (patch)
treeb4e661de29b33bdfa5b476d0fa4e45f51e5bf9f5 /html/033exclusive_container.cc.html
parent9b4f4b3e1c28efed457bbae50f23c1737a94450d (diff)
downloadmu-7452d0525ecfc12c11fe005c31b089a5b4d7a102.tar.gz
4228
Diffstat (limited to 'html/033exclusive_container.cc.html')
-rw-r--r--html/033exclusive_container.cc.html18
1 files changed, 9 insertions, 9 deletions
diff --git a/html/033exclusive_container.cc.html b/html/033exclusive_container.cc.html
index 48a7ab37..f9e8abe5 100644
--- a/html/033exclusive_container.cc.html
+++ b/html/033exclusive_container.cc.html
@@ -71,9 +71,9 @@ if ('onhashchange' in window) {
 <span id="L7" class="LineNr">  7 </span><span class="Delimiter">:(before &quot;End Mu Types Initialization&quot;)</span>
 <span id="L8" class="LineNr">  8 </span><span class="Comment">//: We'll use this container as a running example, with two number elements.</span>
 <span id="L9" class="LineNr">  9 </span><span class="Delimiter">{</span>
-<span id="L10" class="LineNr"> 10 </span><a href='010vm.cc.html#L123'>type_ordinal</a> tmp = <a href='001help.cc.html#L221'>put</a><span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> <span class="Constant">&quot;number-or-point&quot;</span><span class="Delimiter">,</span> Next_type_ordinal++<span class="Delimiter">);</span>
+<span id="L10" class="LineNr"> 10 </span><a href='010vm.cc.html#L124'>type_ordinal</a> tmp = <a href='001help.cc.html#L221'>put</a><span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> <span class="Constant">&quot;number-or-point&quot;</span><span class="Delimiter">,</span> Next_type_ordinal++<span class="Delimiter">);</span>
 <span id="L11" class="LineNr"> 11 </span><a href='001help.cc.html#L229'>get_or_insert</a><span class="Delimiter">(</span>Type<span class="Delimiter">,</span> tmp<span class="Delimiter">);</span>  <span class="Comment">// initialize</span>
-<span id="L12" class="LineNr"> 12 </span>get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> tmp<span class="Delimiter">).</span>kind = <a href='010vm.cc.html#L174'>EXCLUSIVE_CONTAINER</a><span class="Delimiter">;</span>
+<span id="L12" class="LineNr"> 12 </span>get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> tmp<span class="Delimiter">).</span>kind = <a href='010vm.cc.html#L175'>EXCLUSIVE_CONTAINER</a><span class="Delimiter">;</span>
 <span id="L13" class="LineNr"> 13 </span>get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> tmp<span class="Delimiter">).</span>name = <span class="Constant">&quot;number-or-point&quot;</span><span class="Delimiter">;</span>
 <span id="L14" class="LineNr"> 14 </span>get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> tmp<span class="Delimiter">).</span>elements<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>reagent<span class="Delimiter">(</span><span class="Constant">&quot;i:number&quot;</span><span class="Delimiter">));</span>
 <span id="L15" class="LineNr"> 15 </span>get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> tmp<span class="Delimiter">).</span>elements<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>reagent<span class="Delimiter">(</span><span class="Constant">&quot;p:point&quot;</span><span class="Delimiter">));</span>
@@ -95,12 +95,12 @@ if ('onhashchange' in window) {
 <span id="L31" class="LineNr"> 31 </span><span class="traceContains">+mem: storing 35 in location 6</span>
 <span id="L32" class="LineNr"> 32 </span>
 <span id="L33" class="LineNr"> 33 </span><span class="Delimiter">:(before &quot;End size_of(type) Special-cases&quot;)</span>
-<span id="L34" class="LineNr"> 34 </span><span class="Normal">if</span> <span class="Delimiter">(</span>t<span class="Delimiter">.</span>kind == <a href='010vm.cc.html#L174'>EXCLUSIVE_CONTAINER</a><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+<span id="L34" class="LineNr"> 34 </span><span class="Normal">if</span> <span class="Delimiter">(</span>t<span class="Delimiter">.</span>kind == <a href='010vm.cc.html#L175'>EXCLUSIVE_CONTAINER</a><span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L35" class="LineNr"> 35 </span>  <span class="Comment">// Compute size_of Exclusive Container</span>
 <span id="L36" class="LineNr"> 36 </span>  <span class="Identifier">return</span> get<span class="Delimiter">(</span>Container_metadata<span class="Delimiter">,</span> type<span class="Delimiter">).</span>size<span class="Delimiter">;</span>
 <span id="L37" class="LineNr"> 37 </span><span class="Delimiter">}</span>
 <span id="L38" class="LineNr"> 38 </span><span class="Delimiter">:(before &quot;End compute_container_sizes Atom Special-cases&quot;)</span>
-<span id="L39" class="LineNr"> 39 </span><span class="Normal">if</span> <span class="Delimiter">(</span>info<span class="Delimiter">.</span>kind == <a href='010vm.cc.html#L174'>EXCLUSIVE_CONTAINER</a><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+<span id="L39" class="LineNr"> 39 </span><span class="Normal">if</span> <span class="Delimiter">(</span>info<span class="Delimiter">.</span>kind == <a href='010vm.cc.html#L175'>EXCLUSIVE_CONTAINER</a><span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L40" class="LineNr"> 40 </span>  <a href='033exclusive_container.cc.html#L44'>compute_exclusive_container_sizes</a><span class="Delimiter">(</span>info<span class="Delimiter">,</span> type<span class="Delimiter">,</span> pending_metadata<span class="Delimiter">,</span> location_for_error_messages<span class="Delimiter">);</span>
 <span id="L41" class="LineNr"> 41 </span><span class="Delimiter">}</span>
 <span id="L42" class="LineNr"> 42 </span>
@@ -175,7 +175,7 @@ if ('onhashchange' in window) {
 <span id="L111" class="LineNr">111 </span>  <span class="Delimiter">}</span>
 <span id="L112" class="LineNr">112 </span>  <span class="Normal">const</span> type_tree* base_type = base<span class="Delimiter">.</span>type<span class="Delimiter">;</span>
 <span id="L113" class="LineNr">113 </span>  <span class="Comment">// Update MAYBE_CONVERT base_type in Check</span>
-<span id="L114" class="LineNr">114 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>!base_type<span class="Delimiter">-&gt;</span>atom || base_type<span class="Delimiter">-&gt;</span>value == <span class="Constant">0</span> || !contains_key<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> base_type<span class="Delimiter">-&gt;</span>value<span class="Delimiter">)</span> || get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> base_type<span class="Delimiter">-&gt;</span>value<span class="Delimiter">).</span>kind != <a href='010vm.cc.html#L174'>EXCLUSIVE_CONTAINER</a><span class="Delimiter">)</span> <span class="Delimiter">{</span>
+<span id="L114" class="LineNr">114 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>!base_type<span class="Delimiter">-&gt;</span>atom || base_type<span class="Delimiter">-&gt;</span>value == <span class="Constant">0</span> || !contains_key<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> base_type<span class="Delimiter">-&gt;</span>value<span class="Delimiter">)</span> || get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> base_type<span class="Delimiter">-&gt;</span>value<span class="Delimiter">).</span>kind != <a href='010vm.cc.html#L175'>EXCLUSIVE_CONTAINER</a><span class="Delimiter">)</span> <span class="Delimiter">{</span>
 <span id="L115" class="LineNr">115 </span>    <a href='003trace.cc.html#L174'>raise</a> &lt;&lt; <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;first ingredient of 'maybe-convert' should be an exclusive-container, but got '&quot;</span> &lt;&lt; base<span class="Delimiter">.</span>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="L116" class="LineNr">116 </span>    <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span id="L117" class="LineNr">117 </span>  <span class="Delimiter">}</span>
@@ -256,7 +256,7 @@ if ('onhashchange' in window) {
 <span id="L192" class="LineNr">192 </span>  assert<span class="Delimiter">(</span>contains_key<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> root_type<span class="Delimiter">-&gt;</span>value<span class="Delimiter">));</span>
 <span id="L193" class="LineNr">193 </span>  assert<span class="Delimiter">(</span>!get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> root_type<span class="Delimiter">-&gt;</span>value<span class="Delimiter">).</span>name<span class="Delimiter">.</span>empty<span class="Delimiter">());</span>
 <span id="L194" class="LineNr">194 </span>  <span class="Normal">const</span> type_info&amp; info = get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> root_type<span class="Delimiter">-&gt;</span>value<span class="Delimiter">);</span>
-<span id="L195" class="LineNr">195 </span>  assert<span class="Delimiter">(</span>info<span class="Delimiter">.</span>kind == <a href='010vm.cc.html#L174'>EXCLUSIVE_CONTAINER</a><span class="Delimiter">);</span>
+<span id="L195" class="LineNr">195 </span>  assert<span class="Delimiter">(</span>info<span class="Delimiter">.</span>kind == <a href='010vm.cc.html#L175'>EXCLUSIVE_CONTAINER</a><span class="Delimiter">);</span>
 <span id="L196" class="LineNr">196 </span>  reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> element = info<span class="Delimiter">.</span>elements<span class="Delimiter">.</span>at<span class="Delimiter">(</span>tag<span class="Delimiter">);</span>
 <span id="L197" class="LineNr">197 </span>  <span class="Comment">// End variant_type Special-cases</span>
 <span id="L198" class="LineNr">198 </span>  <span class="Identifier">return</span> element<span class="Delimiter">;</span>
@@ -294,7 +294,7 @@ if ('onhashchange' in window) {
 <span id="L230" class="LineNr">230 </span>
 <span id="L231" class="LineNr">231 </span><span class="Delimiter">:(before &quot;End Command Handlers&quot;)</span>
 <span id="L232" class="LineNr">232 </span><span class="Normal">else</span> <span class="Normal">if</span> <span class="Delimiter">(</span>command == <span class="Constant">&quot;exclusive-container&quot;</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
-<span id="L233" class="LineNr">233 </span>  <a href='030container.cc.html#L661'>insert_container</a><span class="Delimiter">(</span>command<span class="Delimiter">,</span> <a href='010vm.cc.html#L174'>EXCLUSIVE_CONTAINER</a><span class="Delimiter">,</span> in<span class="Delimiter">);</span>
+<span id="L233" class="LineNr">233 </span>  <a href='030container.cc.html#L661'>insert_container</a><span class="Delimiter">(</span>command<span class="Delimiter">,</span> <a href='010vm.cc.html#L175'>EXCLUSIVE_CONTAINER</a><span class="Delimiter">,</span> in<span class="Delimiter">);</span>
 <span id="L234" class="LineNr">234 </span><span class="Delimiter">}</span>
 <span id="L235" class="LineNr">235 </span>
 <span id="L236" class="LineNr">236 </span><span class="Comment">//: arrays are disallowed inside exclusive containers unless their length is</span>
@@ -380,7 +380,7 @@ if ('onhashchange' in window) {
 <span id="L316" class="LineNr">316 </span>$error: <span class="Constant">0</span>
 <span id="L317" class="LineNr">317 </span>
 <span id="L318" class="LineNr">318 </span><span class="Delimiter">:(before &quot;End <a href='031merge.cc.html#L142'>check_merge_call</a> Special-cases&quot;)</span>
-<span id="L319" class="LineNr">319 </span><span class="Normal">case</span> <a href='010vm.cc.html#L174'>EXCLUSIVE_CONTAINER</a>: <span class="Delimiter">{</span>
+<span id="L319" class="LineNr">319 </span><span class="Normal">case</span> <a href='010vm.cc.html#L175'>EXCLUSIVE_CONTAINER</a>: <span class="Delimiter">{</span>
 <span id="L320" class="LineNr">320 </span>  assert<span class="Delimiter">(</span>state<span class="Delimiter">.</span>data<span class="Delimiter">.</span>top<span class="Delimiter">().</span>container_element_index == <span class="Constant">0</span><span class="Delimiter">);</span>
 <span id="L321" class="LineNr">321 </span>  <a href='003trace.cc.html#L167'>trace</a><span class="Delimiter">(</span><span class="Constant">&quot;transform&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;checking exclusive container &quot;</span> &lt;&lt; <a href='028call_return.cc.html#L163'>to_string</a><span class="Delimiter">(</span>container<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; vs ingredient &quot;</span> &lt;&lt; ingredient_index &lt;&lt; <a href='003trace.cc.html#L203'>end</a><span class="Delimiter">();</span>
 <span id="L322" class="LineNr">322 </span>  <span class="Comment">// easy case: exact match</span>
@@ -509,7 +509,7 @@ if ('onhashchange' in window) {
 <span id="L445" class="LineNr">445 </span>  <span class="Comment">// Update size_mismatch Check for MERGE(x)</span>
 <span id="L446" class="LineNr">446 </span>  <span class="Normal">const</span> type_tree* root_type = x<span class="Delimiter">.</span>type<span class="Delimiter">-&gt;</span>atom ? x<span class="Delimiter">.</span>type : x<span class="Delimiter">.</span>type<span class="Delimiter">-&gt;</span>left<span class="Delimiter">;</span>
 <span id="L447" class="LineNr">447 </span>  assert<span class="Delimiter">(</span>root_type<span class="Delimiter">-&gt;</span>atom<span class="Delimiter">);</span>
-<span id="L448" class="LineNr">448 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> root_type<span class="Delimiter">-&gt;</span>value<span class="Delimiter">).</span>kind == <a href='010vm.cc.html#L174'>EXCLUSIVE_CONTAINER</a><span class="Delimiter">)</span>
+<span id="L448" class="LineNr">448 </span>  <span class="Normal">if</span> <span class="Delimiter">(</span>get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> root_type<span class="Delimiter">-&gt;</span>value<span class="Delimiter">).</span>kind == <a href='010vm.cc.html#L175'>EXCLUSIVE_CONTAINER</a><span class="Delimiter">)</span>
 <span id="L449" class="LineNr">449 </span>    <span class="Identifier">return</span> size_of<span class="Delimiter">(</span>x<span class="Delimiter">)</span> &lt; <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>data<span class="Delimiter">);</span>
 <span id="L450" class="LineNr">450 </span><span class="Delimiter">}</span>
 <span id="L451" class="LineNr">451 </span>