diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-12-15 14:32:47 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-12-15 14:32:47 -0800 |
commit | 67db19a05335c7fbea3ad6737303c8848fd39e74 (patch) | |
tree | 00d9585bf4de231254867d8c7515386934bb3d3f /html/029tools.cc.html | |
parent | 62a390ca0a27daa80ce4b6b17934d8d067db8631 (diff) | |
download | mu-67db19a05335c7fbea3ad6737303c8848fd39e74.tar.gz |
2545
update html
Diffstat (limited to 'html/029tools.cc.html')
-rw-r--r-- | html/029tools.cc.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/html/029tools.cc.html b/html/029tools.cc.html index 4b78fe12..5355d922 100644 --- a/html/029tools.cc.html +++ b/html/029tools.cc.html @@ -16,6 +16,7 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } .traceContains { color: #008000; } .SalientComment { color: #00ffff; } .cSpecial { color: #008000; } +.CommentedCode { color: #6c6c6c; } .Comment { color: #9090ff; } .Delimiter { color: #a04060; } .Special { color: #ff6060; } @@ -335,6 +336,32 @@ case _DUMP_MEMORY: <span class="Delimiter">{</span> dump_memory<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> + +<span class="Comment">//: In times of real extremis we need to create a whole new modality for debug</span> +<span class="Comment">//: logs, independent of other changes to the screen or Trace_stream.</span> + +<span class="Delimiter">:(before "End Globals")</span> +ofstream LOG<span class="Delimiter">;</span> +<span class="Delimiter">:(before "End One-time Setup")</span> +<span class="CommentedCode">//? LOG.open("log");</span> + +<span class="Delimiter">:(before "End Primitive Recipe Declarations")</span> +_LOG<span class="Delimiter">,</span> +<span class="Delimiter">:(before "End Primitive Recipe Numbers")</span> +put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"$log"</span><span class="Delimiter">,</span> _LOG<span class="Delimiter">);</span> +<span class="Delimiter">:(before "End Primitive Recipe Checks")</span> +case _LOG: <span class="Delimiter">{</span> + <span class="Identifier">break</span><span class="Delimiter">;</span> +<span class="Delimiter">}</span> +<span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> +case _LOG: <span class="Delimiter">{</span> + ostringstream out<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>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> + out << print_mu<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">),</span> ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> + <span class="Delimiter">}</span> + LOG << out<span class="Delimiter">.</span>str<span class="Delimiter">()</span> << <span class="Constant">"(length: "</span> << get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"length"</span><span class="Delimiter">)</span> << <span class="Constant">'/'</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">"length"</span><span class="Delimiter">))</span> << <span class="Constant">")</span><span class="cSpecial">\n</span><span class="Constant">"</span><span class="Delimiter">;</span> + <span class="Identifier">break</span><span class="Delimiter">;</span> +<span class="Delimiter">}</span> </pre> </body> </html> |