diff options
Diffstat (limited to 'html')
-rw-r--r-- | html/001help.cc.html | 2 | ||||
-rw-r--r-- | html/011load.cc.html | 3 | ||||
-rw-r--r-- | html/013update_operation.cc.html | 2 | ||||
-rw-r--r-- | html/020run.cc.html | 12 | ||||
-rw-r--r-- | html/021check_instruction.cc.html | 3 | ||||
-rw-r--r-- | html/030container.cc.html | 15 | ||||
-rw-r--r-- | html/031merge.cc.html | 4 | ||||
-rw-r--r-- | html/036refcount.cc.html | 3 | ||||
-rw-r--r-- | html/037abandon.cc.html | 3 | ||||
-rw-r--r-- | html/043space.cc.html | 7 | ||||
-rw-r--r-- | html/044space_surround.cc.html | 3 | ||||
-rw-r--r-- | html/050scenario.cc.html | 6 | ||||
-rw-r--r-- | html/073wait.cc.html | 3 |
13 files changed, 39 insertions, 27 deletions
diff --git a/html/001help.cc.html b/html/001help.cc.html index 7d999033..cded9054 100644 --- a/html/001help.cc.html +++ b/html/001help.cc.html @@ -38,7 +38,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Delimiter">:(before "End Commandline Parsing")</span> <span class="Normal">if</span> <span class="Delimiter">(</span>argc <= <span class="Constant">1</span> || is_equal<span class="Delimiter">(</span>argv[<span class="Constant">1</span>]<span class="Delimiter">,</span> <span class="Constant">"--help"</span><span class="Delimiter">))</span> <span class="Delimiter">{</span> - <span class="Comment">// this is the functionality later layers will provide</span> + <span class="Comment">//: this is the functionality later layers will provide</span> <span class="Comment">// currently no automated tests for commandline arg parsing</span> <span class="Normal">if</span> <span class="Delimiter">(</span>argc <= <span class="Constant">1</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> cerr << <span class="Constant">"Please provide a Mu program to run.</span><span class="cSpecial">\n</span><span class="Constant">"</span> diff --git a/html/011load.cc.html b/html/011load.cc.html index b154f820..ee518186 100644 --- a/html/011load.cc.html +++ b/html/011load.cc.html @@ -86,7 +86,6 @@ vector<recipe_ordinal> load<span class="Delimiter">(</span>istream& in <span class="Delimiter">}</span> <span class="Comment">// return the recipe ordinal slurped, or -1 if it failed</span> -<span class="Comment">// (later layers will cause failures)</span> <span class="Normal">int</span> slurp_recipe<span class="Delimiter">(</span>istream& in<span class="Delimiter">)</span> <span class="Delimiter">{</span> recipe result<span class="Delimiter">;</span> result<span class="Delimiter">.</span>name = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> @@ -181,7 +180,7 @@ vector<recipe_ordinal> load<span class="Delimiter">(</span>istream& in <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> curr<span class="Delimiter">-></span>old_name = curr<span class="Delimiter">-></span>name = *p<span class="Delimiter">;</span> ++p<span class="Delimiter">;</span> - <span class="Comment">// curr->operation will be set in a later layer</span> + <span class="Comment">// curr->operation will be set at transform time</span> <span class="Normal">for</span> <span class="Delimiter">(;</span> p != words<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> curr<span class="Delimiter">-></span>ingredients<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>reagent<span class="Delimiter">(</span>*p<span class="Delimiter">));</span> diff --git a/html/013update_operation.cc.html b/html/013update_operation.cc.html index 7dd7e69f..d13f248b 100644 --- a/html/013update_operation.cc.html +++ b/html/013update_operation.cc.html @@ -57,7 +57,7 @@ Transform<span class="Delimiter">.</span>push_back<span class="Delimiter">(</spa <span class="Delimiter">}</span> <span class="Delimiter">}</span> -<span class="Comment">// hook to suppress inserting recipe name into errors (for later layers)</span> +<span class="Comment">// hook to suppress inserting recipe name into errors</span> string maybe<span class="Delimiter">(</span>string s<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Identifier">return</span> s + <span class="Constant">": "</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> diff --git a/html/020run.cc.html b/html/020run.cc.html index cd31ef09..e8c4d98e 100644 --- a/html/020run.cc.html +++ b/html/020run.cc.html @@ -102,7 +102,7 @@ Current_routine = <span class="Constant">NULL</span><span class="Delimiter">;</s <span class="Delimiter">}</span> <span class="Normal">void</span> run_current_routine<span class="Delimiter">()</span> <span class="Delimiter">{</span> - <span class="Normal">while</span> <span class="Delimiter">(</span>should_continue_running<span class="Delimiter">(</span>Current_routine<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span class="Comment">// beware: later layers modify Current_routine here</span> + <span class="Normal">while</span> <span class="Delimiter">(</span>should_continue_running<span class="Delimiter">(</span>Current_routine<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span class="Comment">// beware: may modify Current_routine</span> <span class="Comment">// Running One Instruction</span> <span class="Normal">if</span> <span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>is_label<span class="Delimiter">)</span> <span class="Delimiter">{</span> ++current_step_index<span class="Delimiter">();</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> trace<span class="Delimiter">(</span>Initial_callstack_depth + Trace_stream<span class="Delimiter">-></span>callstack_depth<span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << to_string<span class="Delimiter">(</span>current_instruction<span class="Delimiter">())</span> << end<span class="Delimiter">();</span> @@ -145,6 +145,7 @@ Current_routine = <span class="Constant">NULL</span><span class="Delimiter">;</s <span class="Normal">stop_running_current_routine</span>:<span class="Delimiter">;</span> <span class="Delimiter">}</span> +<span class="Comment">//: hook replaced in a later layer</span> <span class="Normal">bool</span> should_continue_running<span class="Delimiter">(</span><span class="Normal">const</span> routine* current_routine<span class="Delimiter">)</span> <span class="Delimiter">{</span> assert<span class="Delimiter">(</span>current_routine == Current_routine<span class="Delimiter">);</span> <span class="Comment">// argument passed in just to make caller readable above</span> <span class="Identifier">return</span> !Current_routine<span class="Delimiter">-></span>completed<span class="Delimiter">();</span> @@ -156,29 +157,34 @@ Current_routine = <span class="Constant">NULL</span><span class="Delimiter">;</s <span class="Delimiter">}</span> <span class="Comment">//: Some helpers.</span> -<span class="Comment">//: We'll need to override these later as we change the definition of routine.</span> -<span class="Comment">//: Important that they return referrences into the routine.</span> +<span class="Comment">//: Important that they return references into the current routine.</span> +<span class="Comment">//: hook replaced in a later layer</span> <span class="Normal">int</span>& current_step_index<span class="Delimiter">()</span> <span class="Delimiter">{</span> <span class="Identifier">return</span> Current_routine<span class="Delimiter">-></span>running_step_index<span class="Delimiter">;</span> <span class="Delimiter">}</span> +<span class="Comment">//: hook replaced in a later layer</span> <span class="Normal">const</span> string& current_recipe_name<span class="Delimiter">()</span> <span class="Delimiter">{</span> <span class="Identifier">return</span> get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> Current_routine<span class="Delimiter">-></span>running_recipe<span class="Delimiter">).</span>name<span class="Delimiter">;</span> <span class="Delimiter">}</span> +<span class="Comment">//: hook replaced in a later layer</span> <span class="Normal">const</span> recipe& current_recipe<span class="Delimiter">()</span> <span class="Delimiter">{</span> <span class="Identifier">return</span> get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> Current_routine<span class="Delimiter">-></span>running_recipe<span class="Delimiter">);</span> <span class="Delimiter">}</span> +<span class="Comment">//: hook replaced in a later layer</span> <span class="Normal">const</span> instruction& current_instruction<span class="Delimiter">()</span> <span class="Delimiter">{</span> <span class="Identifier">return</span> get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> Current_routine<span class="Delimiter">-></span>running_recipe<span class="Delimiter">).</span>steps<span class="Delimiter">.</span>at<span class="Delimiter">(</span>Current_routine<span class="Delimiter">-></span>running_step_index<span class="Delimiter">);</span> <span class="Delimiter">}</span> +<span class="Comment">//: hook replaced in a later layer</span> <span class="Normal">bool</span> routine::completed<span class="Delimiter">()</span> <span class="Normal">const</span> <span class="Delimiter">{</span> <span class="Identifier">return</span> running_step_index >= SIZE<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> running_recipe<span class="Delimiter">).</span>steps<span class="Delimiter">);</span> <span class="Delimiter">}</span> +<span class="Comment">//: hook replaced in a later layer</span> <span class="Normal">const</span> vector<instruction>& routine::steps<span class="Delimiter">()</span> <span class="Normal">const</span> <span class="Delimiter">{</span> <span class="Identifier">return</span> get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> running_recipe<span class="Delimiter">).</span>steps<span class="Delimiter">;</span> <span class="Delimiter">}</span> diff --git a/html/021check_instruction.cc.html b/html/021check_instruction.cc.html index e24fd4a9..119ae459 100644 --- a/html/021check_instruction.cc.html +++ b/html/021check_instruction.cc.html @@ -158,8 +158,7 @@ $error: <span class="Constant">0</span> <span class="Identifier">return</span> types_strictly_match<span class="Delimiter">(</span>to<span class="Delimiter">,</span> from<span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Comment">// copy arguments because later layers will want to make changes to them</span> -<span class="Comment">// without perturbing the caller</span> +<span class="Comment">//: copy arguments for later layers</span> <span class="Normal">bool</span> types_strictly_match<span class="Delimiter">(</span>reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> to<span class="Delimiter">,</span> reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> from<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Comment">// End Preprocess types_strictly_match(reagent to, reagent from)</span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_literal<span class="Delimiter">(</span>from<span class="Delimiter">)</span> && to<span class="Delimiter">.</span>type<span class="Delimiter">-></span>value == get<span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> <span class="Constant">"number"</span><span class="Delimiter">))</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> diff --git a/html/030container.cc.html b/html/030container.cc.html index f474b8b8..edf98ada 100644 --- a/html/030container.cc.html +++ b/html/030container.cc.html @@ -421,7 +421,8 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Normal">int</span> offset_value = <span class="Constant">0</span><span class="Delimiter">;</span> - <span class="Normal">if</span> <span class="Delimiter">(</span>is_integer<span class="Delimiter">(</span>offset<span class="Delimiter">.</span>name<span class="Delimiter">))</span> <span class="Comment">// later layers permit non-integer offsets</span> + <span class="Comment">//: later layers will permit non-integer offsets</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>is_integer<span class="Delimiter">(</span>offset<span class="Delimiter">.</span>name<span class="Delimiter">))</span> offset_value = to_integer<span class="Delimiter">(</span>offset<span class="Delimiter">.</span>name<span class="Delimiter">);</span> <span class="Normal">else</span> offset_value = offset<span class="Delimiter">.</span>value<span class="Delimiter">;</span> @@ -432,7 +433,8 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Normal">if</span> <span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">break</span><span class="Delimiter">;</span> reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> product = inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> <span class="Comment">// Update GET product in Check</span> - <span class="Normal">const</span> reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> element = element_type<span class="Delimiter">(</span>base<span class="Delimiter">.</span>type<span class="Delimiter">,</span> offset_value<span class="Delimiter">);</span> <span class="Comment">// not just base_type because later layers will introduce compound types</span> + <span class="Comment">//: use base.type rather than base_type because later layers will introduce compound types</span> + <span class="Normal">const</span> reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> element = element_type<span class="Delimiter">(</span>base<span class="Delimiter">.</span>type<span class="Delimiter">,</span> offset_value<span class="Delimiter">);</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!types_coercible<span class="Delimiter">(</span>product<span class="Delimiter">,</span> element<span class="Delimiter">))</span> <span class="Delimiter">{</span> raise << maybe<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"'get "</span> << base<span class="Delimiter">.</span>original_string << <span class="Constant">", "</span> << offset<span class="Delimiter">.</span>original_string << <span class="Constant">"' should write to "</span> << names_to_string_without_quotes<span class="Delimiter">(</span>element<span class="Delimiter">.</span>type<span class="Delimiter">)</span> << <span class="Constant">" but '"</span> << product<span class="Delimiter">.</span>name << <span class="Constant">"' has type "</span> << names_to_string_without_quotes<span class="Delimiter">(</span>product<span class="Delimiter">.</span>type<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span> << end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -455,7 +457,8 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span assert<span class="Delimiter">(</span>base<span class="Delimiter">.</span>metadata<span class="Delimiter">.</span>size<span class="Delimiter">);</span> <span class="Normal">int</span> src = base_address + base<span class="Delimiter">.</span>metadata<span class="Delimiter">.</span>offset<span class="Delimiter">.</span>at<span class="Delimiter">(</span>offset<span class="Delimiter">);</span> trace<span class="Delimiter">(</span><span class="Constant">9998</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"address to copy is "</span> << src << end<span class="Delimiter">();</span> - reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> element = element_type<span class="Delimiter">(</span>base<span class="Delimiter">.</span>type<span class="Delimiter">,</span> offset<span class="Delimiter">);</span> <span class="Comment">// not just base_type because later layers will introduce compound types</span> + <span class="Comment">//: use base.type rather than base_type because later layers will introduce compound types</span> + reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> element = element_type<span class="Delimiter">(</span>base<span class="Delimiter">.</span>type<span class="Delimiter">,</span> offset<span class="Delimiter">);</span> element<span class="Delimiter">.</span>set_value<span class="Delimiter">(</span>src<span class="Delimiter">);</span> trace<span class="Delimiter">(</span><span class="Constant">9998</span><span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"its type is "</span> << names_to_string<span class="Delimiter">(</span>element<span class="Delimiter">.</span>type<span class="Delimiter">)</span> << end<span class="Delimiter">();</span> <span class="Comment">// Read element</span> @@ -568,7 +571,8 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Normal">int</span> offset_value = <span class="Constant">0</span><span class="Delimiter">;</span> - <span class="Normal">if</span> <span class="Delimiter">(</span>is_integer<span class="Delimiter">(</span>offset<span class="Delimiter">.</span>name<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span class="Comment">// later layers permit non-integer offsets</span> + <span class="Comment">//: later layers will permit non-integer offsets</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>is_integer<span class="Delimiter">(</span>offset<span class="Delimiter">.</span>name<span class="Delimiter">))</span> <span class="Delimiter">{</span> offset_value = to_integer<span class="Delimiter">(</span>offset<span class="Delimiter">.</span>name<span class="Delimiter">);</span> <span class="Normal">if</span> <span class="Delimiter">(</span>offset_value < <span class="Constant">0</span> || offset_value >= SIZE<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> base_type<span class="Delimiter">-></span>value<span class="Delimiter">).</span>elements<span class="Delimiter">))</span> <span class="Delimiter">{</span> raise << maybe<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"invalid offset '"</span> << offset_value << <span class="Constant">"' for '"</span> << get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> base_type<span class="Delimiter">-></span>value<span class="Delimiter">).</span>name << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> @@ -579,7 +583,8 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span offset_value = offset<span class="Delimiter">.</span>value<span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Normal">const</span> reagent& value = inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">2</span><span class="Delimiter">);</span> - <span class="Normal">const</span> reagent& element = element_type<span class="Delimiter">(</span>base<span class="Delimiter">.</span>type<span class="Delimiter">,</span> offset_value<span class="Delimiter">);</span> <span class="Comment">// not just base_type because later layers will introduce compound types</span> + <span class="Comment">//: use base.type rather than base_type because later layers will introduce compound types</span> + <span class="Normal">const</span> reagent& element = element_type<span class="Delimiter">(</span>base<span class="Delimiter">.</span>type<span class="Delimiter">,</span> offset_value<span class="Delimiter">);</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!types_coercible<span class="Delimiter">(</span>element<span class="Delimiter">,</span> value<span class="Delimiter">))</span> <span class="Delimiter">{</span> raise << maybe<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"'put "</span> << base<span class="Delimiter">.</span>original_string << <span class="Constant">", "</span> << offset<span class="Delimiter">.</span>original_string << <span class="Constant">"' should write to "</span> << names_to_string_without_quotes<span class="Delimiter">(</span>element<span class="Delimiter">.</span>type<span class="Delimiter">)</span> << <span class="Constant">" but '"</span> << value<span class="Delimiter">.</span>name << <span class="Constant">"' has type "</span> << names_to_string_without_quotes<span class="Delimiter">(</span>value<span class="Delimiter">.</span>type<span class="Delimiter">)</span> << <span class="cSpecial">'\n'</span> << end<span class="Delimiter">();</span> <span class="Identifier">break</span><span class="Delimiter">;</span> diff --git a/html/031merge.cc.html b/html/031merge.cc.html index c565c37b..0a606853 100644 --- a/html/031merge.cc.html +++ b/html/031merge.cc.html @@ -246,8 +246,8 @@ Transform<span class="Delimiter">.</span>push_back<span class="Delimiter">(</spa assert<span class="Delimiter">(</span><span class="Constant">false</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> -<span class="Comment">// replaced in a later layer</span> -<span class="Comment">// todo: find some clean way to take this call completely out of this layer</span> +<span class="Comment">//: replaced in a later layer</span> +<span class="Comment">//: todo: find some clean way to take this call completely out of this layer</span> <span class="Normal">const</span> type_tree* get_base_type<span class="Delimiter">(</span><span class="Normal">const</span> type_tree* t<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Identifier">return</span> t<span class="Delimiter">;</span> <span class="Delimiter">}</span> diff --git a/html/036refcount.cc.html b/html/036refcount.cc.html index dda4e250..1d02a4ad 100644 --- a/html/036refcount.cc.html +++ b/html/036refcount.cc.html @@ -148,8 +148,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="traceContains">+run: {1: ("address" "number")} <- new {number: "type"}</span> <span class="traceContains">+mem: incrementing refcount of 1000: 0 -> 1</span> <span class="traceContains">+run: foo {1: ("address" "number")}</span> -<span class="Comment"># leave ambiguous precisely when the next increment happens; a later layer</span> -<span class="Comment"># will mess with that</span> +<span class="Comment"># leave ambiguous precisely when the next increment happens</span> <span class="traceContains">+mem: incrementing refcount of 1000: 1 -> 2</span> <span class="traceContains">+run: {1: ("address" "number")} <- new {number: "type"}</span> <span class="traceContains">+mem: decrementing refcount of 1000: 2 -> 1</span> diff --git a/html/037abandon.cc.html b/html/037abandon.cc.html index a11ba8cf..1ef3ac3a 100644 --- a/html/037abandon.cc.html +++ b/html/037abandon.cc.html @@ -161,8 +161,7 @@ map<<span class="Normal">int</span><span class="Delimiter">,</span> <span cla <span class="traceContains">+run: {1: ("address" "number")} <- new {number: "type"}</span> <span class="traceContains">+mem: incrementing refcount of 1000: 0 -> 1</span> <span class="traceContains">+run: foo {1: ("address" "number")}</span> -<span class="Comment"># leave ambiguous precisely when the next increment happens; a later layer</span> -<span class="Comment"># will mess with that</span> +<span class="Comment"># leave ambiguous precisely when the next increment happens</span> <span class="traceContains">+mem: incrementing refcount of 1000: 1 -> 2</span> <span class="traceContains">+run: {2: ("address" "number")} <- copy {0: "literal"}</span> <span class="traceContains">+mem: decrementing refcount of 1000: 2 -> 1</span> diff --git a/html/043space.cc.html b/html/043space.cc.html index 5de969b0..617bd873 100644 --- a/html/043space.cc.html +++ b/html/043space.cc.html @@ -106,8 +106,8 @@ absolutize<span class="Delimiter">(</span>x<span class="Delimiter">);</span> assert<span class="Delimiter">(</span>is_raw<span class="Delimiter">(</span>x<span class="Delimiter">));</span> <span class="Delimiter">}</span> +<span class="Comment">//: hook replaced in a later layer</span> <span class="Normal">int</span> space_base<span class="Delimiter">(</span><span class="Normal">const</span> reagent& x<span class="Delimiter">)</span> <span class="Delimiter">{</span> - <span class="Comment">// temporary stub; will be replaced in a later layer</span> <span class="Identifier">return</span> current_call<span class="Delimiter">().</span>default_space ? <span class="Delimiter">(</span>current_call<span class="Delimiter">().</span>default_space+<span class="Comment">/*</span><span class="Comment">skip refcount</span><span class="Comment">*/</span><span class="Constant">1</span><span class="Delimiter">)</span> : <span class="Constant">0</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> @@ -428,10 +428,7 @@ Transform<span class="Delimiter">.</span>push_back<span class="Delimiter">(</spa <span class="Normal">void</span> check_default_space<span class="Delimiter">(</span><span class="Normal">const</span> recipe_ordinal r<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Hide_missing_default_space_errors<span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span class="Comment">// skip previous core tests; this is only for Mu code</span> <span class="Normal">const</span> recipe& caller = get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">);</span> - <span class="Comment">// skip scenarios (later layer)</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">"scenario_"</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">"run_"</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">// End check_default_space Special-cases</span> <span class="Comment">// assume recipes with only numeric addresses know what they're doing (usually tests)</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!contains_non_special_name<span class="Delimiter">(</span>r<span class="Delimiter">))</span> <span class="Identifier">return</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">"--- check that recipe "</span> << caller<span class="Delimiter">.</span>name << <span class="Constant">" sets default-space"</span> << end<span class="Delimiter">();</span> diff --git a/html/044space_surround.cc.html b/html/044space_surround.cc.html index 6ea1ccca..dfa5bc11 100644 --- a/html/044space_surround.cc.html +++ b/html/044space_surround.cc.html @@ -50,7 +50,8 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Constant">21</span>:num<span class="Special"> <- </span>copy <span class="Constant">5</span> <span class="Comment"># length</span> <span class="Comment"># actual start of this recipe</span> <span class="Normal">default</span>-space:space<span class="Special"> <- </span>copy <span class="Constant">10</span>/unsafe - <span class="Constant">0</span>:space/names:dummy<span class="Special"> <- </span>copy <span class="Constant">20</span>/unsafe <span class="Comment"># later layers will explain the /names: property</span> + <span class="Comment">#: later layers will explain the /names: property</span> + <span class="Constant">0</span>:space/names:dummy<span class="Special"> <- </span>copy <span class="Constant">20</span>/unsafe <span class="Constant">1</span>:num<span class="Special"> <- </span>copy <span class="Constant">32</span> <span class="Constant">1</span>:num/space:<span class="Constant">1</span><span class="Special"> <- </span>copy <span class="Constant">33</span> ] 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 "End check_default_space Special-cases")</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">"scenario_"</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">"run_"</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> diff --git a/html/073wait.cc.html b/html/073wait.cc.html index 7f11c328..e607588e 100644 --- a/html/073wait.cc.html +++ b/html/073wait.cc.html @@ -216,7 +216,8 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span <span class="Identifier">break</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Normal">int</span> offset_value = <span class="Constant">0</span><span class="Delimiter">;</span> - <span class="Normal">if</span> <span class="Delimiter">(</span>is_integer<span class="Delimiter">(</span>offset<span class="Delimiter">.</span>name<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span class="Comment">// later layers permit non-integer offsets</span> + <span class="Comment">//: later layers will permit non-integer offsets</span> + <span class="Normal">if</span> <span class="Delimiter">(</span>is_integer<span class="Delimiter">(</span>offset<span class="Delimiter">.</span>name<span class="Delimiter">))</span> <span class="Delimiter">{</span> offset_value = to_integer<span class="Delimiter">(</span>offset<span class="Delimiter">.</span>name<span class="Delimiter">);</span> <span class="Normal">if</span> <span class="Delimiter">(</span>offset_value < <span class="Constant">0</span> || offset_value >= SIZE<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> base_type<span class="Delimiter">).</span>elements<span class="Delimiter">))</span> <span class="Delimiter">{</span> raise << maybe<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name<span class="Delimiter">)</span> << <span class="Constant">"invalid offset "</span> << offset_value << <span class="Constant">" for '"</span> << get<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> base_type<span class="Delimiter">).</span>name << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << end<span class="Delimiter">();</span> |