about summary refs log tree commit diff stats
path: root/html/074deep_copy.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-11-11 15:54:19 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-11-11 15:54:19 -0800
commit6d007fda037331e7761d2a9ed3a2e435131daf7e (patch)
tree656aa7fe284b2b11c01f0389fe81f1b31025ce4e /html/074deep_copy.cc.html
parentc9f920da6e6b3e7049f078fea35e08256cae7c5b (diff)
downloadmu-6d007fda037331e7761d2a9ed3a2e435131daf7e.tar.gz
3667
Diffstat (limited to 'html/074deep_copy.cc.html')
-rw-r--r--html/074deep_copy.cc.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/html/074deep_copy.cc.html b/html/074deep_copy.cc.html
index a4bc1c10..7d6570dd 100644
--- a/html/074deep_copy.cc.html
+++ b/html/074deep_copy.cc.html
@@ -254,7 +254,7 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span
   products<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>deep_copy<span class="Delimiter">(</span>input<span class="Delimiter">,</span> tmp<span class="Delimiter">));</span>
   <span class="Comment">// reclaim Mu memory allocated for tmp</span>
   trace<span class="Delimiter">(</span><span class="Constant">9991</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;deep-copy: reclaiming temporary&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
-  abandon<span class="Delimiter">(</span>tmp<span class="Delimiter">.</span>value<span class="Delimiter">,</span> tmp<span class="Delimiter">.</span>type<span class="Delimiter">-&gt;</span>right<span class="Delimiter">,</span> payload_size<span class="Delimiter">(</span>tmp<span class="Delimiter">));</span>
+  abandon<span class="Delimiter">(</span>tmp<span class="Delimiter">.</span>value<span class="Delimiter">,</span> payload_type<span class="Delimiter">(</span>tmp<span class="Delimiter">.</span>type<span class="Delimiter">),</span> payload_size<span class="Delimiter">(</span>tmp<span class="Delimiter">));</span>
   <span class="Comment">// reclaim host memory allocated for tmp.type when tmp goes out of scope</span>
   <span class="Identifier">break</span><span class="Delimiter">;</span>
 <span class="Delimiter">}</span>
@@ -319,7 +319,10 @@ vector&lt;<span class="Normal">double</span>&gt; deep_copy<span class="Delimiter
       <span class="Comment">// construct a fake reagent that reads directly from the appropriate</span>
       <span class="Comment">// field of the container</span>
       reagent curr<span class="Delimiter">;</span>
-      curr<span class="Delimiter">.</span>type = <span class="Normal">new</span> type_tree<span class="Delimiter">(</span><span class="Normal">new</span> type_tree<span class="Delimiter">(</span><span class="Constant">&quot;address&quot;</span><span class="Delimiter">),</span> <span class="Normal">new</span> type_tree<span class="Delimiter">(</span>*info<span class="Delimiter">-&gt;</span>payload_type<span class="Delimiter">));</span>
+      <span class="Normal">if</span> <span class="Delimiter">(</span>info<span class="Delimiter">-&gt;</span>payload_type<span class="Delimiter">-&gt;</span>atom<span class="Delimiter">)</span>
+        curr<span class="Delimiter">.</span>type = <span class="Normal">new</span> type_tree<span class="Delimiter">(</span><span class="Normal">new</span> type_tree<span class="Delimiter">(</span><span class="Constant">&quot;address&quot;</span><span class="Delimiter">),</span> <span class="Normal">new</span> type_tree<span class="Delimiter">(</span><span class="Normal">new</span> type_tree<span class="Delimiter">(</span>info<span class="Delimiter">-&gt;</span>payload_type<span class="Delimiter">-&gt;</span>name<span class="Delimiter">),</span> <span class="Constant">NULL</span><span class="Delimiter">));</span>
+      <span class="Normal">else</span>
+        curr<span class="Delimiter">.</span>type = <span class="Normal">new</span> type_tree<span class="Delimiter">(</span><span class="Normal">new</span> type_tree<span class="Delimiter">(</span><span class="Constant">&quot;address&quot;</span><span class="Delimiter">),</span> <span class="Normal">new</span> type_tree<span class="Delimiter">(</span>*info<span class="Delimiter">-&gt;</span>payload_type<span class="Delimiter">));</span>
       curr<span class="Delimiter">.</span>set_value<span class="Delimiter">(</span>canonized_in<span class="Delimiter">.</span>value + info<span class="Delimiter">-&gt;</span>offset<span class="Delimiter">);</span>
       curr<span class="Delimiter">.</span>properties<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>pair&lt;string<span class="Delimiter">,</span> string_tree*&gt;<span class="Delimiter">(</span><span class="Constant">&quot;raw&quot;</span><span class="Delimiter">,</span> <span class="Constant">NULL</span><span class="Delimiter">));</span>
       trace<span class="Delimiter">(</span><span class="Constant">9991</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;deep-copy: copying address &quot;</span> &lt;&lt; curr<span class="Delimiter">.</span>value &lt;&lt; end<span class="Delimiter">();</span>