about summary refs log tree commit diff stats
path: root/html/050scenario.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-12-12 10:01:12 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-12-12 10:07:59 -0800
commit49620728e805a3bbc3477c14b8b6ef7e2b5d3ead (patch)
treec80ecf970ec78dfc0c40944a4b9e827c0eb77078 /html/050scenario.cc.html
parentd81fcff20567a1d5e793e813bc761222885660b1 (diff)
downloadmu-49620728e805a3bbc3477c14b8b6ef7e2b5d3ead.tar.gz
3707
Be more disciplined about tagging 2 different concepts in the codebase:

a) Use the phrase "later layers" to highlight places where a layer
doesn't have the simplest possible self-contained implementation.

b) Use the word "hook" to point out functions that exist purely to
provide waypoints for extension by future layers.

Since both these only make sense in the pre-tangled representation of
the codebase, using '//:' and '#:' comments to get them stripped out of
tangled output.

(Though '#:' comments still make it to tangled output at the moment.
Let's see if we use it enough to be worth supporting. Scenarios are
pretty unreadable in tangled output anyway.)
Diffstat (limited to 'html/050scenario.cc.html')
-rw-r--r--html/050scenario.cc.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/html/050scenario.cc.html b/html/050scenario.cc.html
index c93d68a9..a4faa1af 100644
--- a/html/050scenario.cc.html
+++ b/html/050scenario.cc.html
@@ -259,6 +259,12 @@ Hide_missing_default_space_errors = <span class="Constant">false</span><span cla
   Current_scenario = <span class="Constant">NULL</span><span class="Delimiter">;</span>
 <span class="Delimiter">}</span>
 
+<span class="Comment">//: Permit numeric locations to be accessed in scenarios.</span>
+<span class="Delimiter">:(before &quot;End check_default_space Special-cases&quot;)</span>
+<span class="Comment">// user code should never create recipes with underscores in their names</span>
+<span class="Normal">if</span> <span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">.</span>find<span class="Delimiter">(</span><span class="Constant">&quot;scenario_&quot;</span><span class="Delimiter">)</span> == <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Delimiter">;</span>  <span class="Comment">// skip Mu scenarios which will use raw memory locations</span>
+<span class="Normal">if</span> <span class="Delimiter">(</span>caller<span class="Delimiter">.</span>name<span class="Delimiter">.</span>find<span class="Delimiter">(</span><span class="Constant">&quot;run_&quot;</span><span class="Delimiter">)</span> == <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Delimiter">;</span>  <span class="Comment">// skip calls to 'run', which should be in scenarios and will also use raw memory locations</span>
+
 <span class="Comment">//: Some variables for fake resources always get special /raw addresses in scenarios.</span>
 
 <span class="Comment">// Should contain everything passed by is_special_name but failed by is_disqualified.</span>