diff options
Diffstat (limited to 'html/072scheduler.cc.html')
-rw-r--r-- | html/072scheduler.cc.html | 185 |
1 files changed, 93 insertions, 92 deletions
diff --git a/html/072scheduler.cc.html b/html/072scheduler.cc.html index 37bc5fc4..378ed639 100644 --- a/html/072scheduler.cc.html +++ b/html/072scheduler.cc.html @@ -15,18 +15,19 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color a { text-decoration: none; } a:hover { text-decoration: underline; } * { font-size: 12pt; font-size: 1em; } -.Constant { color: #00a0a0; } -.traceAbsent { color: #c00000; } -.Special { color: #c00000; } -.muRecipe { color: #ff8700; } .SalientComment { color: #00ffff; } -.Comment { color: #9090ff; } -.Delimiter { color: #800080; } +.muRecipe { color: #ff8700; } .LineNr { color: #444444; } .traceContains { color: #008000; } +.traceAbsent { color: #c00000; } +.Delimiter { color: #800080; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.Identifier { color: #c0a020; } .cSpecial { color: #008000; } +.Conceal { color: #4e4e4e; } +.Comment { color: #9090ff; } +.Constant { color: #00a0a0; } +.Special { color: #c00000; } +.Identifier { color: #c0a020; } --> </style> @@ -69,7 +70,7 @@ if ('onhashchange' in window) { <span id="L6" class="LineNr"> 6 </span> start-running f2 <span id="L7" class="LineNr"> 7 </span> <span class="Comment"># wait for f2 to run</span> <span id="L8" class="LineNr"> 8 </span> <span class="Delimiter">{</span> -<span id="L9" class="LineNr"> 9 </span> jump-unless <span class="Constant">1</span>:num<span class="Delimiter">,</span> -<span class="Constant">1</span> +<span id="L9" class="LineNr"> 9 </span> <span class="Conceal">¦</span> jump-unless <span class="Constant">1</span>:num<span class="Delimiter">,</span> -<span class="Constant">1</span> <span id="L10" class="LineNr"> 10 </span> <span class="Delimiter">}</span> <span id="L11" class="LineNr"> 11 </span>] <span id="L12" class="LineNr"> 12 </span><span class="muRecipe">def</span> f2 [ @@ -91,7 +92,7 @@ if ('onhashchange' in window) { <span id="L28" class="LineNr"> 28 </span><span class="Normal">bool</span> <a href='072scheduler.cc.html#L28'>should_continue_running</a><span class="Delimiter">(</span><span class="Normal">const</span> routine* current_routine<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L29" class="LineNr"> 29 </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 id="L30" class="LineNr"> 30 </span> <span class="Identifier">return</span> Current_routine<span class="Delimiter">-></span>state == <a href='072scheduler.cc.html#L41'>RUNNING</a> -<span id="L31" class="LineNr"> 31 </span> && Current_routine<span class="Delimiter">-></span>instructions_run_this_scheduling_slice < Scheduling_interval<span class="Delimiter">;</span> +<span id="L31" class="LineNr"> 31 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> && Current_routine<span class="Delimiter">-></span>instructions_run_this_scheduling_slice < Scheduling_interval<span class="Delimiter">;</span> <span id="L32" class="LineNr"> 32 </span><span class="Delimiter">}</span> <span id="L33" class="LineNr"> 33 </span><span class="Delimiter">:(after "stop_running_current_routine:")</span> <span id="L34" class="LineNr"> 34 </span><span class="Comment">// Reset instructions_run_this_scheduling_slice</span> @@ -126,26 +127,26 @@ if ('onhashchange' in window) { <span id="L63" class="LineNr"> 63 </span> Routines<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>rr<span class="Delimiter">);</span> <span id="L64" class="LineNr"> 64 </span> Current_routine_index = <span class="Constant">0</span><span class="Delimiter">,</span> Current_routine = Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> <span id="L65" class="LineNr"> 65 </span> <span class="Normal">while</span> <span class="Delimiter">(</span>!all_routines_done<span class="Delimiter">())</span> <span class="Delimiter">{</span> -<span id="L66" class="LineNr"> 66 </span> <a href='072scheduler.cc.html#L91'>skip_to_next_routine</a><span class="Delimiter">();</span> -<span id="L67" class="LineNr"> 67 </span> assert<span class="Delimiter">(</span>Current_routine<span class="Delimiter">);</span> -<span id="L68" class="LineNr"> 68 </span> assert<span class="Delimiter">(</span>Current_routine<span class="Delimiter">-></span>state == <a href='072scheduler.cc.html#L41'>RUNNING</a><span class="Delimiter">);</span> -<span id="L69" class="LineNr"> 69 </span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9990</span><span class="Delimiter">,</span> <span class="Constant">"schedule"</span><span class="Delimiter">)</span> << <a href='072scheduler.cc.html#L103'>current_routine_label</a><span class="Delimiter">()</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L70" class="LineNr"> 70 </span> run_current_routine<span class="Delimiter">();</span> -<span id="L71" class="LineNr"> 71 </span> <span class="Comment">// Scheduler State Transitions</span> -<span id="L72" class="LineNr"> 72 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Current_routine<span class="Delimiter">-></span>completed<span class="Delimiter">())</span> -<span id="L73" class="LineNr"> 73 </span> Current_routine<span class="Delimiter">-></span>state = <a href='072scheduler.cc.html#L42'>COMPLETED</a><span class="Delimiter">;</span> -<span id="L74" class="LineNr"> 74 </span> <span class="Comment">// End Scheduler State Transitions</span> +<span id="L66" class="LineNr"> 66 </span> <span class="Conceal">¦</span> <a href='072scheduler.cc.html#L91'>skip_to_next_routine</a><span class="Delimiter">();</span> +<span id="L67" class="LineNr"> 67 </span> <span class="Conceal">¦</span> assert<span class="Delimiter">(</span>Current_routine<span class="Delimiter">);</span> +<span id="L68" class="LineNr"> 68 </span> <span class="Conceal">¦</span> assert<span class="Delimiter">(</span>Current_routine<span class="Delimiter">-></span>state == <a href='072scheduler.cc.html#L41'>RUNNING</a><span class="Delimiter">);</span> +<span id="L69" class="LineNr"> 69 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9990</span><span class="Delimiter">,</span> <span class="Constant">"schedule"</span><span class="Delimiter">)</span> << <a href='072scheduler.cc.html#L103'>current_routine_label</a><span class="Delimiter">()</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L70" class="LineNr"> 70 </span> <span class="Conceal">¦</span> run_current_routine<span class="Delimiter">();</span> +<span id="L71" class="LineNr"> 71 </span> <span class="Conceal">¦</span> <span class="Comment">// Scheduler State Transitions</span> +<span id="L72" class="LineNr"> 72 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Current_routine<span class="Delimiter">-></span>completed<span class="Delimiter">())</span> +<span id="L73" class="LineNr"> 73 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> Current_routine<span class="Delimiter">-></span>state = <a href='072scheduler.cc.html#L42'>COMPLETED</a><span class="Delimiter">;</span> +<span id="L74" class="LineNr"> 74 </span> <span class="Conceal">¦</span> <span class="Comment">// End Scheduler State Transitions</span> <span id="L75" class="LineNr"> 75 </span> -<span id="L76" class="LineNr"> 76 </span> <span class="Comment">// Scheduler Cleanup</span> -<span id="L77" class="LineNr"> 77 </span> <span class="Comment">// End Scheduler Cleanup</span> +<span id="L76" class="LineNr"> 76 </span> <span class="Conceal">¦</span> <span class="Comment">// Scheduler Cleanup</span> +<span id="L77" class="LineNr"> 77 </span> <span class="Conceal">¦</span> <span class="Comment">// End Scheduler Cleanup</span> <span id="L78" class="LineNr"> 78 </span> <span class="Delimiter">}</span> <span id="L79" class="LineNr"> 79 </span> <span class="Comment">// End Run Routine</span> <span id="L80" class="LineNr"> 80 </span><span class="Delimiter">}</span> <span id="L81" class="LineNr"> 81 </span> <span id="L82" class="LineNr"> 82 </span><span class="Normal">bool</span> <a href='072scheduler.cc.html#L82'>all_routines_done</a><span class="Delimiter">()</span> <span class="Delimiter">{</span> <span id="L83" class="LineNr"> 83 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>Routines<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L84" class="LineNr"> 84 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>state == <a href='072scheduler.cc.html#L41'>RUNNING</a><span class="Delimiter">)</span> -<span id="L85" class="LineNr"> 85 </span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> +<span id="L84" class="LineNr"> 84 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>state == <a href='072scheduler.cc.html#L41'>RUNNING</a><span class="Delimiter">)</span> +<span id="L85" class="LineNr"> 85 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span id="L86" class="LineNr"> 86 </span> <span class="Delimiter">}</span> <span id="L87" class="LineNr"> 87 </span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> <span id="L88" class="LineNr"> 88 </span><span class="Delimiter">}</span> @@ -155,11 +156,11 @@ if ('onhashchange' in window) { <span id="L92" class="LineNr"> 92 </span> assert<span class="Delimiter">(</span>!Routines<span class="Delimiter">.</span>empty<span class="Delimiter">());</span> <span id="L93" class="LineNr"> 93 </span> assert<span class="Delimiter">(</span>Current_routine_index < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>Routines<span class="Delimiter">));</span> <span id="L94" class="LineNr"> 94 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Delimiter">(</span>Current_routine_index+<span class="Constant">1</span><span class="Delimiter">)</span>%SIZE<span class="Delimiter">(</span>Routines<span class="Delimiter">);</span> i != Current_routine_index<span class="Delimiter">;</span> i = <span class="Delimiter">(</span>i+<span class="Constant">1</span><span class="Delimiter">)</span>%SIZE<span class="Delimiter">(</span>Routines<span class="Delimiter">))</span> <span class="Delimiter">{</span> -<span id="L95" class="LineNr"> 95 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>state == <a href='072scheduler.cc.html#L41'>RUNNING</a><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L96" class="LineNr"> 96 </span> Current_routine_index = i<span class="Delimiter">;</span> -<span id="L97" class="LineNr"> 97 </span> Current_routine = Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">);</span> -<span id="L98" class="LineNr"> 98 </span> <span class="Identifier">return</span><span class="Delimiter">;</span> -<span id="L99" class="LineNr"> 99 </span> <span class="Delimiter">}</span> +<span id="L95" class="LineNr"> 95 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>state == <a href='072scheduler.cc.html#L41'>RUNNING</a><span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L96" class="LineNr"> 96 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> Current_routine_index = i<span class="Delimiter">;</span> +<span id="L97" class="LineNr"> 97 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> Current_routine = Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">);</span> +<span id="L98" class="LineNr"> 98 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">return</span><span class="Delimiter">;</span> +<span id="L99" class="LineNr"> 99 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L100" class="LineNr">100 </span> <span class="Delimiter">}</span> <span id="L101" class="LineNr">101 </span><span class="Delimiter">}</span> <span id="L102" class="LineNr">102 </span> @@ -171,8 +172,8 @@ if ('onhashchange' in window) { <span id="L108" class="LineNr">108 </span> ostringstream result<span class="Delimiter">;</span> <span id="L109" class="LineNr">109 </span> <span class="Normal">const</span> call_stack& calls = r<span class="Delimiter">-></span>calls<span class="Delimiter">;</span> <span id="L110" class="LineNr">110 </span> <span class="Normal">for</span> <span class="Delimiter">(</span>call_stack::const_iterator p = calls<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != calls<span class="Delimiter">.</span><a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L111" class="LineNr">111 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>p != calls<span class="Delimiter">.</span>begin<span class="Delimiter">())</span> result << <span class="Constant">'/'</span><span class="Delimiter">;</span> -<span id="L112" class="LineNr">112 </span> result << get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> p<span class="Delimiter">-></span>running_recipe<span class="Delimiter">).</span>name<span class="Delimiter">;</span> +<span id="L111" class="LineNr">111 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>p != calls<span class="Delimiter">.</span>begin<span class="Delimiter">())</span> result << <span class="Constant">'/'</span><span class="Delimiter">;</span> +<span id="L112" class="LineNr">112 </span> <span class="Conceal">¦</span> result << get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> p<span class="Delimiter">-></span>running_recipe<span class="Delimiter">).</span>name<span class="Delimiter">;</span> <span id="L113" class="LineNr">113 </span> <span class="Delimiter">}</span> <span id="L114" class="LineNr">114 </span> <span class="Identifier">return</span> result<span class="Delimiter">.</span>str<span class="Delimiter">();</span> <span id="L115" class="LineNr">115 </span><span class="Delimiter">}</span> @@ -193,11 +194,11 @@ if ('onhashchange' in window) { <span id="L130" class="LineNr">130 </span> <span class="Comment">// todo: test this</span> <span id="L131" class="LineNr">131 </span> Current_routine = main_routine<span class="Delimiter">;</span> <span id="L132" class="LineNr">132 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">1</span><span class="Delimiter">;</span> i < argc<span class="Delimiter">;</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L133" class="LineNr">133 </span> vector<<span class="Normal">double</span>> arg<span class="Delimiter">;</span> -<span id="L134" class="LineNr">134 </span> arg<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span><a href='038new_text.cc.html#L38'>new_mu_text</a><span class="Delimiter">(</span>argv[i]<span class="Delimiter">));</span> -<span id="L135" class="LineNr">135 </span> assert<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> arg<span class="Delimiter">.</span>back<span class="Delimiter">())</span> == <span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L136" class="LineNr">136 </span> <a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> arg<span class="Delimiter">.</span>back<span class="Delimiter">(),</span> <span class="Constant">1</span><span class="Delimiter">);</span> <span class="Comment">// update refcount</span> -<span id="L137" class="LineNr">137 </span> current_call<span class="Delimiter">().</span>ingredient_atoms<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>arg<span class="Delimiter">);</span> +<span id="L133" class="LineNr">133 </span> <span class="Conceal">¦</span> vector<<span class="Normal">double</span>> arg<span class="Delimiter">;</span> +<span id="L134" class="LineNr">134 </span> <span class="Conceal">¦</span> arg<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span><a href='038new_text.cc.html#L38'>new_mu_text</a><span class="Delimiter">(</span>argv[i]<span class="Delimiter">));</span> +<span id="L135" class="LineNr">135 </span> <span class="Conceal">¦</span> assert<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> arg<span class="Delimiter">.</span>back<span class="Delimiter">())</span> == <span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L136" class="LineNr">136 </span> <span class="Conceal">¦</span> <a href='001help.cc.html#L218'>put</a><span class="Delimiter">(</span>Memory<span class="Delimiter">,</span> arg<span class="Delimiter">.</span>back<span class="Delimiter">(),</span> <span class="Constant">1</span><span class="Delimiter">);</span> <span class="Comment">// update refcount</span> +<span id="L137" class="LineNr">137 </span> <span class="Conceal">¦</span> current_call<span class="Delimiter">().</span>ingredient_atoms<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>arg<span class="Delimiter">);</span> <span id="L138" class="LineNr">138 </span> <span class="Delimiter">}</span> <span id="L139" class="LineNr">139 </span> run<span class="Delimiter">(</span>main_routine<span class="Delimiter">);</span> <span id="L140" class="LineNr">140 </span><span class="Delimiter">}</span> @@ -230,12 +231,12 @@ if ('onhashchange' in window) { <span id="L167" class="LineNr">167 </span><span class="Delimiter">:(before "End Primitive Recipe Checks")</span> <span id="L168" class="LineNr">168 </span><span class="Normal">case</span> START_RUNNING: <span class="Delimiter">{</span> <span id="L169" class="LineNr">169 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span> -<span id="L170" class="LineNr">170 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"'start-running' requires at least one ingredient: the <a href='010vm.cc.html#L19'>recipe</a> to start running</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L171" class="LineNr">171 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L170" class="LineNr">170 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"'start-running' requires at least one ingredient: the <a href='010vm.cc.html#L19'>recipe</a> to start running</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L171" class="LineNr">171 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L172" class="LineNr">172 </span> <span class="Delimiter">}</span> <span id="L173" class="LineNr">173 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_mu_recipe<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> -<span id="L174" class="LineNr">174 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"first ingredient of 'start-running' should be a <a href='010vm.cc.html#L19'>recipe</a>, but got '"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">))</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L175" class="LineNr">175 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L174" class="LineNr">174 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"first ingredient of 'start-running' should be a <a href='010vm.cc.html#L19'>recipe</a>, but got '"</span> << to_string<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">))</span> << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L175" class="LineNr">175 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L176" class="LineNr">176 </span> <span class="Delimiter">}</span> <span id="L177" class="LineNr">177 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L178" class="LineNr">178 </span><span class="Delimiter">}</span> @@ -245,11 +246,11 @@ if ('onhashchange' in window) { <span id="L182" class="LineNr">182 </span> new_routine<span class="Delimiter">-></span>parent_index = Current_routine_index<span class="Delimiter">;</span> <span id="L183" class="LineNr">183 </span> <span class="Comment">// populate ingredients</span> <span id="L184" class="LineNr">184 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">1</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L185" class="LineNr">185 </span> new_routine<span class="Delimiter">-></span>calls<span class="Delimiter">.</span>front<span class="Delimiter">().</span>ingredient_atoms<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> -<span id="L186" class="LineNr">186 </span> reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> ingredient = current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">);</span> -<span id="L187" class="LineNr">187 </span> canonize_type<span class="Delimiter">(</span>ingredient<span class="Delimiter">);</span> -<span id="L188" class="LineNr">188 </span> new_routine<span class="Delimiter">-></span>calls<span class="Delimiter">.</span>front<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>ingredient<span class="Delimiter">);</span> -<span id="L189" class="LineNr">189 </span> <span class="Comment">// End Populate start-running Ingredient</span> +<span id="L185" class="LineNr">185 </span> <span class="Conceal">¦</span> new_routine<span class="Delimiter">-></span>calls<span class="Delimiter">.</span>front<span class="Delimiter">().</span>ingredient_atoms<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> +<span id="L186" class="LineNr">186 </span> <span class="Conceal">¦</span> reagent<span class="Comment">/*</span><span class="Comment">copy</span><span class="Comment">*/</span> ingredient = current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">);</span> +<span id="L187" class="LineNr">187 </span> <span class="Conceal">¦</span> canonize_type<span class="Delimiter">(</span>ingredient<span class="Delimiter">);</span> +<span id="L188" class="LineNr">188 </span> <span class="Conceal">¦</span> new_routine<span class="Delimiter">-></span>calls<span class="Delimiter">.</span>front<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>ingredient<span class="Delimiter">);</span> +<span id="L189" class="LineNr">189 </span> <span class="Conceal">¦</span> <span class="Comment">// End Populate start-running Ingredient</span> <span id="L190" class="LineNr">190 </span> <span class="Delimiter">}</span> <span id="L191" class="LineNr">191 </span> Routines<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>new_routine<span class="Delimiter">);</span> <span id="L192" class="LineNr">192 </span> products<span class="Delimiter">.</span>resize<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> @@ -295,7 +296,7 @@ if ('onhashchange' in window) { <span id="L232" class="LineNr">232 </span> start-running f2<span class="Delimiter">,</span> <span class="Constant">3</span> <span id="L233" class="LineNr">233 </span> <span class="Comment"># wait for f2 to run</span> <span id="L234" class="LineNr">234 </span> <span class="Delimiter">{</span> -<span id="L235" class="LineNr">235 </span> jump-unless <span class="Constant">1</span>:num<span class="Delimiter">,</span> -<span class="Constant">1</span> +<span id="L235" class="LineNr">235 </span> <span class="Conceal">¦</span> jump-unless <span class="Constant">1</span>:num<span class="Delimiter">,</span> -<span class="Constant">1</span> <span id="L236" class="LineNr">236 </span> <span class="Delimiter">}</span> <span id="L237" class="LineNr">237 </span>] <span id="L238" class="LineNr">238 </span><span class="muRecipe">def</span> f2 [ @@ -463,7 +464,7 @@ if ('onhashchange' in window) { <span id="L400" class="LineNr">400 </span> <span id="L401" class="LineNr">401 </span><span class="Delimiter">:(after "operator<<(ostream& os, <a href='001help.cc.html#L255'>unused</a> end)")</span> <span id="L402" class="LineNr">402 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Trace_stream && Trace_stream<span class="Delimiter">-></span>curr_label == <span class="Constant">"error"</span> && Current_routine<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L403" class="LineNr">403 </span> Current_routine<span class="Delimiter">-></span>state = <a href='072scheduler.cc.html#L42'>COMPLETED</a><span class="Delimiter">;</span> +<span id="L403" class="LineNr">403 </span> <span class="Conceal">¦</span> Current_routine<span class="Delimiter">-></span>state = <a href='072scheduler.cc.html#L42'>COMPLETED</a><span class="Delimiter">;</span> <span id="L404" class="LineNr">404 </span> <span class="Delimiter">}</span> <span id="L405" class="LineNr">405 </span> <span id="L406" class="LineNr">406 </span><span class="SalientComment">//:: Routines are marked completed when their parent completes.</span> @@ -484,15 +485,15 @@ if ('onhashchange' in window) { <span id="L421" class="LineNr">421 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>parent_index < <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span class="Comment">// root thread</span> <span id="L422" class="LineNr">422 </span> <span class="Comment">// structured concurrency: <a href="http://250bpm.com/blog:71">http://250bpm.com/blog:71</a></span> <span id="L423" class="LineNr">423 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>has_completed_parent<span class="Delimiter">(</span>i<span class="Delimiter">))</span> <span class="Delimiter">{</span> -<span id="L424" class="LineNr">424 </span> Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>state = <a href='072scheduler.cc.html#L42'>COMPLETED</a><span class="Delimiter">;</span> +<span id="L424" class="LineNr">424 </span> <span class="Conceal">¦</span> Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>state = <a href='072scheduler.cc.html#L42'>COMPLETED</a><span class="Delimiter">;</span> <span id="L425" class="LineNr">425 </span> <span class="Delimiter">}</span> <span id="L426" class="LineNr">426 </span><span class="Delimiter">}</span> <span id="L427" class="LineNr">427 </span> <span id="L428" class="LineNr">428 </span><span class="Delimiter">:(code)</span> <span id="L429" class="LineNr">429 </span><span class="Normal">bool</span> has_completed_parent<span class="Delimiter">(</span><span class="Normal">int</span> routine_index<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L430" class="LineNr">430 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> j = routine_index<span class="Delimiter">;</span> j >= <span class="Constant">0</span><span class="Delimiter">;</span> j = Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">)-></span>parent_index<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L431" class="LineNr">431 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">)-></span>state == <a href='072scheduler.cc.html#L42'>COMPLETED</a><span class="Delimiter">)</span> -<span id="L432" class="LineNr">432 </span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> +<span id="L431" class="LineNr">431 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">)-></span>state == <a href='072scheduler.cc.html#L42'>COMPLETED</a><span class="Delimiter">)</span> +<span id="L432" class="LineNr">432 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> <span id="L433" class="LineNr">433 </span> <span class="Delimiter">}</span> <span id="L434" class="LineNr">434 </span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span id="L435" class="LineNr">435 </span><span class="Delimiter">}</span> @@ -521,12 +522,12 @@ if ('onhashchange' in window) { <span id="L458" class="LineNr">458 </span><span class="Delimiter">:(before "End Primitive Recipe Checks")</span> <span id="L459" class="LineNr">459 </span><span class="Normal">case</span> ROUTINE_STATE: <span class="Delimiter">{</span> <span id="L460" class="LineNr">460 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">)</span> != <span class="Constant">1</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L461" class="LineNr">461 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"'routine-state' requires exactly one ingredient, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L462" class="LineNr">462 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L461" class="LineNr">461 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"'routine-state' requires exactly one ingredient, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L462" class="LineNr">462 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L463" class="LineNr">463 </span> <span class="Delimiter">}</span> <span id="L464" class="LineNr">464 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_mu_number<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> -<span id="L465" class="LineNr">465 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"first ingredient of 'routine-state' should be a routine id generated by 'start-running', but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L466" class="LineNr">466 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L465" class="LineNr">465 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"first ingredient of 'routine-state' should be a routine id generated by 'start-running', but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L466" class="LineNr">466 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L467" class="LineNr">467 </span> <span class="Delimiter">}</span> <span id="L468" class="LineNr">468 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L469" class="LineNr">469 </span><span class="Delimiter">}</span> @@ -535,10 +536,10 @@ if ('onhashchange' in window) { <span id="L472" class="LineNr">472 </span> <span class="Normal">int</span> id = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> <span id="L473" class="LineNr">473 </span> <span class="Normal">int</span> result = -<span class="Constant">1</span><span class="Delimiter">;</span> <span id="L474" class="LineNr">474 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>Routines<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L475" class="LineNr">475 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>id == id<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L476" class="LineNr">476 </span> result = Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>state<span class="Delimiter">;</span> -<span id="L477" class="LineNr">477 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L478" class="LineNr">478 </span> <span class="Delimiter">}</span> +<span id="L475" class="LineNr">475 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>id == id<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L476" class="LineNr">476 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> result = Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>state<span class="Delimiter">;</span> +<span id="L477" class="LineNr">477 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L478" class="LineNr">478 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L479" class="LineNr">479 </span> <span class="Delimiter">}</span> <span id="L480" class="LineNr">480 </span> products<span class="Delimiter">.</span>resize<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> <span id="L481" class="LineNr">481 </span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>result<span class="Delimiter">);</span> @@ -554,12 +555,12 @@ if ('onhashchange' in window) { <span id="L491" class="LineNr">491 </span><span class="Delimiter">:(before "End Primitive Recipe Checks")</span> <span id="L492" class="LineNr">492 </span><span class="Normal">case</span> STOP: <span class="Delimiter">{</span> <span id="L493" class="LineNr">493 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">)</span> != <span class="Constant">1</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L494" class="LineNr">494 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"'stop' requires exactly one ingredient, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L495" class="LineNr">495 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L494" class="LineNr">494 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"'stop' requires exactly one ingredient, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L495" class="LineNr">495 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L496" class="LineNr">496 </span> <span class="Delimiter">}</span> <span id="L497" class="LineNr">497 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_mu_number<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> -<span id="L498" class="LineNr">498 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"first ingredient of 'stop' should be a routine id generated by 'start-running', but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L499" class="LineNr">499 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L498" class="LineNr">498 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"first ingredient of 'stop' should be a routine id generated by 'start-running', but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L499" class="LineNr">499 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L500" class="LineNr">500 </span> <span class="Delimiter">}</span> <span id="L501" class="LineNr">501 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L502" class="LineNr">502 </span><span class="Delimiter">}</span> @@ -567,10 +568,10 @@ if ('onhashchange' in window) { <span id="L504" class="LineNr">504 </span><span class="Normal">case</span> STOP: <span class="Delimiter">{</span> <span id="L505" class="LineNr">505 </span> <span class="Normal">int</span> id = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> <span id="L506" class="LineNr">506 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>Routines<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L507" class="LineNr">507 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>id == id<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L508" class="LineNr">508 </span> Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>state = <a href='072scheduler.cc.html#L42'>COMPLETED</a><span class="Delimiter">;</span> -<span id="L509" class="LineNr">509 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L510" class="LineNr">510 </span> <span class="Delimiter">}</span> +<span id="L507" class="LineNr">507 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>id == id<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L508" class="LineNr">508 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>state = <a href='072scheduler.cc.html#L42'>COMPLETED</a><span class="Delimiter">;</span> +<span id="L509" class="LineNr">509 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L510" class="LineNr">510 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L511" class="LineNr">511 </span> <span class="Delimiter">}</span> <span id="L512" class="LineNr">512 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L513" class="LineNr">513 </span><span class="Delimiter">}</span> @@ -586,7 +587,7 @@ if ('onhashchange' in window) { <span id="L523" class="LineNr">523 </span><span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> <span id="L524" class="LineNr">524 </span><span class="Normal">case</span> _DUMP_ROUTINES: <span class="Delimiter">{</span> <span id="L525" class="LineNr">525 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>Routines<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L526" class="LineNr">526 </span> cerr << i << <span class="Constant">": "</span> << Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>id << <span class="Constant">' '</span> << Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>state << <span class="Constant">' '</span> << Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>parent_index << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> +<span id="L526" class="LineNr">526 </span> <span class="Conceal">¦</span> cerr << i << <span class="Constant">": "</span> << Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>id << <span class="Constant">' '</span> << Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>state << <span class="Constant">' '</span> << Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>parent_index << <span class="cSpecial">'\n'</span><span class="Delimiter">;</span> <span id="L527" class="LineNr">527 </span> <span class="Delimiter">}</span> <span id="L528" class="LineNr">528 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L529" class="LineNr">529 </span><span class="Delimiter">}</span> @@ -615,12 +616,12 @@ if ('onhashchange' in window) { <span id="L552" class="LineNr">552 </span><span class="Delimiter">:(before "End Scheduler State Transitions")</span> <span id="L553" class="LineNr">553 </span><span class="Normal">if</span> <span class="Delimiter">(</span>Current_routine<span class="Delimiter">-></span>limit >= <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L554" class="LineNr">554 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Current_routine<span class="Delimiter">-></span>limit <= Scheduling_interval<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L555" class="LineNr">555 </span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"schedule"</span><span class="Delimiter">)</span> << <span class="Constant">"discontinuing routine "</span> << Current_routine<span class="Delimiter">-></span>id << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L556" class="LineNr">556 </span> Current_routine<span class="Delimiter">-></span>state = DISCONTINUED<span class="Delimiter">;</span> -<span id="L557" class="LineNr">557 </span> Current_routine<span class="Delimiter">-></span>limit = <span class="Constant">0</span><span class="Delimiter">;</span> +<span id="L555" class="LineNr">555 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9999</span><span class="Delimiter">,</span> <span class="Constant">"schedule"</span><span class="Delimiter">)</span> << <span class="Constant">"discontinuing routine "</span> << Current_routine<span class="Delimiter">-></span>id << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L556" class="LineNr">556 </span> <span class="Conceal">¦</span> Current_routine<span class="Delimiter">-></span>state = DISCONTINUED<span class="Delimiter">;</span> +<span id="L557" class="LineNr">557 </span> <span class="Conceal">¦</span> Current_routine<span class="Delimiter">-></span>limit = <span class="Constant">0</span><span class="Delimiter">;</span> <span id="L558" class="LineNr">558 </span> <span class="Delimiter">}</span> <span id="L559" class="LineNr">559 </span> <span class="Normal">else</span> <span class="Delimiter">{</span> -<span id="L560" class="LineNr">560 </span> Current_routine<span class="Delimiter">-></span>limit -= Scheduling_interval<span class="Delimiter">;</span> +<span id="L560" class="LineNr">560 </span> <span class="Conceal">¦</span> Current_routine<span class="Delimiter">-></span>limit -= Scheduling_interval<span class="Delimiter">;</span> <span id="L561" class="LineNr">561 </span> <span class="Delimiter">}</span> <span id="L562" class="LineNr">562 </span><span class="Delimiter">}</span> <span id="L563" class="LineNr">563 </span> @@ -634,8 +635,8 @@ if ('onhashchange' in window) { <span id="L571" class="LineNr">571 </span><span class="Delimiter">:(code)</span> <span id="L572" class="LineNr">572 </span><span class="Normal">bool</span> any_routines_with_error<span class="Delimiter">()</span> <span class="Delimiter">{</span> <span id="L573" class="LineNr">573 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>Routines<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L574" class="LineNr">574 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>state == DISCONTINUED<span class="Delimiter">)</span> -<span id="L575" class="LineNr">575 </span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> +<span id="L574" class="LineNr">574 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>state == DISCONTINUED<span class="Delimiter">)</span> +<span id="L575" class="LineNr">575 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> <span id="L576" class="LineNr">576 </span> <span class="Delimiter">}</span> <span id="L577" class="LineNr">577 </span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span id="L578" class="LineNr">578 </span><span class="Delimiter">}</span> @@ -652,16 +653,16 @@ if ('onhashchange' in window) { <span id="L589" class="LineNr">589 </span><span class="Delimiter">:(before "End Primitive Recipe Checks")</span> <span id="L590" class="LineNr">590 </span><span class="Normal">case</span> LIMIT_TIME: <span class="Delimiter">{</span> <span id="L591" class="LineNr">591 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">)</span> != <span class="Constant">2</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L592" class="LineNr">592 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"'limit-time' requires exactly two ingredient, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L593" class="LineNr">593 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L592" class="LineNr">592 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"'limit-time' requires exactly two ingredient, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L593" class="LineNr">593 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L594" class="LineNr">594 </span> <span class="Delimiter">}</span> <span id="L595" class="LineNr">595 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_mu_number<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> -<span id="L596" class="LineNr">596 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"first ingredient of 'limit-time' should be a routine id generated by 'start-running', but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L597" class="LineNr">597 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L596" class="LineNr">596 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"first ingredient of 'limit-time' should be a routine id generated by 'start-running', but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L597" class="LineNr">597 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L598" class="LineNr">598 </span> <span class="Delimiter">}</span> <span id="L599" class="LineNr">599 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_mu_number<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> -<span id="L600" class="LineNr">600 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"second ingredient of 'limit-time' should be a number (of instructions to run for), but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L601" class="LineNr">601 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L600" class="LineNr">600 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"second ingredient of 'limit-time' should be a number (of instructions to run for), but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L601" class="LineNr">601 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L602" class="LineNr">602 </span> <span class="Delimiter">}</span> <span id="L603" class="LineNr">603 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L604" class="LineNr">604 </span><span class="Delimiter">}</span> @@ -669,10 +670,10 @@ if ('onhashchange' in window) { <span id="L606" class="LineNr">606 </span><span class="Normal">case</span> LIMIT_TIME: <span class="Delimiter">{</span> <span id="L607" class="LineNr">607 </span> <span class="Normal">int</span> id = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> <span id="L608" class="LineNr">608 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>Routines<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L609" class="LineNr">609 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>id == id<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L610" class="LineNr">610 </span> Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>limit = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> -<span id="L611" class="LineNr">611 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L612" class="LineNr">612 </span> <span class="Delimiter">}</span> +<span id="L609" class="LineNr">609 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>id == id<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L610" class="LineNr">610 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>limit = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> +<span id="L611" class="LineNr">611 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L612" class="LineNr">612 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L613" class="LineNr">613 </span> <span class="Delimiter">}</span> <span id="L614" class="LineNr">614 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L615" class="LineNr">615 </span><span class="Delimiter">}</span> @@ -690,12 +691,12 @@ if ('onhashchange' in window) { <span id="L627" class="LineNr">627 </span><span class="Delimiter">:(before "End Primitive Recipe Checks")</span> <span id="L628" class="LineNr">628 </span><span class="Normal">case</span> NUMBER_OF_INSTRUCTIONS: <span class="Delimiter">{</span> <span id="L629" class="LineNr">629 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">)</span> != <span class="Constant">1</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L630" class="LineNr">630 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"'number-of-instructions' requires exactly one ingredient, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L631" class="LineNr">631 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L630" class="LineNr">630 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"'number-of-instructions' requires exactly one ingredient, but got '"</span> << inst<span class="Delimiter">.</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L631" class="LineNr">631 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L632" class="LineNr">632 </span> <span class="Delimiter">}</span> <span id="L633" class="LineNr">633 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_mu_number<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)))</span> <span class="Delimiter">{</span> -<span id="L634" class="LineNr">634 </span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"first ingredient of 'number-of-instructions' should be a routine id generated by 'start-running', but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> -<span id="L635" class="LineNr">635 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L634" class="LineNr">634 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L168'>raise</a> << <a href='013update_operation.cc.html#L25'>maybe</a><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">"first ingredient of 'number-of-instructions' should be a routine id generated by 'start-running', but got '"</span> << inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>original_string << <span class="Constant">"'</span><span class="cSpecial">\n</span><span class="Constant">"</span> << <a href='003trace.cc.html#L185'>end</a><span class="Delimiter">();</span> +<span id="L635" class="LineNr">635 </span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L636" class="LineNr">636 </span> <span class="Delimiter">}</span> <span id="L637" class="LineNr">637 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> <span id="L638" class="LineNr">638 </span><span class="Delimiter">}</span> @@ -704,10 +705,10 @@ if ('onhashchange' in window) { <span id="L641" class="LineNr">641 </span> <span class="Normal">int</span> id = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> <span id="L642" class="LineNr">642 </span> <span class="Normal">int</span> result = -<span class="Constant">1</span><span class="Delimiter">;</span> <span id="L643" class="LineNr">643 </span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> i = <span class="Constant">0</span><span class="Delimiter">;</span> i < <a href='001help.cc.html#L138'>SIZE</a><span class="Delimiter">(</span>Routines<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L644" class="LineNr">644 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>id == id<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L645" class="LineNr">645 </span> result = Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>instructions_run<span class="Delimiter">;</span> -<span id="L646" class="LineNr">646 </span> <span class="Identifier">break</span><span class="Delimiter">;</span> -<span id="L647" class="LineNr">647 </span> <span class="Delimiter">}</span> +<span id="L644" class="LineNr">644 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>id == id<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L645" class="LineNr">645 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> result = Routines<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)-></span>instructions_run<span class="Delimiter">;</span> +<span id="L646" class="LineNr">646 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">break</span><span class="Delimiter">;</span> +<span id="L647" class="LineNr">647 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L648" class="LineNr">648 </span> <span class="Delimiter">}</span> <span id="L649" class="LineNr">649 </span> products<span class="Delimiter">.</span>resize<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> <span id="L650" class="LineNr">650 </span> products<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>result<span class="Delimiter">);</span> @@ -718,7 +719,7 @@ if ('onhashchange' in window) { <span id="L655" class="LineNr">655 </span><span class="muRecipe">def</span> f1 [ <span id="L656" class="LineNr">656 </span> <span class="Constant">10</span>:num/child-id<span class="Special"> <- </span>start-running f2 <span id="L657" class="LineNr">657 </span> <span class="Delimiter">{</span> -<span id="L658" class="LineNr">658 </span> loop-unless <span class="Constant">20</span>:num +<span id="L658" class="LineNr">658 </span> <span class="Conceal">¦</span> loop-unless <span class="Constant">20</span>:num <span id="L659" class="LineNr">659 </span> <span class="Delimiter">}</span> <span id="L660" class="LineNr">660 </span> <span class="Constant">11</span>:num<span class="Special"> <- </span>number-of-instructions <span class="Constant">10</span>:num <span id="L661" class="LineNr">661 </span>] @@ -736,7 +737,7 @@ if ('onhashchange' in window) { <span id="L673" class="LineNr">673 </span><span class="muRecipe">def</span> f1 [ <span id="L674" class="LineNr">674 </span> <span class="Constant">10</span>:num/child-id<span class="Special"> <- </span>start-running f2 <span id="L675" class="LineNr">675 </span> <span class="Delimiter">{</span> -<span id="L676" class="LineNr">676 </span> loop-unless <span class="Constant">20</span>:num +<span id="L676" class="LineNr">676 </span> <span class="Conceal">¦</span> loop-unless <span class="Constant">20</span>:num <span id="L677" class="LineNr">677 </span> <span class="Delimiter">}</span> <span id="L678" class="LineNr">678 </span> <span class="Constant">11</span>:num<span class="Special"> <- </span>number-of-instructions <span class="Constant">10</span>:num <span id="L679" class="LineNr">679 </span>] @@ -759,7 +760,7 @@ if ('onhashchange' in window) { <span id="L696" class="LineNr">696 </span> <span class="Constant">1</span>:&:num/<span class="Special">raw <- </span><span class="Normal">new</span> <span class="Constant">number:type</span> <span id="L697" class="LineNr">697 </span> <span class="Comment"># wait for f2 to complete</span> <span id="L698" class="LineNr">698 </span> <span class="Delimiter">{</span> -<span id="L699" class="LineNr">699 </span> loop-unless <span class="Constant">4</span>:num/<span class="Special">raw</span> +<span id="L699" class="LineNr">699 </span> <span class="Conceal">¦</span> loop-unless <span class="Constant">4</span>:num/<span class="Special">raw</span> <span id="L700" class="LineNr">700 </span> <span class="Delimiter">}</span> <span id="L701" class="LineNr">701 </span>] <span id="L702" class="LineNr">702 </span><span class="muRecipe">def</span> f2 [ |