diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-05-21 17:44:53 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-05-21 17:44:53 -0700 |
commit | 2f02189ddcdeb7d25b0ca9bd5b955b764d41a1a7 (patch) | |
tree | 7c2e8b6e37ae3201dc01e90bcb390ee60b7f4a77 /html/012transform.cc.html | |
parent | 61c025b11ed4ddd002f09f061fd77c75d8b6d0ba (diff) | |
download | mu-2f02189ddcdeb7d25b0ca9bd5b955b764d41a1a7.tar.gz |
2996
Diffstat (limited to 'html/012transform.cc.html')
-rw-r--r-- | html/012transform.cc.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/html/012transform.cc.html b/html/012transform.cc.html index 3d6c6974..c20c09fd 100644 --- a/html/012transform.cc.html +++ b/html/012transform.cc.html @@ -88,6 +88,18 @@ vector<transform_fn> Transform<span class="Delimiter">;</span> <span class="Comment">// End transform_all</span> <span class="Delimiter">}</span> +<span class="Comment">//: Even though a run will involve many calls to transform_all() for tests,</span> +<span class="Comment">//: our logical model is to load all code, then transform all code, then run.</span> +<span class="Comment">//: If you load new code that should cause already-transformed recipes to</span> +<span class="Comment">//: change, that's not supported. To help detect such situations and raise</span> +<span class="Comment">//: helpful errors we track a count of the number of calls made to</span> +<span class="Comment">//: transform_all().</span> +<span class="Delimiter">:(before "End Globals")</span> +<span class="Normal">int</span> Num_calls_to_transform_all = <span class="Constant">0</span><span class="Delimiter">;</span> +<span class="Delimiter">:(after "void transform_all()")</span> + ++Num_calls_to_transform_all<span class="Delimiter">;</span> + +<span class="Delimiter">:(code)</span> <span class="Normal">void</span> parse_int_reagents<span class="Delimiter">()</span> <span class="Delimiter">{</span> trace<span class="Delimiter">(</span><span class="Constant">9991</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"--- parsing any uninitialized reagents as integers"</span> << end<span class="Delimiter">();</span> <span class="Normal">for</span> <span class="Delimiter">(</span>map<recipe_ordinal<span class="Delimiter">,</span> recipe>::iterator p = Recipe<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Recipe<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> |