about summary refs log tree commit diff stats
path: root/mu.arc.t
Commit message (Expand)AuthorAgeFilesLines
* 529 - 'sleep' can now wait for a routine to completeKartik K. Agaram2015-01-101-0/+26
* 528Kartik K. Agaram2015-01-101-3/+4
* 525 - 'fork' now returns a routine idKartik K. Agaram2015-01-101-0/+30
* 524Kartik K. Agaram2015-01-101-14/+14
* 522 - another arg for 'fork'Kartik K. Agaram2015-01-101-5/+23
* 519 - ooh, use metadata to disambiguate argsKartik K. Agaram2015-01-101-5/+5
* 515 - support time limits for threadsKartik K. Agaram2015-01-101-0/+124
* 514Kartik K. Agaram2015-01-091-16/+18
* 512 - update html renderingKartik K. Agaram2015-01-091-191/+227
* 511 - make 'sleep' clearerKartik K. Agaram2015-01-081-13/+13
* 510Kartik K. Agaram2015-01-081-2/+2
* 509Kartik K. Agaram2015-01-081-23/+23
* 506 - continue 505Kartik K. Agaram2015-01-061-21/+27
* 505 - simplify tagged-valueKartik K. Agaram2015-01-051-37/+26
* 500Kartik K. Agaram2015-01-021-1/+1
* 497 - strengthen the concept of 'space'Kartik K. Agaram2015-01-021-83/+83
* 475 - support symbol literals, just as a convenienceKartik K. Agaram2014-12-311-0/+8
* 468 - slice test time by 65%Kartik K. Agaram2014-12-301-5/+5
* 467 - 'convert-names' now supports space metadataKartik K. Agaram2014-12-301-0/+32
* 464 - reply broken in channel 'write'Kartik K. Agaram2014-12-301-0/+4
* 463 - mu now has closuresKartik K. Agaram2014-12-301-0/+29
* 461 - create room for an index '0' in scopesKartik K. Agaram2014-12-291-20/+29
* 457 - finally, redirection worksKartik K. Agaram2014-12-281-8/+30
* 456 - routines can now have routine globalsKartik K. Agaram2014-12-281-3/+20
* 453Kartik K. Agaram2014-12-281-29/+29
* 451 - start of support for per-routine globalsKartik K. Agaram2014-12-271-0/+23
* 448Kartik K. Agaram2014-12-261-10/+10
* 447 - function invocations can share localsKartik K. Agaram2014-12-261-0/+27
* 446Kartik K. Agaram2014-12-251-2/+18
* 445Kartik K. Agaram2014-12-251-0/+2
* 444 - bring back dispatch based on operand/result typesKartik K. Agaram2014-12-241-2/+94
* 442 - string 'split'Kartik K. Agaram2014-12-191-0/+86
* 441 - string 'find-next' for charactersKartik K. Agaram2014-12-191-0/+88
* 439Kartik K. Agaram2014-12-171-8/+8
* 438 - unbelievable typoKartik K. Agaram2014-12-171-0/+6
* 436 - types* table can now contain integer-array:3, etc.Kartik K. Agaram2014-12-171-32/+39
* 435 - starting to allow type definitionsKartik K. Agaram2014-12-171-0/+10
* 434Kartik K. Agaram2014-12-171-2/+2
* 433Kartik K. Agaram2014-12-171-8/+8
* 431 - rename 'record' (struct) to 'and-record'Kartik K. Agaram2014-12-171-14/+14
* 430 - cache common functions for testsKartik K. Agaram2014-12-151-0/+2
* 427 - ..and we're back. All mu.arc.t tests passing.Kartik K. Agaram2014-12-141-126/+136
* 424 - layer 20 passingKartik K. Agaram2014-12-141-650/+666
* 422Kartik K. Agaram2014-12-141-6/+7
* 421Kartik K. Agaram2014-12-141-0/+4
* 420 - no unnecessary structure in testsKartik K. Agaram2014-12-141-84/+83
* 419 - layer 11 now passingKartik K. Agaram2014-12-141-30/+46
* 418 - more progress in layer 11Kartik K. Agaram2014-12-141-62/+30
* 417 - partially through layer 11Kartik K. Agaram2014-12-141-191/+197
* 416 - renumber layers, but still passing until layer 10Kartik K. Agaram2014-12-131-8/+8
limiter">{}</span> <span class="Delimiter">:(before &quot;End Types&quot;)</span> typedef void <span class="Delimiter">(</span>*transform_fn<span class="Delimiter">)(</span>recipe_ordinal<span class="Delimiter">);</span> <span class="Delimiter">:(before &quot;End Globals&quot;)</span> vector&lt;transform_fn&gt; Transform<span class="Delimiter">;</span> <span class="Delimiter">:(code)</span> void transform_all<span class="Delimiter">()</span> <span class="Delimiter">{</span> <span class="CommentedCode">//? cerr &lt;&lt; &quot;AAA transform_all\n&quot;; //? 2</span> for <span class="Delimiter">(</span>long long int t = <span class="Constant">0</span><span class="Delimiter">;</span> t &lt; SIZE<span class="Delimiter">(</span>Transform<span class="Delimiter">);</span> ++t<span class="Delimiter">)</span> <span class="Delimiter">{</span> for <span class="Delimiter">(</span>map&lt;recipe_ordinal<span class="Delimiter">,</span> recipe&gt;::iterator p = Recipe<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Recipe<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> recipe&amp; r = p<span class="Delimiter">-&gt;</span>second<span class="Delimiter">;</span> if <span class="Delimiter">(</span>r<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> if <span class="Delimiter">(</span>r<span class="Delimiter">.</span>transformed_until != t-<span class="Constant">1</span><span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span class="Delimiter">(</span>*Transform<span class="Delimiter">.</span>at<span class="Delimiter">(</span>t<span class="Delimiter">))(</span><span class="Comment">/*</span><span class="Comment">recipe_ordinal</span><span class="Comment">*/</span>p<span class="Delimiter">-&gt;</span>first<span class="Delimiter">);</span> r<span class="Delimiter">.</span>transformed_until = t<span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Delimiter">}</span> parse_int_reagents<span class="Delimiter">();</span> <span class="Comment">// do this after all other transforms have run</span> <span class="Delimiter">}</span> void parse_int_reagents<span class="Delimiter">()</span> <span class="Delimiter">{</span> <span class="CommentedCode">//? cout &lt;&lt; &quot;parse_int_reagents\n&quot;; //? 1</span> for <span class="Delimiter">(</span>map&lt;recipe_ordinal<span class="Delimiter">,</span> recipe&gt;::iterator p = Recipe<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Recipe<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> recipe&amp; r = p<span class="Delimiter">-&gt;</span>second<span class="Delimiter">;</span> if <span class="Delimiter">(</span>r<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> for <span class="Delimiter">(</span>long long int index = <span class="Constant">0</span><span class="Delimiter">;</span> index &lt; SIZE<span class="Delimiter">(</span>r<span class="Delimiter">.</span>steps<span class="Delimiter">);</span> ++index<span class="Delimiter">)</span> <span class="Delimiter">{</span> instruction&amp; inst = r<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>at<span class="Delimiter">(</span>index<span class="Delimiter">);</span> for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> populate_value<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> <span class="Delimiter">}</span> for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> populate_value<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> <span class="Delimiter">}</span> <span class="Delimiter">}</span> <span class="Delimiter">}</span> <span class="Delimiter">}</span> void populate_value<span class="Delimiter">(</span>reagent&amp; r<span class="Delimiter">)</span> <span class="Delimiter">{</span> if <span class="Delimiter">(</span>r<span class="Delimiter">.</span>initialized<span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span class="Comment">// End Reagent-parsing Exceptions</span> if <span class="Delimiter">(</span>!is_integer<span class="Delimiter">(</span>r<span class="Delimiter">.</span>name<span class="Delimiter">))</span> <span class="Identifier">return</span><span class="Delimiter">;</span> r<span class="Delimiter">.</span>set_value<span class="Delimiter">(</span>to_integer<span class="Delimiter">(</span>r<span class="Delimiter">.</span>name<span class="Delimiter">));</span> <span class="Delimiter">}</span> </pre> </body> </html> <!-- vim: set foldmethod=manual : -->