about summary refs log tree commit diff stats
path: root/html/089scenario_filesystem.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-08-27 20:49:03 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-08-27 20:49:03 -0700
commitcd9bb850caeca88747a25436fc65c67c6d5cd89a (patch)
tree34ea30beb19b5fafe855b951b9468d2a9e915492 /html/089scenario_filesystem.cc.html
parente947da75bd926da6d533fd73b352c16c8417b3f6 (diff)
downloadmu-cd9bb850caeca88747a25436fc65c67c6d5cd89a.tar.gz
3266
Diffstat (limited to 'html/089scenario_filesystem.cc.html')
-rw-r--r--html/089scenario_filesystem.cc.html23
1 files changed, 18 insertions, 5 deletions
diff --git a/html/089scenario_filesystem.cc.html b/html/089scenario_filesystem.cc.html
index 6dc1faa3..0f9b51b6 100644
--- a/html/089scenario_filesystem.cc.html
+++ b/html/089scenario_filesystem.cc.html
@@ -222,21 +222,34 @@ string munge_filesystem_contents<span class="Delimiter">(</span><span class="Nor
 
 <span class="Normal">void</span> construct_filesystem_object<span class="Delimiter">(</span><span class="Normal">const</span> map&lt;string<span class="Delimiter">,</span> string&gt;&amp; contents<span class="Delimiter">)</span> <span class="Delimiter">{</span>
   <span class="Normal">int</span> filesystem_data_address = allocate<span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>contents<span class="Delimiter">)</span>*<span class="Constant">2</span> + <span class="Comment">/*</span><span class="Comment">array length</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">);</span>
-  <span class="Normal">int</span> curr = filesystem_data_address + <span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span> + <span class="Comment">/*</span><span class="Comment">skip array length</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">;</span>
+  <span class="Normal">int</span> curr = filesystem_data_address + <span class="Comment">/*</span><span class="Comment">skip refcount and length</span><span class="Comment">*/</span><span class="Constant">2</span><span class="Delimiter">;</span>
   <span class="Normal">for</span> <span class="Delimiter">(</span>map&lt;string<span class="Delimiter">,</span> string&gt;::const_iterator p = contents<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != contents<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span>
     put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">,</span> new_mu_string<span class="Delimiter">(</span>p<span class="Delimiter">-&gt;</span>first<span class="Delimiter">));</span>
-    curr++<span class="Delimiter">;</span>
+    trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;mem&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;storing file name &quot;</span> &lt;&lt; get<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; in location &quot;</span> &lt;&lt; curr &lt;&lt; end<span class="Delimiter">();</span>
+    put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> get<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">),</span> <span class="Constant">1</span><span class="Delimiter">);</span>
+    trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;mem&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;storing refcount 1 in location &quot;</span> &lt;&lt; get<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">)</span> &lt;&lt; end<span class="Delimiter">();</span>
+    ++curr<span class="Delimiter">;</span>
     put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">,</span> new_mu_string<span class="Delimiter">(</span>p<span class="Delimiter">-&gt;</span>second<span class="Delimiter">));</span>
-    curr++<span class="Delimiter">;</span>
+    trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;mem&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;storing file contents &quot;</span> &lt;&lt; get<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; in location &quot;</span> &lt;&lt; curr &lt;&lt; end<span class="Delimiter">();</span>
+    put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> get<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">),</span> <span class="Constant">1</span><span class="Delimiter">);</span>
+    trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;mem&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;storing refcount 1 in location &quot;</span> &lt;&lt; get<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">)</span> &lt;&lt; end<span class="Delimiter">();</span>
+    ++curr<span class="Delimiter">;</span>
   <span class="Delimiter">}</span>
-  put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> filesystem_data_address+<span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">,</span> SIZE<span class="Delimiter">(</span>contents<span class="Delimiter">));</span>  <span class="Comment">// size of array</span>
+  curr = filesystem_data_address+<span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">;</span>
+  put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">,</span> SIZE<span class="Delimiter">(</span>contents<span class="Delimiter">));</span>  <span class="Comment">// size of array</span>
+  trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;mem&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;storing filesystem size &quot;</span> &lt;&lt; get<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; in location &quot;</span> &lt;&lt; curr &lt;&lt; end<span class="Delimiter">();</span>
   put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> filesystem_data_address<span class="Delimiter">,</span> <span class="Constant">1</span><span class="Delimiter">);</span>  <span class="Comment">// initialize refcount</span>
+  trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;mem&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;storing refcount 1 in location &quot;</span> &lt;&lt; filesystem_data_address &lt;&lt; end<span class="Delimiter">();</span>
   <span class="Comment">// wrap the filesystem data in a filesystem object</span>
   <span class="Normal">int</span> filesystem_address = allocate<span class="Delimiter">(</span>size_of_filesystem<span class="Delimiter">());</span>
-  put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> filesystem_address+<span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">,</span> filesystem_data_address<span class="Delimiter">);</span>
+  curr = filesystem_address+<span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">;</span>
+  put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> curr<span class="Delimiter">,</span> filesystem_data_address<span class="Delimiter">);</span>
+  trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;mem&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;storing filesystem data address &quot;</span> &lt;&lt; filesystem_data_address &lt;&lt; <span class="Constant">&quot; in location &quot;</span> &lt;&lt; curr &lt;&lt; end<span class="Delimiter">();</span>
   put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> filesystem_address<span class="Delimiter">,</span> <span class="Constant">1</span><span class="Delimiter">);</span>  <span class="Comment">// initialize refcount</span>
+  trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;mem&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;storing refcount 1 in location &quot;</span> &lt;&lt; filesystem_address &lt;&lt; end<span class="Delimiter">();</span>
   <span class="Comment">// save in product</span>
   put<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> FILESYSTEM<span class="Delimiter">,</span> filesystem_address<span class="Delimiter">);</span>
+  trace<span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">&quot;mem&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;storing filesystem address &quot;</span> &lt;&lt; filesystem_address &lt;&lt; <span class="Constant">&quot; in location &quot;</span> &lt;&lt; FILESYSTEM &lt;&lt; end<span class="Delimiter">();</span>
 <span class="Delimiter">}</span>
 
 <span class="Normal">int</span> size_of_filesystem<span class="Delimiter">()</span> <span class="Delimiter">{</span>