diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-11-05 02:00:26 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-11-05 02:00:26 -0800 |
commit | ffc9e66b3505990009e47b461eb03d3eb1635258 (patch) | |
tree | 6e7ae8df9a0143736500270da2212ee6182a8c85 /html/054static_dispatch.cc.html | |
parent | 53de40aa88c91150f513852e49b314f130663b64 (diff) | |
download | mu-ffc9e66b3505990009e47b461eb03d3eb1635258.tar.gz |
4109
Diffstat (limited to 'html/054static_dispatch.cc.html')
-rw-r--r-- | html/054static_dispatch.cc.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/html/054static_dispatch.cc.html b/html/054static_dispatch.cc.html index 12306ed6..5d3cac06 100644 --- a/html/054static_dispatch.cc.html +++ b/html/054static_dispatch.cc.html @@ -107,7 +107,7 @@ if ('onhashchange' in window) { <span id="L41" class="LineNr"> 41 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='001help.cc.html#L221'>put</a><span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> new_name<span class="Delimiter">,</span> Next_recipe_ordinal++<span class="Delimiter">);</span> <span id="L42" class="LineNr"> 42 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='001help.cc.html#L228'>get_or_insert</a><span class="Delimiter">(</span>Recipe_variants<span class="Delimiter">,</span> result<span class="Delimiter">.</span>name<span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> new_name<span class="Delimiter">));</span> <span id="L43" class="LineNr"> 43 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> -<span id="L44" class="LineNr"> 44 </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">"load"</span><span class="Delimiter">)</span> << <span class="Constant">"switching "</span> << result<span class="Delimiter">.</span>name << <span class="Constant">" to "</span> << new_name << <a href='003trace.cc.html#L197'>end</a><span class="Delimiter">();</span> +<span id="L44" class="LineNr"> 44 </span> <span class="Conceal">¦</span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">"load"</span><span class="Delimiter">)</span> << <span class="Constant">"switching "</span> << result<span class="Delimiter">.</span>name << <span class="Constant">" to "</span> << new_name << <a href='003trace.cc.html#L197'>end</a><span class="Delimiter">();</span> <span id="L45" class="LineNr"> 45 </span> <span class="Conceal">¦</span> result<span class="Delimiter">.</span>name = new_name<span class="Delimiter">;</span> <span id="L46" class="LineNr"> 46 </span> <span class="Conceal">¦</span> result<span class="Delimiter">.</span>is_autogenerated = <span class="Constant">true</span><span class="Delimiter">;</span> <span id="L47" class="LineNr"> 47 </span> <span class="Delimiter">}</span> @@ -408,10 +408,10 @@ if ('onhashchange' in window) { <span id="L342" class="LineNr">342 </span> <span class="Normal">int</span> min_index = <span class="Constant">0</span><span class="Delimiter">;</span> <span id="L343" class="LineNr">343 </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#L141'>SIZE</a><span class="Delimiter">(</span>candidates<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L344" class="LineNr">344 </span> <span class="Conceal">¦</span> <span class="Normal">const</span> recipe& candidate = get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> candidates<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> -<span id="L345" class="LineNr">345 </span> <span class="Conceal">¦</span> <span class="Comment">// prefer functions without extra or missing ingredients or products</span> +<span id="L345" class="LineNr">345 </span> <span class="Conceal">¦</span> <span class="Comment">// prefer variants without extra or missing ingredients or products</span> <span id="L346" class="LineNr">346 </span> <span class="Conceal">¦</span> <span class="Normal">int</span> score = abs<span class="Delimiter">(</span><a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>candidate<span class="Delimiter">.</span>products<span class="Delimiter">)</span>-SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">))</span> <span id="L347" class="LineNr">347 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> + abs<span class="Delimiter">(</span><a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>candidate<span class="Delimiter">.</span>ingredients<span class="Delimiter">)</span>-SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">));</span> -<span id="L348" class="LineNr">348 </span> <span class="Conceal">¦</span> <span class="Comment">// prefer functions with non-address ingredients or products</span> +<span id="L348" class="LineNr">348 </span> <span class="Conceal">¦</span> <span class="Comment">// prefer variants with non-address ingredients or products</span> <span id="L349" class="LineNr">349 </span> <span class="Conceal">¦</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 < <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>candidate<span class="Delimiter">.</span>ingredients<span class="Delimiter">);</span> ++j<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L350" class="LineNr">350 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_mu_address<span class="Delimiter">(</span>candidate<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>j<span class="Delimiter">)))</span> <span id="L351" class="LineNr">351 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> ++score<span class="Delimiter">;</span> @@ -711,7 +711,7 @@ if ('onhashchange' in window) { <span id="L645" class="LineNr">645 </span> <span class="Normal">s</span>:text<span class="Special"> <- </span><span class="Normal">new</span> [abc] <span id="L646" class="LineNr">646 </span> <span class="Constant">1</span>:num/<span class="Special">raw <- </span>foo s <span id="L647" class="LineNr">647 </span>] -<span id="L648" class="LineNr">648 </span><span class="muRecipe">def</span> foo a:<a href='043space.cc.html#L83'>address</a>:array:character<span class="muRecipe"> -> </span>result:number [ +<span id="L648" class="LineNr">648 </span><span class="muRecipe">def</span> foo a:<a href='043space.cc.html#L82'>address</a>:array:character<span class="muRecipe"> -> </span>result:number [ <span id="L649" class="LineNr">649 </span> <span class="Identifier">return</span> <span class="Constant">34</span> <span id="L650" class="LineNr">650 </span>] <span id="L651" class="LineNr">651 </span><span class="Comment"># identical to previous variant once you take type abbreviations into account</span> |