about summary refs log tree commit diff stats
path: root/CHANGELOG
Commit message (Expand)AuthorAgeFilesLines
* Add gruvbox to CHANGELOGMichael Vetter2020-01-281-1/+2
* Fix two typos in CHANGELOGMichael Vetter2020-01-281-2/+2
* Add Changes header to CHANGELOGMichael Vetter2020-01-281-0/+2
* Add changelog draft for 0.8.0Michael Vetter2020-01-281-0/+99
* Fix typoMartin2019-09-241-1/+1
* Add 0.7.1 changelogMichael Vetter2019-09-241-0/+7
* Add 0.7.0 release date to ChangelogMichael Vetter2019-07-311-1/+1
* Add 1154 to CHANGELOGMichael Vetter2019-07-221-1/+2
* Add 0.7.0 changelog entryMichael Vetter2019-06-241-0/+40
* Add release dates to changelogMichael Vetter2019-06-051-5/+5
* Update profanity repo URLMichael Vetter2019-05-031-2/+2
* Mention prof_win_close feature in CHANGELOGMichael Vetter2019-01-101-0/+1
* Add option to trust server's certificateDmitry Podgorny2018-11-061-0/+1
* Update CHANGELOGMichael Vetter2018-10-041-0/+9
* Merge pull request #975 from strugee/patch-2Michael Vetter2018-07-281-0/+1
|\
| * Note CVE-2017-5592 in the CHANGELOGAJ Jordan2017-12-191-0/+1
* | Fix typoAJ Jordan2017-12-191-1/+1
|/
* Update CHANGELOGJames Booth2017-07-131-0/+1
* Update CHANGELOGJames Booth2017-06-131-0/+6
* Update CHANGELOGJames Booth2017-01-281-0/+2
* Update CHANGELOGJames Booth2017-01-281-0/+1
* Update CHANGELOGJames Booth2017-01-191-0/+1
* Update CHANGELOGJames Booth2016-11-061-0/+1
* Update CHANGELOGJames Booth2016-11-061-0/+1
* Update CHANGELOGJames Booth2016-10-181-0/+7
* Update CHANGELOGJames Booth2016-09-261-1/+1
* Update CHANGELOGJames Booth2016-09-251-1/+1
* Update CHANGELOGJames Booth2016-09-191-0/+5
* Update CHANGELOGJames Booth2016-08-211-0/+1
* Update CHANGELOGJames Booth2016-08-211-0/+3
* Added tray cmd info to CHANGELOGDominik Heidler2016-05-041-1/+1
* Update CHANGELOGJames Booth2016-05-011-0/+1
* Fixed typoJames Booth2016-04-271-1/+1
* Updated CHANGELOGJames Booth2016-04-271-0/+1
* Updated CHANGELOGJames Booth2016-04-111-2/+2
* Updated CHANGELOGJames Booth2016-03-161-1/+1
* Updated CHANGELOGJames Booth2016-01-081-0/+1
* Updated CHANGELOGJames Booth2016-01-081-3/+3
* Updated CHANGELOGJames Booth2016-01-081-13/+13
* Updated CHANGELOGJames Booth2016-01-081-0/+7
* Updated CHANGELOGJames Booth2015-12-021-1/+3
* Updated version in CHANGELOG and commentsJames Booth2015-12-021-1/+1
* update CHANGELOGWill Song2015-11-231-0/+1
* Updated CHANGELOGJames Booth2015-11-091-0/+2
* Updated CHANGELOGJames Booth2015-10-141-0/+1
* Updated CHANGELOGJames Booth2015-09-301-0/+1
* Updated CHANGELOGJames Booth2015-09-281-0/+1
* Updated CHANGELOGJames Booth2015-09-281-0/+1
* Updated CHANGELOGJames Booth2015-09-241-0/+6
* Updated CHANGELOGJames Booth2015-09-151-0/+1
">:(scenario passing_literals_to_recipes)</span> def main [ <span class="Constant">1</span>:number/<span class="Special">raw &lt;- </span>foo [abc] ] def foo x:address:array:character <span class="Delimiter">-&gt;</span> n:number [ local-scope load-ingredients n<span class="Special"> &lt;- </span>length *x ] <span class="traceContains">+mem: storing 3 in location 1</span> <span class="Delimiter">:(before &quot;End Instruction Inserting/Deleting Transforms&quot;)</span> initialize_transform_rewrite_literal_string_to_text<span class="Delimiter">();</span> Transform<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>rewrite_literal_string_to_text<span class="Delimiter">);</span> <span class="Delimiter">:(before &quot;End Globals&quot;)</span> set&lt;string&gt; recipes_taking_literal_strings<span class="Delimiter">;</span> <span class="Delimiter">:(code)</span> <span class="Normal">void</span> initialize_transform_rewrite_literal_string_to_text<span class="Delimiter">()</span> <span class="Delimiter">{</span> recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">&quot;$print&quot;</span><span class="Delimiter">);</span> recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">&quot;$dump-trace&quot;</span><span class="Delimiter">);</span> recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">&quot;$system&quot;</span><span class="Delimiter">);</span> recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">&quot;trace&quot;</span><span class="Delimiter">);</span> recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">&quot;stash&quot;</span><span class="Delimiter">);</span> recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">&quot;assert&quot;</span><span class="Delimiter">);</span> recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">&quot;new&quot;</span><span class="Delimiter">);</span> recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">&quot;run&quot;</span><span class="Delimiter">);</span> recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">&quot;assume-console&quot;</span><span class="Delimiter">);</span> recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">&quot;memory-should-contain&quot;</span><span class="Delimiter">);</span> recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">&quot;trace-should-contain&quot;</span><span class="Delimiter">);</span> recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">&quot;trace-should-not-contain&quot;</span><span class="Delimiter">);</span> recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">&quot;check-trace-count-for-label&quot;</span><span class="Delimiter">);</span> recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">&quot;screen-should-contain&quot;</span><span class="Delimiter">);</span> recipes_taking_literal_strings<span class="Delimiter">.</span>insert<span class="Delimiter">(</span><span class="Constant">&quot;screen-should-contain-in-color&quot;</span><span class="Delimiter">);</span> <span class="Delimiter">}</span> <span class="Normal">void</span> rewrite_literal_string_to_text<span class="Delimiter">(</span>recipe_ordinal r<span class="Delimiter">)</span> <span class="Delimiter">{</span> recipe&amp; caller = get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">);</span> trace<span class="Delimiter">(</span><span class="Constant">9991</span><span class="Delimiter">,</span> <span class="Constant">&quot;transform&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;--- rewrite literal strings in recipe &quot;</span> &lt;&lt; caller<span class="Delimiter">.</span>name &lt;&lt; end<span class="Delimiter">();</span> <span class="Normal">if</span> <span class="Delimiter">(</span>contains_numeric_locations<span class="Delimiter">(</span>caller<span class="Delimiter">))</span> <span class="Identifier">return</span><span class="Delimiter">;</span> vector&lt;instruction&gt; new_instructions<span class="Delimiter">;</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 &lt; SIZE<span class="Delimiter">(</span>caller<span class="Delimiter">.</span>steps<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> instruction&amp; inst = caller<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">);</span> <span class="Normal">if</span> <span class="Delimiter">(</span>recipes_taking_literal_strings<span class="Delimiter">.</span>find<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>name<span class="Delimiter">)</span> == recipes_taking_literal_strings<span class="Delimiter">.</span>end<span class="Delimiter">())</span> <span class="Delimiter">{</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> j = <span class="Constant">0</span><span class="Delimiter">;</span> j &lt; SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">);</span> ++j<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_literal_string<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">)))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> instruction def<span class="Delimiter">;</span> ostringstream ingredient_name<span class="Delimiter">;</span> ingredient_name &lt;&lt; inst<span class="Delimiter">.</span>name &lt;&lt; <span class="Constant">'_'</span> &lt;&lt; i &lt;&lt; <span class="Constant">'_'</span> &lt;&lt; j &lt;&lt; <span class="Constant">&quot;:address:array:character&quot;</span><span class="Delimiter">;</span> def<span class="Delimiter">.</span>name = <span class="Constant">&quot;new&quot;</span><span class="Delimiter">;</span> def<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">));</span> def<span class="Delimiter">.</span>products<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>reagent<span class="Delimiter">(</span>ingredient_name<span class="Delimiter">.</span>str<span class="Delimiter">()));</span> new_instructions<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>def<span class="Delimiter">);</span> inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">).</span>clear<span class="Delimiter">();</span> <span class="Comment">// reclaim old memory</span> inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">)</span> = reagent<span class="Delimiter">(</span>ingredient_name<span class="Delimiter">.</span>str<span class="Delimiter">());</span> <span class="Delimiter">}</span> <span class="Delimiter">}</span> new_instructions<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>inst<span class="Delimiter">);</span> <span class="Delimiter">}</span> caller<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>swap<span class="Delimiter">(</span>new_instructions<span class="Delimiter">);</span> <span class="Delimiter">}</span> <span class="Normal">bool</span> contains_numeric_locations<span class="Delimiter">(</span><span class="Normal">const</span> recipe&amp; caller<span class="Delimiter">)</span> <span class="Delimiter">{</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 &lt; SIZE<span class="Delimiter">(</span>caller<span class="Delimiter">.</span>steps<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="Normal">const</span> instruction&amp; inst = caller<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">);</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> in = <span class="Constant">0</span><span class="Delimiter">;</span> in &lt; SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">);</span> ++in<span class="Delimiter">)</span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_numeric_location<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>in<span class="Delimiter">)))</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> <span class="Normal">for</span> <span class="Delimiter">(</span><span class="Normal">int</span> out = <span class="Constant">0</span><span class="Delimiter">;</span> out &lt; SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">);</span> ++out<span class="Delimiter">)</span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_numeric_location<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>out<span class="Delimiter">)))</span> <span class="Identifier">return</span> <span class="Constant">true</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> <span class="Identifier">return</span> <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> </pre> </body> </html> <!-- vim: set foldmethod=manual : -->