diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-10-17 07:08:47 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-10-17 07:08:47 -0700 |
commit | 104e521c04d1a0cad9c68fb11e250e12ad8917ef (patch) | |
tree | df4258ad26cb78e25abee64c80aedab47aa461ea /html/033exclusive_container.cc.html | |
parent | 800320a70c981008302af56b2f35a142c1101401 (diff) | |
download | mu-104e521c04d1a0cad9c68fb11e250e12ad8917ef.tar.gz |
4709
Diffstat (limited to 'html/033exclusive_container.cc.html')
-rw-r--r-- | html/033exclusive_container.cc.html | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/html/033exclusive_container.cc.html b/html/033exclusive_container.cc.html index 7dc49376..8b618e76 100644 --- a/html/033exclusive_container.cc.html +++ b/html/033exclusive_container.cc.html @@ -151,28 +151,28 @@ if ('onhashchange' in window) { <span id="L87" class="LineNr"> 87 </span><span class="Normal">case</span> MAYBE_CONVERT: <span class="Delimiter">{</span> <span id="L88" class="LineNr"> 88 </span> <span class="Normal">const</span> recipe& caller = get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">);</span> <span id="L89" class="LineNr"> 89 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">)</span> != <span class="Constant">2</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L90" class="LineNr"> 90 </span> <a href='003trace.cc.html#L197'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"'maybe-convert' expects exactly 2 ingredients in '"</span> << to_original_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L90" class="LineNr"> 90 </span> <a href='003trace.cc.html#L196'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"'maybe-convert' expects exactly 2 ingredients in '"</span> << to_original_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L91" class="LineNr"> 91 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L92" class="LineNr"> 92 </span> <span class="Delimiter">}</span> <span id="L93" class="LineNr"> 93 </span> reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> base = inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> <span id="L94" class="LineNr"> 94 </span> <span class="Comment">// Update MAYBE_CONVERT base in Check</span> <span id="L95" class="LineNr"> 95 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!base<span class="Delimiter">.</span>type<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L96" class="LineNr"> 96 </span> <a href='003trace.cc.html#L197'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"first ingredient of 'maybe-convert' should be an exclusive-container, but got '"</span> << base<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L96" class="LineNr"> 96 </span> <a href='003trace.cc.html#L196'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"first ingredient of 'maybe-convert' should be an exclusive-container, but got '"</span> << base<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L97" class="LineNr"> 97 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L98" class="LineNr"> 98 </span> <span class="Delimiter">}</span> <span id="L99" class="LineNr"> 99 </span> <span class="Normal">const</span> type_tree* base_type = base<span class="Delimiter">.</span>type<span class="Delimiter">;</span> <span id="L100" class="LineNr">100 </span> <span class="Comment">// Update MAYBE_CONVERT base_type in Check</span> <span id="L101" class="LineNr">101 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!base_type<span class="Delimiter">-></span>atom || base_type<span class="Delimiter">-></span>value == <span class="Constant">0</span> || !contains_key<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> base_type<span class="Delimiter">-></span>value<span class="Delimiter">)</span> || get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> base_type<span class="Delimiter">-></span>value<span class="Delimiter">).</span>kind != <a href='010vm.cc.html#L181'>EXCLUSIVE_CONTAINER</a><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L102" class="LineNr">102 </span> <a href='003trace.cc.html#L197'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"first ingredient of 'maybe-convert' should be an exclusive-container, but got '"</span> << base<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L102" class="LineNr">102 </span> <a href='003trace.cc.html#L196'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"first ingredient of 'maybe-convert' should be an exclusive-container, but got '"</span> << base<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L103" class="LineNr">103 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L104" class="LineNr">104 </span> <span class="Delimiter">}</span> <span id="L105" class="LineNr">105 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_literal<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> -<span id="L106" class="LineNr">106 </span> <a href='003trace.cc.html#L197'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"second ingredient of 'maybe-convert' should have type 'variant', but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L106" class="LineNr">106 </span> <a href='003trace.cc.html#L196'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"second ingredient of 'maybe-convert' should have type 'variant', but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L107" class="LineNr">107 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L108" class="LineNr">108 </span> <span class="Delimiter">}</span> <span id="L109" class="LineNr">109 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L110" class="LineNr">110 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">)</span> != <span class="Constant">2</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L111" class="LineNr">111 </span> <a href='003trace.cc.html#L197'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"'maybe-convert' expects exactly 2 products in '"</span> << to_original_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L111" class="LineNr">111 </span> <a href='003trace.cc.html#L196'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"'maybe-convert' expects exactly 2 products in '"</span> << to_original_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L112" class="LineNr">112 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L113" class="LineNr">113 </span> <span class="Delimiter">}</span> <span id="L114" class="LineNr">114 </span> reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> product = inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> @@ -180,18 +180,18 @@ if ('onhashchange' in window) { <span id="L116" class="LineNr">116 </span> reagent& offset = inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> <span id="L117" class="LineNr">117 </span> <a href='012transform.cc.html#L91'>populate_value</a><span class="Delimiter">(</span>offset<span class="Delimiter">);</span> <span id="L118" class="LineNr">118 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>offset<span class="Delimiter">.</span>value >= <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> base_type<span class="Delimiter">-></span>value<span class="Delimiter">).</span>elements<span class="Delimiter">))</span> <span class="Delimiter">{</span> -<span id="L119" class="LineNr">119 </span> <a href='003trace.cc.html#L197'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"invalid tag "</span> << offset<span class="Delimiter">.</span>value << <span class="Constant">" in '"</span> << to_original_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span> << end<span class="Delimiter">();</span> +<span id="L119" class="LineNr">119 </span> <a href='003trace.cc.html#L196'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"invalid tag "</span> << offset<span class="Delimiter">.</span>value << <span class="Constant">" in '"</span> << to_original_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span> << end<span class="Delimiter">();</span> <span id="L120" class="LineNr">120 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L121" class="LineNr">121 </span> <span class="Delimiter">}</span> <span id="L122" class="LineNr">122 </span> <span class="Normal">const</span> reagent& variant = variant_type<span class="Delimiter">(</span>base<span class="Delimiter">,</span> offset<span class="Delimiter">.</span>value<span class="Delimiter">);</span> <span id="L123" class="LineNr">123 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!types_coercible<span class="Delimiter">(</span>product<span class="Delimiter">,</span> variant<span class="Delimiter">))</span> <span class="Delimiter">{</span> -<span id="L124" class="LineNr">124 </span> <a href='003trace.cc.html#L197'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"'maybe-convert "</span> << base<span class="Delimiter">.</span>original_string << <span class="Constant">", "</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>original_string << <span class="Constant">"' should write to "</span> << <a href='028call_return.cc.html#L163'>to_string</a><span class="Delimiter">(</span>variant<span class="Delimiter">.</span>type<span class="Delimiter">)</span> << <span class="Constant">" but '"</span> << product<span class="Delimiter">.</span>name << <span class="Constant">"' has type "</span> << <a href='028call_return.cc.html#L163'>to_string</a><span class="Delimiter">(</span>product<span class="Delimiter">.</span>type<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L124" class="LineNr">124 </span> <a href='003trace.cc.html#L196'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"'maybe-convert "</span> << base<span class="Delimiter">.</span>original_string << <span class="Constant">", "</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>original_string << <span class="Constant">"' should write to "</span> << <a href='028call_return.cc.html#L163'>to_string</a><span class="Delimiter">(</span>variant<span class="Delimiter">.</span>type<span class="Delimiter">)</span> << <span class="Constant">" but '"</span> << product<span class="Delimiter">.</span>name << <span class="Constant">"' has type "</span> << <a href='028call_return.cc.html#L163'>to_string</a><span class="Delimiter">(</span>product<span class="Delimiter">.</span>type<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L125" class="LineNr">125 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L126" class="LineNr">126 </span> <span class="Delimiter">}</span> <span id="L127" class="LineNr">127 </span> reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> status = inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> <span id="L128" class="LineNr">128 </span> <span class="Comment">// Update MAYBE_CONVERT status in Check</span> <span id="L129" class="LineNr">129 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_mu_boolean<span class="Delimiter">(</span>status<span class="Delimiter">))</span> <span class="Delimiter">{</span> -<span id="L130" class="LineNr">130 </span> <a href='003trace.cc.html#L197'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"second product yielded by 'maybe-convert' should be a boolean, but tried to write to '"</span> << inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L130" class="LineNr">130 </span> <a href='003trace.cc.html#L196'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"second product yielded by 'maybe-convert' should be a boolean, but tried to write to '"</span> << inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L131" class="LineNr">131 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L132" class="LineNr">132 </span> <span class="Delimiter">}</span> <span id="L133" class="LineNr">133 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -202,7 +202,7 @@ if ('onhashchange' in window) { <span id="L138" class="LineNr">138 </span> <span class="Comment">// Update MAYBE_CONVERT base in Run</span> <span id="L139" class="LineNr">139 </span> <span class="Normal">int</span> base_address = base<span class="Delimiter">.</span>value<span class="Delimiter">;</span> <span id="L140" class="LineNr">140 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>base_address == <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L141" class="LineNr">141 </span> <a href='003trace.cc.html#L197'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span><a href='026call.cc.html#L87'>current_recipe_name</a><span class="Delimiter">())</span> << <span class="Constant">"tried to access location 0 in '"</span> << to_original_string<span class="Delimiter">(</span>current_instruction<span class="Delimiter">())</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L141" class="LineNr">141 </span> <a href='003trace.cc.html#L196'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span><a href='026call.cc.html#L87'>current_recipe_name</a><span class="Delimiter">())</span> << <span class="Constant">"tried to access location 0 in '"</span> << to_original_string<span class="Delimiter">(</span>current_instruction<span class="Delimiter">())</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L142" class="LineNr">142 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L143" class="LineNr">143 </span> <span class="Delimiter">}</span> <span id="L144" class="LineNr">144 </span> <span class="Normal">int</span> tag = <a href='026call.cc.html#L89'>current_instruction</a><span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>value<span class="Delimiter">;</span> @@ -214,19 +214,19 @@ if ('onhashchange' in window) { <span id="L150" class="LineNr">150 </span> write_products =<span class="Constant"> false</span><span class="Delimiter">;</span> <span id="L151" class="LineNr">151 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>tag == <span class="Normal">static_cast</span><<span class="Normal">int</span>><span class="Delimiter">(</span><a href='001help.cc.html#L229'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> base_address<span class="Delimiter">)))</span> <span class="Delimiter">{</span> <span id="L152" class="LineNr">152 </span> <span class="Normal">const</span> reagent& variant = variant_type<span class="Delimiter">(</span>base<span class="Delimiter">,</span> tag<span class="Delimiter">);</span> -<span id="L153" class="LineNr">153 </span> <a href='003trace.cc.html#L190'>trace</a><span class="Delimiter">(</span><span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 1 in location "</span> << status<span class="Delimiter">.</span>value << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L153" class="LineNr">153 </span> <a href='003trace.cc.html#L189'>trace</a><span class="Delimiter">(</span><span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 1 in location "</span> << status<span class="Delimiter">.</span>value << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L154" class="LineNr">154 </span> <a href='001help.cc.html#L221'>put</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> status<span class="Delimiter">.</span>value<span class="Delimiter">,</span> <span class="Constant">1</span><span class="Delimiter">);</span> <span id="L155" class="LineNr">155 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_dummy<span class="Delimiter">(</span>product<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span id="L156" class="LineNr">156 </span> <span class="Comment">// Write Memory in Successful MAYBE_CONVERT in Run</span> <span id="L157" class="LineNr">157 </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 < size_of<span class="Delimiter">(</span>variant<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L158" class="LineNr">158 </span> <span class="Normal">double</span> val = <a href='001help.cc.html#L229'>get_or_insert</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> base_address+<span class="Comment">/*</span><span class="Comment">skip tag</span><span class="Comment">*/</span><span class="Constant">1</span>+i<span class="Delimiter">);</span> -<span id="L159" class="LineNr">159 </span> <a href='003trace.cc.html#L190'>trace</a><span class="Delimiter">(</span><span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"storing "</span> << no_scientific<span class="Delimiter">(</span>val<span class="Delimiter">)</span> << <span class="Constant">" in location "</span> << product<span class="Delimiter">.</span>value+i << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L159" class="LineNr">159 </span> <a href='003trace.cc.html#L189'>trace</a><span class="Delimiter">(</span><span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"storing "</span> << no_scientific<span class="Delimiter">(</span>val<span class="Delimiter">)</span> << <span class="Constant">" in location "</span> << product<span class="Delimiter">.</span>value+i << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L160" class="LineNr">160 </span> <a href='001help.cc.html#L221'>put</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> product<span class="Delimiter">.</span>value+i<span class="Delimiter">,</span> val<span class="Delimiter">);</span> <span id="L161" class="LineNr">161 </span> <span class="Delimiter">}</span> <span id="L162" class="LineNr">162 </span> <span class="Delimiter">}</span> <span id="L163" class="LineNr">163 </span> <span class="Delimiter">}</span> <span id="L164" class="LineNr">164 </span> <span class="Normal">else</span> <span class="Delimiter">{</span> -<span id="L165" class="LineNr">165 </span> <a href='003trace.cc.html#L190'>trace</a><span class="Delimiter">(</span><span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0 in location "</span> << status<span class="Delimiter">.</span>value << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L165" class="LineNr">165 </span> <a href='003trace.cc.html#L189'>trace</a><span class="Delimiter">(</span><span class="Constant">"mem"</span><span class="Delimiter">)</span> << <span class="Constant">"storing 0 in location "</span> << status<span class="Delimiter">.</span>value << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L166" class="LineNr">166 </span> <a href='001help.cc.html#L221'>put</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> status<span class="Delimiter">.</span>value<span class="Delimiter">,</span> <span class="Constant">0</span><span class="Delimiter">);</span> <span id="L167" class="LineNr">167 </span> <span class="Delimiter">}</span> <span id="L168" class="LineNr">168 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -369,22 +369,22 @@ if ('onhashchange' in window) { <span id="L305" class="LineNr">305 </span><span class="Delimiter">:(before "End <a href='031merge.cc.html#L142'>check_merge_call</a> Special-cases")</span> <span id="L306" class="LineNr">306 </span><span class="Normal">case</span> <a href='010vm.cc.html#L181'>EXCLUSIVE_CONTAINER</a>: <span class="Delimiter">{</span> <span id="L307" class="LineNr">307 </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="L308" class="LineNr">308 </span> <a href='003trace.cc.html#L190'>trace</a><span class="Delimiter">(</span><span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"checking exclusive container "</span> << <a href='028call_return.cc.html#L163'>to_string</a><span class="Delimiter">(</span>container<span class="Delimiter">)</span> << <span class="Constant">" vs ingredient "</span> << ingredient_index << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L308" class="LineNr">308 </span> <a href='003trace.cc.html#L189'>trace</a><span class="Delimiter">(</span><span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"checking exclusive container "</span> << <a href='028call_return.cc.html#L163'>to_string</a><span class="Delimiter">(</span>container<span class="Delimiter">)</span> << <span class="Constant">" vs ingredient "</span> << ingredient_index << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L309" class="LineNr">309 </span> <span class="Comment">// easy case: exact match</span> <span id="L310" class="LineNr">310 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>types_strictly_match<span class="Delimiter">(</span>container<span class="Delimiter">,</span> inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>ingredient_index<span class="Delimiter">)))</span> <span id="L311" class="LineNr">311 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L312" class="LineNr">312 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_literal<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>ingredient_index<span class="Delimiter">)))</span> <span class="Delimiter">{</span> -<span id="L313" class="LineNr">313 </span> <a href='003trace.cc.html#L197'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"ingredient "</span> << ingredient_index << <span class="Constant">" of 'merge' should be a literal, for the tag of exclusive-container '"</span> << container_info<span class="Delimiter">.</span>name << <span class="Constant">"' in '"</span> << to_original_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L313" class="LineNr">313 </span> <a href='003trace.cc.html#L196'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"ingredient "</span> << ingredient_index << <span class="Constant">" of 'merge' should be a literal, for the tag of exclusive-container '"</span> << container_info<span class="Delimiter">.</span>name << <span class="Constant">"' in '"</span> << to_original_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L314" class="LineNr">314 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L315" class="LineNr">315 </span> <span class="Delimiter">}</span> <span id="L316" class="LineNr">316 </span> reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> ingredient = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>ingredient_index<span class="Delimiter">);</span> <span class="Comment">// unnecessary copy just to keep this function from modifying caller</span> <span id="L317" class="LineNr">317 </span> <a href='012transform.cc.html#L91'>populate_value</a><span class="Delimiter">(</span>ingredient<span class="Delimiter">);</span> <span id="L318" class="LineNr">318 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>ingredient<span class="Delimiter">.</span>value >= <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>container_info<span class="Delimiter">.</span>elements<span class="Delimiter">))</span> <span class="Delimiter">{</span> -<span id="L319" class="LineNr">319 </span> <a href='003trace.cc.html#L197'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"invalid tag at "</span> << ingredient_index << <span class="Constant">" for '"</span> << container_info<span class="Delimiter">.</span>name << <span class="Constant">"' in '"</span> << to_original_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L319" class="LineNr">319 </span> <a href='003trace.cc.html#L196'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">)</span> << <span class="Constant">"invalid tag at "</span> << ingredient_index << <span class="Constant">" for '"</span> << container_info<span class="Delimiter">.</span>name << <span class="Constant">"' in '"</span> << to_original_string<span class="Delimiter">(</span>inst<span class="Delimiter">)</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L320" class="LineNr">320 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L321" class="LineNr">321 </span> <span class="Delimiter">}</span> <span id="L322" class="LineNr">322 </span> <span class="Normal">const</span> reagent& variant = variant_type<span class="Delimiter">(</span>container<span class="Delimiter">,</span> ingredient<span class="Delimiter">.</span>value<span class="Delimiter">);</span> -<span id="L323" class="LineNr">323 </span> <a href='003trace.cc.html#L190'>trace</a><span class="Delimiter">(</span><span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"tag: "</span> << ingredient<span class="Delimiter">.</span>value << <a href='003trace.cc.html#L226'>end</a><span class="Delimiter">();</span> +<span id="L323" class="LineNr">323 </span> <a href='003trace.cc.html#L189'>trace</a><span class="Delimiter">(</span><span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"tag: "</span> << ingredient<span class="Delimiter">.</span>value << <a href='003trace.cc.html#L225'>end</a><span class="Delimiter">();</span> <span id="L324" class="LineNr">324 </span> <span class="Comment">// replace union with its variant</span> <span id="L325" class="LineNr">325 </span> state<span class="Delimiter">.</span>data<span class="Delimiter">.</span>pop<span class="Delimiter">();</span> <span id="L326" class="LineNr">326 </span> state<span class="Delimiter">.</span>data<span class="Delimiter">.</span>push<span class="Delimiter">(</span>merge_check_point<span class="Delimiter">(</span>variant<span class="Delimiter">,</span> <span class="Constant">0</span><span class="Delimiter">));</span> |