diff options
Diffstat (limited to 'html/030container.cc.html')
-rw-r--r-- | html/030container.cc.html | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/html/030container.cc.html b/html/030container.cc.html index 827e6f74..7d0d4a26 100644 --- a/html/030container.cc.html +++ b/html/030container.cc.html @@ -15,7 +15,6 @@ body { font-family: monospace; color: #eeeeee; background-color: #080808; } * { font-size: 1.05em; } .SalientComment { color: #00ffff; } .traceAbsent { color: #c00000; } -.CommentedCode { color: #6c6c6c; } .cSpecial { color: #008000; } .Comment { color: #9090ff; } .Delimiter { color: #a04060; } @@ -68,7 +67,7 @@ recipe main [ recipe main [ <span class="Constant">2</span>:point<span class="Special"> <- </span>copy <span class="Constant">1</span>:number ] -<span class="traceContains">+warn: main: size mismatch in storing to 2:point at '2:point <- copy 1:number'</span> +<span class="traceContains">+warn: main: size mismatch in storing to 2:point (2 vs 1) at '2:point <- copy 1:number'</span> <span class="Delimiter">:(before "End Mu Types Initialization")</span> <span class="Comment">// A more complex container, containing another container as one of its</span> @@ -141,7 +140,7 @@ recipe main [ <span class="Constant">1</span>:number<span class="Special"> <- </span>copy <span class="Constant">34</span> <span class="Comment"># first</span> <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">35</span> <span class="Constant">3</span>:number<span class="Special"> <- </span>copy <span class="Constant">36</span> - stash [foo: ]<span class="Delimiter">,</span> <span class="Constant">1</span>:point-number/<span class="Special">raw</span> + stash [foo:]<span class="Delimiter">,</span> <span class="Constant">1</span>:point-number/<span class="Special">raw</span> ] <span class="traceContains">+app: foo: 34 35 36</span> @@ -338,9 +337,6 @@ void insert_container<span class="Delimiter">(</span>const string& command<s skip_whitespace<span class="Delimiter">(</span>in<span class="Delimiter">);</span> 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 << end<span class="Delimiter">();</span> -<span class="CommentedCode">//? cout << name << '\n'; //? 2</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> @@ -364,7 +360,6 @@ void insert_container<span class="Delimiter">(</span>const string& command<s 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="Comment">// types can contain integers, like for array sizes</span> && !is_integer<span class="Delimiter">(</span>type_name<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_ordinal[type_name]<span class="Delimiter">);</span> @@ -402,7 +397,6 @@ vector<type_ordinal> recently_added_types<span class="Delimiter">;</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_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> @@ -418,7 +412,6 @@ while<span class="Delimiter">(</span>p != Type_ordinal<span class="Delimiter">.< ++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_ordinal<span class="Delimiter">.</span>erase<span class="Delimiter">(</span>name<span class="Delimiter">);</span> <span class="Delimiter">}</span> <span class="Delimiter">}</span> @@ -435,7 +428,6 @@ Next_type_ordinal = <span class="Constant">1000</span><span class="Delimiter">;< <span class="Delimiter">:(scenario run_warns_on_unknown_types)</span> <span class="Special">% Hide_warnings = true;</span> -<span class="CommentedCode">#? % Trace_stream->dump_layer = "run";</span> recipe main [ <span class="Comment"># integer is not a type</span> <span class="Constant">1</span>:integer<span class="Special"> <- </span>copy <span class="Constant">0</span> @@ -498,14 +490,13 @@ container foo [ <span class="traceContains">+parse: element name: y</span> <span class="traceContains">+parse: type: 1</span> -<span class="Delimiter">:(before "End Load Sanity Checks")</span> +<span class="Delimiter">:(before "End Transform")</span> 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_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> for <span class="Delimiter">(</span>long long int j = <span class="Constant">0</span><span class="Delimiter">;</span> j < SIZE<span class="Delimiter">(</span>info<span class="Delimiter">.</span>elements<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span> ++j<span class="Delimiter">)</span> <span class="Delimiter">{</span> if <span class="Delimiter">(</span>info<span class="Delimiter">.</span>elements<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>at<span class="Delimiter">(</span>j<span class="Delimiter">)</span> == <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Identifier">continue</span><span class="Delimiter">;</span> |