diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-08-03 00:49:38 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-08-03 00:49:38 -0700 |
commit | 4fe9f5e8257770a6b1de1aa94748609acd37f0f6 (patch) | |
tree | 6b6b65ff08232b68e9100b6677e26f1fbeb0321a /html/020run.cc.html | |
parent | d3cc25b4d64d81e31be228fa2fc1347b63f4729c (diff) | |
download | mu-4fe9f5e8257770a6b1de1aa94748609acd37f0f6.tar.gz |
1925
Diffstat (limited to 'html/020run.cc.html')
-rw-r--r-- | html/020run.cc.html | 17 |
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">"run"</span><span class="Delimiter">)</span> << current_instruction<span class="Delimiter">().</span>to_string<span class="Delimiter">()</span> << 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 << <span class="Constant">"something wrote to location 0; this should never happen</span><span class="cSpecial">\n</span><span class="Constant">"</span> << 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 << <span class="Constant">"not a primitive op: "</span> << current_instruction<span class="Delimiter">().</span>operation << <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> < 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> < SIZE<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">))</span> <span class="Delimiter">{</span> raise << SIZE<span class="Delimiter">(</span>products<span class="Delimiter">)</span> << <span class="Constant">" vs "</span> << SIZE<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>products<span class="Delimiter">)</span> << <span class="Constant">": failed to write to all products! "</span> << current_instruction<span class="Delimiter">().</span>to_string<span class="Delimiter">()</span> << end<span class="Delimiter">();</span> - for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i < 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 < 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 = "interactive"; //? 2</span> <span class="CommentedCode">//? START_TRACING_UNTIL_END_OF_SCOPE; //? 2</span> -<span class="CommentedCode">//? Trace_stream->collect_layer = "app"; //? 1</span> +<span class="CommentedCode">//? Trace_stream->collect_layer.insert("app"); //? 1</span> transform_all<span class="Delimiter">();</span> recipe_ordinal r = Recipe_ordinal[string<span class="Delimiter">(</span><span class="Constant">"main"</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> |