diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-07-12 00:11:56 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-07-12 00:11:56 -0700 |
commit | d5d908dda655c791329563522faad42d7e4ee618 (patch) | |
tree | 628b8a23e13878c45ef39dfbffb860c676da5304 /html/030container.cc.html | |
parent | 9864bdd0792b697d7b03e692ba7f82cf5669c41c (diff) | |
download | mu-d5d908dda655c791329563522faad42d7e4ee618.tar.gz |
1766
Diffstat (limited to 'html/030container.cc.html')
-rw-r--r-- | html/030container.cc.html | 76 |
1 files changed, 40 insertions, 36 deletions
diff --git a/html/030container.cc.html b/html/030container.cc.html index 0cbe190a..fb0e1cdc 100644 --- a/html/030container.cc.html +++ b/html/030container.cc.html @@ -38,11 +38,11 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } <span class="Delimiter">:(before "End Mu Types Initialization")</span> <span class="Comment">//: We'll use this container as a running example, with two number elements.</span> -type_number point = Type_number[<span class="Constant">"point"</span>] = Next_type_number++<span class="Delimiter">;</span> +type_ordinal point = Type_ordinal[<span class="Constant">"point"</span>] = Next_type_ordinal++<span class="Delimiter">;</span> Type[point]<span class="Delimiter">.</span>size = <span class="Constant">2</span><span class="Delimiter">;</span> Type[point]<span class="Delimiter">.</span>kind = container<span class="Delimiter">;</span> Type[point]<span class="Delimiter">.</span>name = <span class="Constant">"point"</span><span class="Delimiter">;</span> -vector<type_number> i<span class="Delimiter">;</span> +vector<type_ordinal> i<span class="Delimiter">;</span> i<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>number<span class="Delimiter">);</span> Type[point]<span class="Delimiter">.</span>elements<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>i<span class="Delimiter">);</span> Type[point]<span class="Delimiter">.</span>elements<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>i<span class="Delimiter">);</span> @@ -65,14 +65,14 @@ recipe main [ <span class="Delimiter">:(before "End Mu Types Initialization")</span> <span class="Comment">// A more complex container, containing another container as one of its</span> <span class="Comment">// elements.</span> -type_number point_number = Type_number[<span class="Constant">"point-number"</span>] = Next_type_number++<span class="Delimiter">;</span> +type_ordinal point_number = Type_ordinal[<span class="Constant">"point-number"</span>] = Next_type_ordinal++<span class="Delimiter">;</span> Type[point_number]<span class="Delimiter">.</span>size = <span class="Constant">2</span><span class="Delimiter">;</span> Type[point_number]<span class="Delimiter">.</span>kind = container<span class="Delimiter">;</span> Type[point_number]<span class="Delimiter">.</span>name = <span class="Constant">"point-number"</span><span class="Delimiter">;</span> -vector<type_number> p2<span class="Delimiter">;</span> +vector<type_ordinal> p2<span class="Delimiter">;</span> p2<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>point<span class="Delimiter">);</span> Type[point_number]<span class="Delimiter">.</span>elements<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>p2<span class="Delimiter">);</span> -vector<type_number> i2<span class="Delimiter">;</span> +vector<type_ordinal> i2<span class="Delimiter">;</span> i2<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>number<span class="Delimiter">);</span> Type[point_number]<span class="Delimiter">.</span>elements<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>i2<span class="Delimiter">);</span> @@ -137,17 +137,19 @@ recipe main [ <span class="Delimiter">:(before "End Primitive Recipe Declarations")</span> GET<span class="Delimiter">,</span> <span class="Delimiter">:(before "End Primitive Recipe Numbers")</span> -Recipe_number[<span class="Constant">"get"</span>] = GET<span class="Delimiter">;</span> +Recipe_ordinal[<span class="Constant">"get"</span>] = GET<span class="Delimiter">;</span> <span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> case GET: <span class="Delimiter">{</span> reagent base = current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> long long int base_address = base<span class="Delimiter">.</span>value<span class="Delimiter">;</span> - type_number base_type = base<span class="Delimiter">.</span>types<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> + type_ordinal base_type = base<span class="Delimiter">.</span>types<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> if <span class="Delimiter">(</span>Type[base_type]<span class="Delimiter">.</span>kind != container<span class="Delimiter">)</span> raise << <span class="Constant">"'get' on a non-container in "</span> << current_recipe_name <span class="Delimiter">()</span> << <span class="Constant">": "</span> << current_instruction<span class="Delimiter">().</span>to_string<span class="Delimiter">()</span> << <span class="cSpecial">'\n'</span> << die<span class="Delimiter">();</span> assert<span class="Delimiter">(</span>is_literal<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">)));</span> assert<span class="Delimiter">(</span>scalar<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">)));</span> long long int offset = 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> + assert<span class="Delimiter">(</span>offset >= <span class="Constant">0</span><span class="Delimiter">);</span> + assert<span class="Delimiter">(</span>offset < size_of<span class="Delimiter">(</span>base<span class="Delimiter">));</span> long long int src = base_address<span class="Delimiter">;</span> for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i < offset<span class="Delimiter">;</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> src += size_of<span class="Delimiter">(</span>Type[base_type]<span class="Delimiter">.</span>elements<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> @@ -155,7 +157,7 @@ case GET: <span class="Delimiter">{</span> trace<span class="Delimiter">(</span>Primitive_recipe_depth<span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"address to copy is "</span> << src<span class="Delimiter">;</span> assert<span class="Delimiter">(</span>Type[base_type]<span class="Delimiter">.</span>kind == container<span class="Delimiter">);</span> assert<span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>Type[base_type]<span class="Delimiter">.</span>elements<span class="Delimiter">)</span> > offset<span class="Delimiter">);</span> - type_number src_type = Type[base_type]<span class="Delimiter">.</span>elements<span class="Delimiter">.</span>at<span class="Delimiter">(</span>offset<span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> + type_ordinal src_type = Type[base_type]<span class="Delimiter">.</span>elements<span class="Delimiter">.</span>at<span class="Delimiter">(</span>offset<span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> trace<span class="Delimiter">(</span>Primitive_recipe_depth<span class="Delimiter">,</span> <span class="Constant">"run"</span><span class="Delimiter">)</span> << <span class="Constant">"its type is "</span> << Type[src_type]<span class="Delimiter">.</span>name<span class="Delimiter">;</span> reagent tmp<span class="Delimiter">;</span> tmp<span class="Delimiter">.</span>set_value<span class="Delimiter">(</span>src<span class="Delimiter">);</span> @@ -186,17 +188,19 @@ recipe main [ <span class="Delimiter">:(before "End Primitive Recipe Declarations")</span> GET_ADDRESS<span class="Delimiter">,</span> <span class="Delimiter">:(before "End Primitive Recipe Numbers")</span> -Recipe_number[<span class="Constant">"get-address"</span>] = GET_ADDRESS<span class="Delimiter">;</span> +Recipe_ordinal[<span class="Constant">"get-address"</span>] = GET_ADDRESS<span class="Delimiter">;</span> <span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> case GET_ADDRESS: <span class="Delimiter">{</span> reagent base = current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> long long int base_address = base<span class="Delimiter">.</span>value<span class="Delimiter">;</span> - type_number base_type = base<span class="Delimiter">.</span>types<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> + type_ordinal base_type = base<span class="Delimiter">.</span>types<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> if <span class="Delimiter">(</span>Type[base_type]<span class="Delimiter">.</span>kind != container<span class="Delimiter">)</span> raise << <span class="Constant">"'get' on a non-container in "</span> << current_recipe_name <span class="Delimiter">()</span> << <span class="Constant">": "</span> << current_instruction<span class="Delimiter">().</span>to_string<span class="Delimiter">()</span> << <span class="cSpecial">'\n'</span> << die<span class="Delimiter">();</span> assert<span class="Delimiter">(</span>is_literal<span class="Delimiter">(</span>current_instruction<span class="Delimiter">().</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">)));</span> assert<span class="Delimiter">(</span>scalar<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">)));</span> long long int offset = 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> + assert<span class="Delimiter">(</span>offset >= <span class="Constant">0</span><span class="Delimiter">);</span> + assert<span class="Delimiter">(</span>offset < size_of<span class="Delimiter">(</span>base<span class="Delimiter">));</span> long long int result = base_address<span class="Delimiter">;</span> for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i < offset<span class="Delimiter">;</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> result += size_of<span class="Delimiter">(</span>Type[base_type]<span class="Delimiter">.</span>elements<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> @@ -251,16 +255,16 @@ void insert_container<span class="Delimiter">(</span>const string& command<s string name = next_word<span class="Delimiter">(</span>in<span class="Delimiter">);</span> trace<span class="Delimiter">(</span><span class="Constant">"parse"</span><span class="Delimiter">)</span> << <span class="Constant">"reading "</span> << command << <span class="Constant">' '</span> << name<span class="Delimiter">;</span> <span class="CommentedCode">//? cout << name << '\n'; //? 2</span> -<span class="CommentedCode">//? if (Type_number.find(name) != Type_number.end()) //? 1</span> -<span class="CommentedCode">//? cerr << Type_number[name] << '\n'; //? 1</span> - if <span class="Delimiter">(</span>Type_number<span class="Delimiter">.</span>find<span class="Delimiter">(</span>name<span class="Delimiter">)</span> == Type_number<span class="Delimiter">.</span>end<span class="Delimiter">()</span> - || Type_number[name] == <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> - Type_number[name] = Next_type_number++<span class="Delimiter">;</span> +<span class="CommentedCode">//? if (Type_ordinal.find(name) != Type_ordinal.end()) //? 1</span> +<span class="CommentedCode">//? cerr << Type_ordinal[name] << '\n'; //? 1</span> + if <span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">.</span>find<span class="Delimiter">(</span>name<span class="Delimiter">)</span> == Type_ordinal<span class="Delimiter">.</span>end<span class="Delimiter">()</span> + || Type_ordinal[name] == <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> + Type_ordinal[name] = Next_type_ordinal++<span class="Delimiter">;</span> <span class="Delimiter">}</span> - trace<span class="Delimiter">(</span><span class="Constant">"parse"</span><span class="Delimiter">)</span> << <span class="Constant">"type number: "</span> << Type_number[name]<span class="Delimiter">;</span> + trace<span class="Delimiter">(</span><span class="Constant">"parse"</span><span class="Delimiter">)</span> << <span class="Constant">"type number: "</span> << Type_ordinal[name]<span class="Delimiter">;</span> skip_bracket<span class="Delimiter">(</span>in<span class="Delimiter">,</span> <span class="Constant">"'container' must begin with '['"</span><span class="Delimiter">);</span> - type_info& t = Type[Type_number[name]]<span class="Delimiter">;</span> - recently_added_types<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>Type_number[name]<span class="Delimiter">);</span> + type_info& t = Type[Type_ordinal[name]]<span class="Delimiter">;</span> + recently_added_types<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>Type_ordinal[name]<span class="Delimiter">);</span> t<span class="Delimiter">.</span>name = name<span class="Delimiter">;</span> t<span class="Delimiter">.</span>kind = kind<span class="Delimiter">;</span> while <span class="Delimiter">(</span>!in<span class="Delimiter">.</span>eof<span class="Delimiter">())</span> <span class="Delimiter">{</span> @@ -270,14 +274,14 @@ void insert_container<span class="Delimiter">(</span>const string& command<s istringstream inner<span class="Delimiter">(</span>element<span class="Delimiter">);</span> t<span class="Delimiter">.</span>element_names<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>slurp_until<span class="Delimiter">(</span>inner<span class="Delimiter">,</span> <span class="Constant">':'</span><span class="Delimiter">));</span> trace<span class="Delimiter">(</span><span class="Constant">"parse"</span><span class="Delimiter">)</span> << <span class="Constant">" element name: "</span> << t<span class="Delimiter">.</span>element_names<span class="Delimiter">.</span>back<span class="Delimiter">();</span> - vector<type_number> types<span class="Delimiter">;</span> + vector<type_ordinal> types<span class="Delimiter">;</span> while <span class="Delimiter">(</span>!inner<span class="Delimiter">.</span>eof<span class="Delimiter">())</span> <span class="Delimiter">{</span> string type_name = slurp_until<span class="Delimiter">(</span>inner<span class="Delimiter">,</span> <span class="Constant">':'</span><span class="Delimiter">);</span> - if <span class="Delimiter">(</span>Type_number<span class="Delimiter">.</span>find<span class="Delimiter">(</span>type_name<span class="Delimiter">)</span> == Type_number<span class="Delimiter">.</span>end<span class="Delimiter">())</span> <span class="Delimiter">{</span> -<span class="CommentedCode">//? cerr << type_name << " is " << Next_type_number << '\n'; //? 1</span> - Type_number[type_name] = Next_type_number++<span class="Delimiter">;</span> + if <span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">.</span>find<span class="Delimiter">(</span>type_name<span class="Delimiter">)</span> == Type_ordinal<span class="Delimiter">.</span>end<span class="Delimiter">())</span> <span class="Delimiter">{</span> +<span class="CommentedCode">//? cerr << type_name << " is " << Next_type_ordinal << '\n'; //? 1</span> + Type_ordinal[type_name] = Next_type_ordinal++<span class="Delimiter">;</span> <span class="Delimiter">}</span> - types<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>Type_number[type_name]<span class="Delimiter">);</span> + types<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>Type_ordinal[type_name]<span class="Delimiter">);</span> trace<span class="Delimiter">(</span><span class="Constant">"parse"</span><span class="Delimiter">)</span> << <span class="Constant">" type: "</span> << types<span class="Delimiter">.</span>back<span class="Delimiter">();</span> <span class="Delimiter">}</span> t<span class="Delimiter">.</span>elements<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>types<span class="Delimiter">);</span> @@ -288,38 +292,38 @@ void insert_container<span class="Delimiter">(</span>const string& command<s <span class="Comment">//: ensure types created in one scenario don't leak outside it.</span> <span class="Delimiter">:(before "End Globals")</span> -vector<type_number> recently_added_types<span class="Delimiter">;</span> +vector<type_ordinal> recently_added_types<span class="Delimiter">;</span> <span class="Delimiter">:(before "End load_permanently")</span> <span class="Comment">//: for non-tests</span> recently_added_types<span class="Delimiter">.</span>clear<span class="Delimiter">();</span> <span class="Delimiter">:(before "End Setup")</span> <span class="Comment">//: for tests</span> for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i < SIZE<span class="Delimiter">(</span>recently_added_types<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="CommentedCode">//? cout << "erasing " << Type[recently_added_types.at(i)].name << '\n'; //? 1</span> - Type_number<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>Type[recently_added_types<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)</span>]<span class="Delimiter">.</span>name<span class="Delimiter">);</span> + Type_ordinal<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>Type[recently_added_types<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)</span>]<span class="Delimiter">.</span>name<span class="Delimiter">);</span> Type<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>recently_added_types<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> <span class="Delimiter">}</span> recently_added_types<span class="Delimiter">.</span>clear<span class="Delimiter">();</span> <span class="Comment">// delete recent type references</span> -<span class="Comment">// can't rely on recently_added_types to cleanup Type_number, because of deliberately misbehaving tests with references to undefined types</span> -map<string<span class="Delimiter">,</span> type_number>::iterator p = Type_number<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> -while<span class="Delimiter">(</span>p != Type_number<span class="Delimiter">.</span>end<span class="Delimiter">())</span> <span class="Delimiter">{</span> +<span class="Comment">// can't rely on recently_added_types to cleanup Type_ordinal, because of deliberately misbehaving tests with references to undefined types</span> +map<string<span class="Delimiter">,</span> type_ordinal>::iterator p = Type_ordinal<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> +while<span class="Delimiter">(</span>p != Type_ordinal<span class="Delimiter">.</span>end<span class="Delimiter">())</span> <span class="Delimiter">{</span> <span class="Comment">// save current item</span> string name = p<span class="Delimiter">-></span>first<span class="Delimiter">;</span> - type_number t = p<span class="Delimiter">-></span>second<span class="Delimiter">;</span> + type_ordinal t = p<span class="Delimiter">-></span>second<span class="Delimiter">;</span> <span class="Comment">// increment iterator</span> ++p<span class="Delimiter">;</span> <span class="Comment">// now delete current item if necessary</span> if <span class="Delimiter">(</span>t >= <span class="Constant">1000</span><span class="Delimiter">)</span> <span class="Delimiter">{</span> <span class="CommentedCode">//? cerr << "AAA " << name << " " << t << '\n'; //? 1</span> - Type_number<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>name<span class="Delimiter">);</span> + Type_ordinal<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>name<span class="Delimiter">);</span> <span class="Delimiter">}</span> <span class="Delimiter">}</span> <span class="Comment">//: lastly, ensure scenarios are consistent by always starting them at the</span> <span class="Comment">//: same type number.</span> -Next_type_number = <span class="Constant">1000</span><span class="Delimiter">;</span> +Next_type_ordinal = <span class="Constant">1000</span><span class="Delimiter">;</span> <span class="Delimiter">:(before "End Test Run Initialization")</span> -assert<span class="Delimiter">(</span>Next_type_number < <span class="Constant">1000</span><span class="Delimiter">);</span> +assert<span class="Delimiter">(</span>Next_type_ordinal < <span class="Constant">1000</span><span class="Delimiter">);</span> <span class="Delimiter">:(before "End Setup")</span> -Next_type_number = <span class="Constant">1000</span><span class="Delimiter">;</span> +Next_type_ordinal = <span class="Constant">1000</span><span class="Delimiter">;</span> <span class="SalientComment">//:: Allow container definitions anywhere in the codebase, but warn if you</span> <span class="SalientComment">//:: can't find a definition.</span> @@ -350,7 +354,7 @@ $warn: <span class="Constant">0</span> Transform<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>check_invalid_types<span class="Delimiter">);</span> <span class="Delimiter">:(code)</span> -void check_invalid_types<span class="Delimiter">(</span>const recipe_number r<span class="Delimiter">)</span> <span class="Delimiter">{</span> +void check_invalid_types<span class="Delimiter">(</span>const recipe_ordinal r<span class="Delimiter">)</span> <span class="Delimiter">{</span> for <span class="Delimiter">(</span>long long int index = <span class="Constant">0</span><span class="Delimiter">;</span> index < SIZE<span class="Delimiter">(</span>Recipe[r]<span class="Delimiter">.</span>steps<span class="Delimiter">);</span> ++index<span class="Delimiter">)</span> <span class="Delimiter">{</span> const instruction& inst = Recipe[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 < SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> @@ -395,7 +399,7 @@ check_container_field_types<span class="Delimiter">();</span> <span class="Delimiter">:(code)</span> void check_container_field_types<span class="Delimiter">()</span> <span class="Delimiter">{</span> - for <span class="Delimiter">(</span>map<type_number<span class="Delimiter">,</span> type_info>::iterator p = Type<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Type<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> + for <span class="Delimiter">(</span>map<type_ordinal<span class="Delimiter">,</span> type_info>::iterator p = Type<span class="Delimiter">.</span>begin<span class="Delimiter">();</span> p != Type<span class="Delimiter">.</span>end<span class="Delimiter">();</span> ++p<span class="Delimiter">)</span> <span class="Delimiter">{</span> const type_info& info = p<span class="Delimiter">-></span>second<span class="Delimiter">;</span> <span class="CommentedCode">//? cerr << "checking " << p->first << '\n'; //? 1</span> for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i < SIZE<span class="Delimiter">(</span>info<span class="Delimiter">.</span>elements<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> @@ -413,7 +417,7 @@ void check_container_field_types<span class="Delimiter">()</span> <span class="D <span class="Delimiter">:(before "End Primitive Recipe Declarations")</span> MERGE<span class="Delimiter">,</span> <span class="Delimiter">:(before "End Primitive Recipe Numbers")</span> -Recipe_number[<span class="Constant">"merge"</span>] = MERGE<span class="Delimiter">;</span> +Recipe_ordinal[<span class="Constant">"merge"</span>] = MERGE<span class="Delimiter">;</span> <span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> case MERGE: <span class="Delimiter">{</span> products<span class="Delimiter">.</span>resize<span class="Delimiter">(</span><span class="Constant">1</span><span class="Delimiter">);</span> |