diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-07-05 01:08:00 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-07-05 01:08:00 -0700 |
commit | 298f8065857630e414d84e4ee785a6d17e5f99bb (patch) | |
tree | 8880a092ab59850a6f821ba892f3904ab464431c /html/020run.cc.html | |
parent | f28f2636c6707e1a33bebacafd0486f4965978ea (diff) | |
download | mu-298f8065857630e414d84e4ee785a6d17e5f99bb.tar.gz |
3102
Diffstat (limited to 'html/020run.cc.html')
-rw-r--r-- | html/020run.cc.html | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/html/020run.cc.html b/html/020run.cc.html index 65bc91ab..1a8359bd 100644 --- a/html/020run.cc.html +++ b/html/020run.cc.html @@ -172,7 +172,7 @@ map<string<span class="Delimiter">,</span> <span class="Normal">int</span>> <span class="Comment">//: Step 1: load all .mu files with numeric prefixes (in order)</span> <span class="Delimiter">:(before "End Load Recipes")</span> <span class="Comment">// Load .mu Core</span> -<span class="CommentedCode">//? Trace_file = "interactive";</span> +<span class="CommentedCode">//? Save_trace = true;</span> <span class="CommentedCode">//? START_TRACING_UNTIL_END_OF_SCOPE;</span> load_file_or_directory<span class="Delimiter">(</span><span class="Constant">"core.mu"</span><span class="Delimiter">);</span> <span class="CommentedCode">//? DUMP("");</span> @@ -196,6 +196,8 @@ load_file_or_directory<span class="Delimiter">(</span><span class="Constant">&qu <span class="Normal">if</span> <span class="Delimiter">(</span>Run_tests<span class="Delimiter">)</span> Recipe<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"main"</span><span class="Delimiter">));</span> <span class="Delimiter">}</span> transform_all<span class="Delimiter">();</span> +<span class="CommentedCode">//? DUMP("");</span> +<span class="CommentedCode">//? exit(0);</span> save_snapshots<span class="Delimiter">();</span> <span class="Comment">//: Step 3: if we aren't running tests, locate a recipe called 'main' and</span> @@ -204,7 +206,7 @@ save_snapshots<span class="Delimiter">();</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!Run_tests && contains_key<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"main"</span><span class="Delimiter">)</span> && contains_key<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"main"</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> <span class="Comment">// Running Main</span> setup<span class="Delimiter">();</span> -<span class="CommentedCode">//? Trace_file = "interactive";</span> +<span class="CommentedCode">//? Save_trace = true;</span> <span class="CommentedCode">//? START_TRACING_UNTIL_END_OF_SCOPE;</span> trace<span class="Delimiter">(</span><span class="Constant">9990</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"=== Starting to run"</span> << end<span class="Delimiter">();</span> assert<span class="Delimiter">(</span>Num_calls_to_transform_all == <span class="Constant">1</span><span class="Delimiter">);</span> @@ -237,8 +239,8 @@ save_snapshots<span class="Delimiter">();</span> <span class="Delimiter">:(code)</span> <span class="Normal">void</span> cleanup_main<span class="Delimiter">()</span> <span class="Delimiter">{</span> - <span class="Normal">if</span> <span class="Delimiter">(</span>!Trace_file<span class="Delimiter">.</span>empty<span class="Delimiter">()</span> && Trace_stream<span class="Delimiter">)</span> <span class="Delimiter">{</span> - ofstream fout<span class="Delimiter">((</span>Trace_dir+Trace_file<span class="Delimiter">).</span>c_str<span class="Delimiter">());</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>Save_trace && Trace_stream<span class="Delimiter">)</span> <span class="Delimiter">{</span> + ofstream fout<span class="Delimiter">(</span><span class="Constant">"interactive"</span><span class="Delimiter">);</span> fout << Trace_stream<span class="Delimiter">-></span>readable_contents<span class="Delimiter">(</span><span class="Constant">""</span><span class="Delimiter">);</span> fout<span class="Delimiter">.</span>close<span class="Delimiter">();</span> <span class="Delimiter">}</span> @@ -281,8 +283,8 @@ atexit<span class="Delimiter">(</span>cleanup_main<span class="Delimiter">);</sp free<span class="Delimiter">(</span>files<span class="Delimiter">);</span> <span class="Delimiter">}</span> <span class="Delimiter">:(before "End Includes")</span> -<span class="PreProc">#include</span><span class="Constant"><dirent.h></span> -<span class="PreProc">#include</span><span class="Constant"><sys/stat.h></span> +<span class="PreProc">#include </span><span class="Constant"><dirent.h></span> +<span class="PreProc">#include </span><span class="Constant"><sys/stat.h></span> <span class="SalientComment">//:: Reading from memory, writing to memory.</span> @@ -328,18 +330,18 @@ vector<<span class="Normal">double</span>> read_memory<span class="Delimit <span class="Delimiter">:(code)</span> <span class="Normal">int</span> size_of<span class="Delimiter">(</span><span class="Normal">const</span> reagent& r<span class="Delimiter">)</span> <span class="Delimiter">{</span> - <span class="Normal">if</span> <span class="Delimiter">(</span>r<span class="Delimiter">.</span>type == <span class="Constant">NULL</span><span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>!r<span class="Delimiter">.</span>type<span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span> <span class="Comment">// End size_of(reagent r) Cases</span> <span class="Identifier">return</span> size_of<span class="Delimiter">(</span>r<span class="Delimiter">.</span>type<span class="Delimiter">);</span> <span class="Delimiter">}</span> <span class="Normal">int</span> size_of<span class="Delimiter">(</span><span class="Normal">const</span> type_tree* type<span class="Delimiter">)</span> <span class="Delimiter">{</span> - <span class="Normal">if</span> <span class="Delimiter">(</span>type == <span class="Constant">NULL</span><span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>!type<span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">0</span><span class="Delimiter">;</span> <span class="Comment">// End size_of(type) Cases</span> <span class="Identifier">return</span> <span class="Constant">1</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Normal">bool</span> size_mismatch<span class="Delimiter">(</span><span class="Normal">const</span> reagent& x<span class="Delimiter">,</span> <span class="Normal">const</span> vector<<span class="Normal">double</span>>& data<span class="Delimiter">)</span> <span class="Delimiter">{</span> - <span class="Normal">if</span> <span class="Delimiter">(</span>x<span class="Delimiter">.</span>type == <span class="Constant">NULL</span><span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>!x<span class="Delimiter">.</span>type<span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> <span class="Comment">// End size_mismatch(x) Cases</span> <span class="CommentedCode">//? if (size_of(x) != SIZE(data)) cerr << size_of(x) << " vs " << SIZE(data) << '\n';</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> |