diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-08-20 04:39:07 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-08-20 04:39:07 -0700 |
commit | c5e4a41aa590f355ce4b6b9f0beb6936526d9e1e (patch) | |
tree | bfe178c92a0157b08cab8ae89ec4c3e3a825d319 | |
parent | 1157f78fc94fe3905ac63efdb8e725bb94d54345 (diff) | |
download | mu-c5e4a41aa590f355ce4b6b9f0beb6936526d9e1e.tar.gz |
3974
-rw-r--r-- | 046check_type_by_name.cc (renamed from 047check_type_by_name.cc) | 0 | ||||
-rw-r--r-- | html/046check_type_by_name.cc.html (renamed from html/047check_type_by_name.cc.html) | 18 | ||||
-rw-r--r-- | html/050scenario.cc.html | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/047check_type_by_name.cc b/046check_type_by_name.cc index 83b80571..83b80571 100644 --- a/047check_type_by_name.cc +++ b/046check_type_by_name.cc diff --git a/html/047check_type_by_name.cc.html b/html/046check_type_by_name.cc.html index 8cfd791a..73e689cf 100644 --- a/html/047check_type_by_name.cc.html +++ b/html/046check_type_by_name.cc.html @@ -2,7 +2,7 @@ <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> -<title>Mu - 047check_type_by_name.cc</title> +<title>Mu - 046check_type_by_name.cc</title> <meta name="Generator" content="Vim/7.4"> <meta name="plugin-version" content="vim7.4_v2"> <meta name="syntax" content="cpp"> @@ -79,27 +79,27 @@ if ('onhashchange' in window) { <span id="L15" class="LineNr"> 15 </span><span class="traceContains">+error: <a href='000organization.cc.html#L113'>main</a>: 'x' used with multiple types</span> <span id="L16" class="LineNr"> 16 </span> <span id="L17" class="LineNr"> 17 </span><span class="Delimiter">:(after "Transform.push_back(expand_type_abbreviations)")</span> -<span id="L18" class="LineNr"> 18 </span>Transform<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span><a href='047check_type_by_name.cc.html#L21'>check_or_set_types_by_name</a><span class="Delimiter">);</span> <span class="Comment">// idempotent</span> +<span id="L18" class="LineNr"> 18 </span>Transform<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span><a href='046check_type_by_name.cc.html#L21'>check_or_set_types_by_name</a><span class="Delimiter">);</span> <span class="Comment">// idempotent</span> <span id="L19" class="LineNr"> 19 </span> <span id="L20" class="LineNr"> 20 </span><span class="Delimiter">:(code)</span> -<span id="L21" class="LineNr"> 21 </span><span class="Normal">void</span> <a href='047check_type_by_name.cc.html#L21'>check_or_set_types_by_name</a><span class="Delimiter">(</span><span class="Normal">const</span> <a href='010vm.cc.html#L14'>recipe_ordinal</a> r<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L21" class="LineNr"> 21 </span><span class="Normal">void</span> <a href='046check_type_by_name.cc.html#L21'>check_or_set_types_by_name</a><span class="Delimiter">(</span><span class="Normal">const</span> <a href='010vm.cc.html#L14'>recipe_ordinal</a> r<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L22" class="LineNr"> 22 </span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9991</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << <span class="Constant">"--- deduce types for <a href='010vm.cc.html#L19'>recipe</a> "</span> << get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>name << <a href='003trace.cc.html#L197'>end</a><span class="Delimiter">();</span> <span id="L23" class="LineNr"> 23 </span> recipe& caller = get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">);</span> <span id="L24" class="LineNr"> 24 </span> set<reagent> known<span class="Delimiter">;</span> <span id="L25" class="LineNr"> 25 </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>caller<span class="Delimiter">.</span>steps<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L26" class="LineNr"> 26 </span> <span class="Conceal">¦</span> instruction& inst = caller<span class="Delimiter">.</span>steps<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">);</span> <span id="L27" class="LineNr"> 27 </span> <span class="Conceal">¦</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 < <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">);</span> ++in<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L28" class="LineNr"> 28 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='047check_type_by_name.cc.html#L38'>deduce_missing_type</a><span class="Delimiter">(</span>known<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 id="L29" class="LineNr"> 29 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='047check_type_by_name.cc.html#L49'>check_type</a><span class="Delimiter">(</span>known<span class="Delimiter">,</span> inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>in<span class="Delimiter">),</span> caller<span class="Delimiter">);</span> +<span id="L28" class="LineNr"> 28 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='046check_type_by_name.cc.html#L38'>deduce_missing_type</a><span class="Delimiter">(</span>known<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 id="L29" class="LineNr"> 29 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='046check_type_by_name.cc.html#L49'>check_type</a><span class="Delimiter">(</span>known<span class="Delimiter">,</span> inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>in<span class="Delimiter">),</span> caller<span class="Delimiter">);</span> <span id="L30" class="LineNr"> 30 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L31" class="LineNr"> 31 </span> <span class="Conceal">¦</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 < <a href='001help.cc.html#L141'>SIZE</a><span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">);</span> ++out<span class="Delimiter">)</span> <span class="Delimiter">{</span> -<span id="L32" class="LineNr"> 32 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='047check_type_by_name.cc.html#L38'>deduce_missing_type</a><span class="Delimiter">(</span>known<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 id="L33" class="LineNr"> 33 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='047check_type_by_name.cc.html#L49'>check_type</a><span class="Delimiter">(</span>known<span class="Delimiter">,</span> inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>out<span class="Delimiter">),</span> caller<span class="Delimiter">);</span> +<span id="L32" class="LineNr"> 32 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='046check_type_by_name.cc.html#L38'>deduce_missing_type</a><span class="Delimiter">(</span>known<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 id="L33" class="LineNr"> 33 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='046check_type_by_name.cc.html#L49'>check_type</a><span class="Delimiter">(</span>known<span class="Delimiter">,</span> inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>out<span class="Delimiter">),</span> caller<span class="Delimiter">);</span> <span id="L34" class="LineNr"> 34 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L35" class="LineNr"> 35 </span> <span class="Delimiter">}</span> <span id="L36" class="LineNr"> 36 </span><span class="Delimiter">}</span> <span id="L37" class="LineNr"> 37 </span> -<span id="L38" class="LineNr"> 38 </span><span class="Normal">void</span> <a href='047check_type_by_name.cc.html#L38'>deduce_missing_type</a><span class="Delimiter">(</span>set<reagent>& known<span class="Delimiter">,</span> reagent& x<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L38" class="LineNr"> 38 </span><span class="Normal">void</span> <a href='046check_type_by_name.cc.html#L38'>deduce_missing_type</a><span class="Delimiter">(</span>set<reagent>& known<span class="Delimiter">,</span> reagent& x<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L39" class="LineNr"> 39 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>x<span class="Delimiter">.</span>type<span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L40" class="LineNr"> 40 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='041jump_target.cc.html#L11'>is_jump_target</a><span class="Delimiter">(</span>x<span class="Delimiter">.</span>name<span class="Delimiter">))</span> <span class="Delimiter">{</span> <span id="L41" class="LineNr"> 41 </span> <span class="Conceal">¦</span> x<span class="Delimiter">.</span>type = <span class="Normal">new</span> type_tree<span class="Delimiter">(</span><span class="Constant">"label"</span><span class="Delimiter">);</span> @@ -110,7 +110,7 @@ if ('onhashchange' in window) { <span id="L46" class="LineNr"> 46 </span> <a href='003trace.cc.html#L161'>trace</a><span class="Delimiter">(</span><span class="Constant">9992</span><span class="Delimiter">,</span> <span class="Constant">"transform"</span><span class="Delimiter">)</span> << x<span class="Delimiter">.</span>name << <span class="Constant">" <= "</span> << names_to_string<span class="Delimiter">(</span>x<span class="Delimiter">.</span>type<span class="Delimiter">)</span> << <a href='003trace.cc.html#L197'>end</a><span class="Delimiter">();</span> <span id="L47" class="LineNr"> 47 </span><span class="Delimiter">}</span> <span id="L48" class="LineNr"> 48 </span> -<span id="L49" class="LineNr"> 49 </span><span class="Normal">void</span> <a href='047check_type_by_name.cc.html#L49'>check_type</a><span class="Delimiter">(</span>set<reagent>& known<span class="Delimiter">,</span> <span class="Normal">const</span> reagent& x<span class="Delimiter">,</span> <span class="Normal">const</span> recipe& caller<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L49" class="LineNr"> 49 </span><span class="Normal">void</span> <a href='046check_type_by_name.cc.html#L49'>check_type</a><span class="Delimiter">(</span>set<reagent>& known<span class="Delimiter">,</span> <span class="Normal">const</span> reagent& x<span class="Delimiter">,</span> <span class="Normal">const</span> recipe& caller<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L50" class="LineNr"> 50 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_literal<span class="Delimiter">(</span>x<span class="Delimiter">))</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L51" class="LineNr"> 51 </span> <span class="Normal">if</span> <span class="Delimiter">(</span><a href='002test.cc.html#L85'>is_integer</a><span class="Delimiter">(</span>x<span class="Delimiter">.</span>name<span class="Delimiter">))</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span class="Comment">// if you use raw locations you're probably doing something unsafe</span> <span id="L52" class="LineNr"> 52 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>!x<span class="Delimiter">.</span>type<span class="Delimiter">)</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span class="Comment">// might get filled in by other logic later</span> diff --git a/html/050scenario.cc.html b/html/050scenario.cc.html index 4401c68c..9717d92c 100644 --- a/html/050scenario.cc.html +++ b/html/050scenario.cc.html @@ -476,7 +476,7 @@ if ('onhashchange' in window) { <span id="L409" class="LineNr">409 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">return</span><span class="Delimiter">;</span> <span id="L410" class="LineNr">410 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L411" class="LineNr">411 </span> <span class="Conceal">¦</span> <span class="Normal">if</span> <span class="Delimiter">(</span>!is_integer<span class="Delimiter">(</span>lhs<span class="Delimiter">))</span> <span class="Delimiter">{</span> -<span id="L412" class="LineNr">412 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='047check_type_by_name.cc.html#L49'>check_type</a><span class="Delimiter">(</span>lhs<span class="Delimiter">,</span> in<span class="Delimiter">);</span> +<span id="L412" class="LineNr">412 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <a href='046check_type_by_name.cc.html#L49'>check_type</a><span class="Delimiter">(</span>lhs<span class="Delimiter">,</span> in<span class="Delimiter">);</span> <span id="L413" class="LineNr">413 </span> <span class="Conceal">¦</span> <span class="Conceal">¦</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> <span id="L414" class="LineNr">414 </span> <span class="Conceal">¦</span> <span class="Delimiter">}</span> <span id="L415" class="LineNr">415 </span> <span class="Conceal">¦</span> <span class="Normal">int</span> <a href='043space.cc.html#L76'>address</a> = <a href='002test.cc.html#L91'>to_integer</a><span class="Delimiter">(</span>lhs<span class="Delimiter">);</span> @@ -509,7 +509,7 @@ if ('onhashchange' in window) { <span id="L442" class="LineNr">442 </span> <span class="Delimiter">}</span> <span id="L443" class="LineNr">443 </span><span class="Delimiter">}</span> <span id="L444" class="LineNr">444 </span> -<span id="L445" class="LineNr">445 </span><span class="Normal">void</span> <a href='047check_type_by_name.cc.html#L49'>check_type</a><span class="Delimiter">(</span><span class="Normal">const</span> string& lhs<span class="Delimiter">,</span> istream& in<span class="Delimiter">)</span> <span class="Delimiter">{</span> +<span id="L445" class="LineNr">445 </span><span class="Normal">void</span> <a href='046check_type_by_name.cc.html#L49'>check_type</a><span class="Delimiter">(</span><span class="Normal">const</span> string& lhs<span class="Delimiter">,</span> istream& in<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span id="L446" class="LineNr">446 </span> reagent x<span class="Delimiter">(</span>lhs<span class="Delimiter">);</span> <span id="L447" class="LineNr">447 </span> <span class="Normal">if</span> <span class="Delimiter">(</span>is_mu_array<span class="Delimiter">(</span>x<span class="Delimiter">.</span>type<span class="Delimiter">)</span> && is_mu_character<span class="Delimiter">(</span><a href='032array.cc.html#L381'>array_element</a><span class="Delimiter">(</span>x<span class="Delimiter">.</span>type<span class="Delimiter">)))</span> <span class="Delimiter">{</span> <span id="L448" class="LineNr">448 </span> <span class="Conceal">¦</span> x<span class="Delimiter">.</span><a href='010vm.cc.html#L65'>set_value</a><span class="Delimiter">(</span><a href='002test.cc.html#L91'>to_integer</a><span class="Delimiter">(</span>x<span class="Delimiter">.</span>name<span class="Delimiter">));</span> |