diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-07-12 00:11:56 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-07-12 00:11:56 -0700 |
commit | d5d908dda655c791329563522faad42d7e4ee618 (patch) | |
tree | 628b8a23e13878c45ef39dfbffb860c676da5304 /html/020run.cc.html | |
parent | 9864bdd0792b697d7b03e692ba7f82cf5669c41c (diff) | |
download | mu-d5d908dda655c791329563522faad42d7e4ee618.tar.gz |
1766
Diffstat (limited to 'html/020run.cc.html')
-rw-r--r-- | html/020run.cc.html | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/html/020run.cc.html b/html/020run.cc.html index 5d65fa9f..fc5fd15f 100644 --- a/html/020run.cc.html +++ b/html/020run.cc.html @@ -72,9 +72,9 @@ recipe main [ <span class="Comment">// Book-keeping while running a recipe.</span> <span class="Comment">//: Later layers will change this.</span> struct routine <span class="Delimiter">{</span> - recipe_number running_recipe<span class="Delimiter">;</span> + recipe_ordinal running_recipe<span class="Delimiter">;</span> long long int running_step_index<span class="Delimiter">;</span> - routine<span class="Delimiter">(</span>recipe_number r<span class="Delimiter">)</span> :running_recipe<span class="Delimiter">(</span>r<span class="Delimiter">),</span> running_step_index<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{}</span> + routine<span class="Delimiter">(</span>recipe_ordinal r<span class="Delimiter">)</span> :running_recipe<span class="Delimiter">(</span>r<span class="Delimiter">),</span> running_step_index<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{}</span> bool completed<span class="Delimiter">()</span> const<span class="Delimiter">;</span> <span class="Delimiter">};</span> @@ -82,7 +82,7 @@ struct routine <span class="Delimiter">{</span> routine* Current_routine = <span class="Constant">NULL</span><span class="Delimiter">;</span> <span class="Delimiter">:(code)</span> -void run<span class="Delimiter">(</span>recipe_number r<span class="Delimiter">)</span> <span class="Delimiter">{</span> +void run<span class="Delimiter">(</span>recipe_ordinal r<span class="Delimiter">)</span> <span class="Delimiter">{</span> routine rr<span class="Delimiter">(</span>r<span class="Delimiter">);</span> Current_routine = &rr<span class="Delimiter">;</span> run_current_routine<span class="Delimiter">();</span> @@ -112,6 +112,7 @@ void run_current_routine<span class="Delimiter">()</span> switch <span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>operation<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Comment">// Primitive Recipe Implementations</span> case COPY: <span class="Delimiter">{</span> +<span class="CommentedCode">//? if (!ingredients.empty()) cerr << current_instruction().ingredients.at(0).to_string() << ' ' << ingredients.at(0).at(0) << '\n'; //? 1</span> copy<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>begin<span class="Delimiter">(),</span> ingredients<span class="Delimiter">.</span>end<span class="Delimiter">(),</span> inserter<span class="Delimiter">(</span>products<span class="Delimiter">,</span> products<span class="Delimiter">.</span>begin<span class="Delimiter">()));</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> @@ -167,7 +168,7 @@ if <span class="Delimiter">(</span>!Run_tests<span class="Delimiter">)</span> <s START_TRACING_UNTIL_END_OF_SCOPE<span class="Delimiter">;</span> <span class="CommentedCode">//? Trace_stream->dump_layer = "all"; //? 2</span> transform_all<span class="Delimiter">();</span> - recipe_number r = Recipe_number[string<span class="Delimiter">(</span><span class="Constant">"main"</span><span class="Delimiter">)</span>]<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> <span class="CommentedCode">//? Trace_stream->dump_layer = "all"; //? 1</span> if <span class="Delimiter">(</span>r<span class="Delimiter">)</span> run<span class="Delimiter">(</span>r<span class="Delimiter">);</span> <span class="CommentedCode">//? dump_memory(); //? 1</span> @@ -202,7 +203,7 @@ load_permanently<span class="Delimiter">(</span><span class="Constant">"cor void run<span class="Delimiter">(</span>string form<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="CommentedCode">//? cerr << "AAA 2\n"; //? 2</span> <span class="CommentedCode">//? cerr << form << '\n'; //? 1</span> - vector<recipe_number> tmp = load<span class="Delimiter">(</span>form<span class="Delimiter">);</span> + vector<recipe_ordinal> tmp = load<span class="Delimiter">(</span>form<span class="Delimiter">);</span> if <span class="Delimiter">(</span>tmp<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">return</span><span class="Delimiter">;</span> transform_all<span class="Delimiter">();</span> <span class="CommentedCode">//? cerr << "AAA 3\n"; //? 2</span> @@ -246,12 +247,13 @@ void write_memory<span class="Delimiter">(</span>reagent x<span class="Delimiter long long int size_of<span class="Delimiter">(</span>const reagent& r<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Identifier">return</span> size_of<span class="Delimiter">(</span>r<span class="Delimiter">.</span>types<span class="Delimiter">);</span> <span class="Delimiter">}</span> -long long int size_of<span class="Delimiter">(</span>const vector<type_number>& types<span class="Delimiter">)</span> <span class="Delimiter">{</span> +long long int size_of<span class="Delimiter">(</span>const vector<type_ordinal>& types<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Comment">// End size_of(types) Cases</span> <span class="Identifier">return</span> <span class="Constant">1</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> bool size_mismatch<span class="Delimiter">(</span>const reagent& x<span class="Delimiter">,</span> const vector<double>& data<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span class="CommentedCode">//? if (size_of(x) != SIZE(data)) cerr << size_of(x) << " vs " << SIZE(data) << '\n'; //? 2</span> <span class="Identifier">return</span> size_of<span class="Delimiter">(</span>x<span class="Delimiter">)</span> != SIZE<span class="Delimiter">(</span>data<span class="Delimiter">);</span> <span class="Delimiter">}</span> |