about summary refs log tree commit diff stats
path: root/html/020run.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-08-03 00:49:38 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-08-03 00:49:38 -0700
commit4fe9f5e8257770a6b1de1aa94748609acd37f0f6 (patch)
tree6b6b65ff08232b68e9100b6677e26f1fbeb0321a /html/020run.cc.html
parentd3cc25b4d64d81e31be228fa2fc1347b63f4729c (diff)
downloadmu-4fe9f5e8257770a6b1de1aa94748609acd37f0f6.tar.gz
1925
Diffstat (limited to 'html/020run.cc.html')
-rw-r--r--html/020run.cc.html17
1 files changed, 10 insertions, 7 deletions
diff --git a/html/020run.cc.html b/html/020run.cc.html
index bf21779f..dbbfce8a 100644
--- a/html/020run.cc.html
+++ b/html/020run.cc.html
@@ -13,11 +13,11 @@
 pre { white-space: pre-wrap; font-family: monospace; color: #eeeeee; background-color: #080808; }
 body { font-family: monospace; color: #eeeeee; background-color: #080808; }
 * { font-size: 1.05em; }
+.traceAbsent { color: #c00000; }
 .traceContains { color: #008000; }
-.cSpecial { color: #008000; }
 .Constant { color: #00a0a0; }
+.cSpecial { color: #008000; }
 .SalientComment { color: #00ffff; }
-.traceAbsent { color: #c00000; }
 .Comment { color: #9090ff; }
 .Delimiter { color: #a04060; }
 .Special { color: #ff6060; }
@@ -99,7 +99,7 @@ void run_current_routine<span class="Delimiter">()</span>
     trace<span class="Delimiter">(</span>Initial_callstack_depth+Callstack_depth<span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; current_instruction<span class="Delimiter">().</span>to_string<span class="Delimiter">()</span> &lt;&lt; end<span class="Delimiter">();</span>
     if <span class="Delimiter">(</span>Memory[<span class="Constant">0</span>] != <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
       raise &lt;&lt; <span class="Constant">&quot;something wrote to location 0; this should never happen</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
-      <span class="Identifier">break</span><span class="Delimiter">;</span>
+      Memory[<span class="Constant">0</span>] = <span class="Constant">0</span><span class="Delimiter">;</span>
     <span class="Delimiter">}</span>
     <span class="Comment">// Read all ingredients from memory.</span>
     <span class="Comment">// Each ingredient loads a vector of values rather than a single value; mu</span>
@@ -124,10 +124,13 @@ void run_current_routine<span class="Delimiter">()</span>
         cout &lt;&lt; <span class="Constant">&quot;not a primitive op: &quot;</span> &lt;&lt; current_instruction<span class="Delimiter">().</span>operation &lt;&lt; <span class="cSpecial">'\n'</span><span class="Delimiter">;</span>
       <span class="Delimiter">}</span>
     <span class="Delimiter">}</span>
-    if <span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>products<span class="Delimiter">)</span> &lt; SIZE<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">))</span>
+    if <span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>products<span class="Delimiter">)</span> &lt; SIZE<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">))</span> <span class="Delimiter">{</span>
       raise &lt;&lt; SIZE<span class="Delimiter">(</span>products<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot; vs &quot;</span> &lt;&lt; SIZE<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;: failed to write to all products! &quot;</span> &lt;&lt; current_instruction<span class="Delimiter">().</span>to_string<span class="Delimiter">()</span> &lt;&lt; end<span class="Delimiter">();</span>
-    for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
-      write_memory<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">),</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span>
+    <span class="Delimiter">}</span>
+    else <span class="Delimiter">{</span>
+      for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+        write_memory<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">),</span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span>
+      <span class="Delimiter">}</span>
     <span class="Delimiter">}</span>
     <span class="Comment">// End of Instruction</span>
     ++current_step_index<span class="Delimiter">();</span>
@@ -169,7 +172,7 @@ if <span class="Delimiter">(</span>!Run_tests<span class="Delimiter">)</span> <s
   setup<span class="Delimiter">();</span>
 <span class="CommentedCode">//?   Trace_file = &quot;interactive&quot;; //? 2</span>
 <span class="CommentedCode">//?   START_TRACING_UNTIL_END_OF_SCOPE; //? 2</span>
-<span class="CommentedCode">//?   Trace_stream-&gt;collect_layer = &quot;app&quot;; //? 1</span>
+<span class="CommentedCode">//?   Trace_stream-&gt;collect_layer.insert(&quot;app&quot;); //? 1</span>
   transform_all<span class="Delimiter">();</span>
   recipe_ordinal r = Recipe_ordinal[string<span class="Delimiter">(</span><span class="Constant">&quot;main&quot;</span><span class="Delimiter">)</span>]<span class="Delimiter">;</span>
   if <span class="Delimiter">(</span>r<span class="Delimiter">)</span> run<span class="Delimiter">(</span>r<span class="Delimiter">);</span>