diff options
Diffstat (limited to 'html/020run.cc.html')
-rw-r--r-- | html/020run.cc.html | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/html/020run.cc.html b/html/020run.cc.html index bf415da3..a4ddb087 100644 --- a/html/020run.cc.html +++ b/html/020run.cc.html @@ -94,10 +94,8 @@ map<string<span class="Delimiter">,</span> <span class="Normal">int</span>> run_current_routine<span class="Delimiter">();</span> <span class="Delimiter">}</span> -<span class="Normal">void</span> run_current_routine<span class="Delimiter">()</span> -<span class="Delimiter">{</span> <span class="Comment">// curly on a separate line, because later layers will modify function header</span> - <span class="Normal">while</span> <span class="Delimiter">(</span>!Current_routine<span class="Delimiter">-></span>completed<span class="Delimiter">())</span> <span class="Comment">// later layers will modify condition</span> - <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="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> @@ -140,6 +138,11 @@ map<string<span class="Delimiter">,</span> <span class="Normal">int</span>> <span class="Normal">stop_running_current_routine</span>:<span class="Delimiter">;</span> <span class="Delimiter">}</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> +<span class="Delimiter">}</span> + <span class="Normal">bool</span> should_copy_ingredients<span class="Delimiter">()</span> <span class="Delimiter">{</span> <span class="Comment">// End should_copy_ingredients Special-cases</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> |