about summary refs log tree commit diff stats
path: root/html/012transform.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-05-21 17:44:53 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-05-21 17:44:53 -0700
commit2f02189ddcdeb7d25b0ca9bd5b955b764d41a1a7 (patch)
tree7c2e8b6e37ae3201dc01e90bcb390ee60b7f4a77 /html/012transform.cc.html
parent61c025b11ed4ddd002f09f061fd77c75d8b6d0ba (diff)
downloadmu-2f02189ddcdeb7d25b0ca9bd5b955b764d41a1a7.tar.gz
2996
Diffstat (limited to 'html/012transform.cc.html')
-rw-r--r--html/012transform.cc.html12
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&lt;transform_fn&gt; 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 &quot;End Globals&quot;)</span>
+<span class="Normal">int</span> Num_calls_to_transform_all = <span class="Constant">0</span><span class="Delimiter">;</span>
+<span class="Delimiter">:(after &quot;void transform_all()&quot;)</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">&quot;transform&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;--- parsing any uninitialized reagents as integers&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
   <span class="Normal">for</span> <span class="Delimiter">(</span>map&lt;recipe_ordinal<span class="Delimiter">,</span> recipe&gt;::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>