diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-04-25 22:27:19 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-04-25 22:27:19 -0700 |
commit | 32b8fac2799ac7cec613e84a3eb9c009141b6a3a (patch) | |
tree | 11f56c1a235abf7b626ea8983fff3d2edb1fcf98 /html/010vm.cc.html | |
parent | 224972ee9871fcb06ee285fa5f3d9528c034d414 (diff) | |
download | mu-32b8fac2799ac7cec613e84a3eb9c009141b6a3a.tar.gz |
2866
Diffstat (limited to 'html/010vm.cc.html')
-rw-r--r-- | html/010vm.cc.html | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/html/010vm.cc.html b/html/010vm.cc.html index 5cf2cb71..56370c5d 100644 --- a/html/010vm.cc.html +++ b/html/010vm.cc.html @@ -158,8 +158,8 @@ type_ordinal Next_type_ordinal = <span class="Constant">1</span><span class="Del Next_type_ordinal = <span class="Constant">1</span><span class="Delimiter">;</span> <span class="Comment">// Mu Types Initialization</span> type_ordinal number = put<span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> <span class="Constant">"number"</span><span class="Delimiter">,</span> Next_type_ordinal++<span class="Delimiter">);</span> - put<span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> <span class="Constant">"location"</span><span class="Delimiter">,</span> get<span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> <span class="Constant">"number"</span><span class="Delimiter">));</span> <span class="Comment">// wildcard type: either a pointer or a scalar</span> get_or_insert<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> number<span class="Delimiter">).</span>name = <span class="Constant">"number"</span><span class="Delimiter">;</span> + put<span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> <span class="Constant">"location"</span><span class="Delimiter">,</span> number<span class="Delimiter">);</span> <span class="Comment">// synonym of number to indicate we only care about its size</span> type_ordinal address = put<span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> <span class="Constant">"address"</span><span class="Delimiter">,</span> Next_type_ordinal++<span class="Delimiter">);</span> get_or_insert<span class="Delimiter">(</span>Type<span class="Delimiter">,</span> address<span class="Delimiter">).</span>name = <span class="Constant">"address"</span><span class="Delimiter">;</span> type_ordinal boolean = put<span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> <span class="Constant">"boolean"</span><span class="Delimiter">,</span> Next_type_ordinal++<span class="Delimiter">);</span> @@ -203,10 +203,9 @@ atexit<span class="Delimiter">(</span>teardown_types<span class="Delimiter">);</ <span class="Normal">struct</span> type_info <span class="Delimiter">{</span> string name<span class="Delimiter">;</span> kind_of_type kind<span class="Delimiter">;</span> - <span class="Normal">int</span> size<span class="Delimiter">;</span> <span class="Comment">// only if type is not primitive; primitives and addresses have size 1 (except arrays are dynamic)</span> vector<reagent> elements<span class="Delimiter">;</span> <span class="Comment">// End type_info Fields</span> - type_info<span class="Delimiter">()</span> :kind<span class="Delimiter">(</span>PRIMITIVE<span class="Delimiter">),</span> size<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{}</span> + type_info<span class="Delimiter">()</span> :kind<span class="Delimiter">(</span>PRIMITIVE<span class="Delimiter">)</span> <span class="Delimiter">{}</span> <span class="Delimiter">};</span> <span class="Normal">enum</span> primitive_recipes <span class="Delimiter">{</span> @@ -237,7 +236,7 @@ assert<span class="Delimiter">(</span>MAX_PRIMITIVE_RECIPES < <span class="Co Next_recipe_ordinal = <span class="Constant">200</span><span class="Delimiter">;</span> put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> <span class="Constant">"main"</span><span class="Delimiter">,</span> Next_recipe_ordinal++<span class="Delimiter">);</span> <span class="Comment">// End Load Recipes</span> -<span class="Delimiter">:(before "End Test Run Initialization")</span> +<span class="Delimiter">:(before "End Commandline Parsing")</span> assert<span class="Delimiter">(</span>Next_recipe_ordinal < <span class="Constant">1000</span><span class="Delimiter">);</span> <span class="Comment">// recipes being tested didn't overflow into test space</span> <span class="Delimiter">:(before "End Setup")</span> Next_recipe_ordinal = <span class="Constant">1000</span><span class="Delimiter">;</span> <span class="Comment">// consistent new numbers for each test</span> |