From 104e521c04d1a0cad9c68fb11e250e12ad8917ef Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Wed, 17 Oct 2018 07:08:47 -0700 Subject: 4709 --- html/033exclusive_container.cc.html | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'html/033exclusive_container.cc.html') diff --git a/html/033exclusive_container.cc.html b/html/033exclusive_container.cc.html index 7dc49376..8b618e76 100644 --- a/html/033exclusive_container.cc.html +++ b/html/033exclusive_container.cc.html @@ -151,28 +151,28 @@ if ('onhashchange' in window) { 87 case MAYBE_CONVERT: { 88 const recipe& caller = get(Recipe, r); 89 if (SIZE(inst.ingredients) != 2) { - 90 raise << maybe(caller.name) << "'maybe-convert' expects exactly 2 ingredients in '" << to_original_string(inst) << "'\n" << end(); + 90 raise << maybe(caller.name) << "'maybe-convert' expects exactly 2 ingredients in '" << to_original_string(inst) << "'\n" << end(); 91 break; 92 } 93 reagent/*copy*/ base = inst.ingredients.at(0); 94 // Update MAYBE_CONVERT base in Check 95 if (!base.type) { - 96 raise << maybe(caller.name) << "first ingredient of 'maybe-convert' should be an exclusive-container, but got '" << base.original_string << "'\n" << end(); + 96 raise << maybe(caller.name) << "first ingredient of 'maybe-convert' should be an exclusive-container, but got '" << base.original_string << "'\n" << end(); 97 break; 98 } 99 const type_tree* base_type = base.type; 100 // Update MAYBE_CONVERT base_type in Check 101 if (!base_type->atom || base_type->value == 0 || !contains_key(Type, base_type->value) || get(Type, base_type->value).kind != EXCLUSIVE_CONTAINER) { -102 raise << maybe(caller.name) << "first ingredient of 'maybe-convert' should be an exclusive-container, but got '" << base.original_string << "'\n" << end(); +102 raise << maybe(caller.name) << "first ingredient of 'maybe-convert' should be an exclusive-container, but got '" << base.original_string << "'\n" << end(); 103 break; 104 } 105 if (!is_literal(inst.ingredients.at(1))) { -106 raise << maybe(caller.name) << "second ingredient of 'maybe-convert' should have type 'variant', but got '" << inst.ingredients.at(1).original_string << "'\n" << end(); +106 raise << maybe(caller.name) << "second ingredient of 'maybe-convert' should have type 'variant', but got '" << inst.ingredients.at(1).original_string << "'\n" << end(); 107 break; 108 } 109 if (inst.products.empty()) break; 110 if (SIZE(inst.products) != 2) { -111 raise << maybe(caller.name) << "'maybe-convert' expects exactly 2 products in '" << to_original_string(inst) << "'\n" << end(); +111 raise << maybe(caller.name) << "'maybe-convert' expects exactly 2 products in '" << to_original_string(inst) << "'\n" << end(); 112 break; 113 } 114 reagent/*copy*/ product = inst.products.at(0); @@ -180,18 +180,18 @@ if ('onhashchange' in window) { 116 reagent& offset = inst.ingredients.at(1); 117 populate_value(offset); 118 if (offset.value >= SIZE(get(Type, base_type->value).elements)) { -119 raise << maybe(caller.name) << "invalid tag " << offset.value << " in '" << to_original_string(inst) << '\n' << end(); +119 raise << maybe(caller.name) << "invalid tag " << offset.value << " in '" << to_original_string(inst) << '\n' << end(); 120 break; 121 } 122 const reagent& variant = variant_type(base, offset.value); 123 if (!types_coercible(product, variant)) { -124 raise << maybe(caller.name) << "'maybe-convert " << base.original_string << ", " << inst.ingredients.at(1).original_string << "' should write to " << to_string(variant.type) << " but '" << product.name << "' has type " << to_string(product.type) << '\n' << end(); +124 raise << maybe(caller.name) << "'maybe-convert " << base.original_string << ", " << inst.ingredients.at(1).original_string << "' should write to " << to_string(variant.type) << " but '" << product.name << "' has type " << to_string(product.type) << '\n' << end(); 125 break; 126 } 127 reagent/*copy*/ status = inst.products.at(1); 128 // Update MAYBE_CONVERT status in Check 129 if (!is_mu_boolean(status)) { -130 raise << maybe(get(Recipe, r).name) << "second product yielded by 'maybe-convert' should be a boolean, but tried to write to '" << inst.products.at(1).original_string << "'\n" << end(); +130 raise << maybe(get(Recipe, r).name) << "second product yielded by 'maybe-convert' should be a boolean, but tried to write to '" << inst.products.at(1).original_string << "'\n" << end(); 131 break; 132 } 133 break; @@ -202,7 +202,7 @@ if ('onhashchange' in window) { 138 // Update MAYBE_CONVERT base in Run 139 int base_address = base.value; 140 if (base_address == 0) { -141 raise << maybe(current_recipe_name()) << "tried to access location 0 in '" << to_original_string(current_instruction()) << "'\n" << end(); +141 raise << maybe(current_recipe_name()) << "tried to access location 0 in '" << to_original_string(current_instruction()) << "'\n" << end(); 142 break; 143 } 144 int tag = current_instruction().ingredients.at(1).value; @@ -214,19 +214,19 @@ if ('onhashchange' in window) { 150 write_products = false; 151 if (tag == static_cast<int>(get_or_insert(Memory, base_address))) { 152 const reagent& variant = variant_type(base, tag); -153 trace("mem") << "storing 1 in location " << status.value << end(); +153 trace("mem") << "storing 1 in location " << status.value << end(); 154 put(Memory, status.value, 1); 155 if (!is_dummy(product)) { 156 // Write Memory in Successful MAYBE_CONVERT in Run 157 for (int i = 0; i < size_of(variant); ++i) { 158 double val = get_or_insert(Memory, base_address+/*skip tag*/1+i); -159 trace("mem") << "storing " << no_scientific(val) << " in location " << product.value+i << end(); +159 trace("mem") << "storing " << no_scientific(val) << " in location " << product.value+i << end(); 160 put(Memory, product.value+i, val); 161 } 162 } 163 } 164 else { -165 trace("mem") << "storing 0 in location " << status.value << end(); +165 trace("mem") << "storing 0 in location " << status.value << end(); 166 put(Memory, status.value, 0); 167 } 168 break; @@ -369,22 +369,22 @@ if ('onhashchange' in window) { 305 :(before "End check_merge_call Special-cases") 306 case EXCLUSIVE_CONTAINER: { 307 assert(state.data.top().container_element_index == 0); -308 trace("transform") << "checking exclusive container " << to_string(container) << " vs ingredient " << ingredient_index << end(); +308 trace("transform") << "checking exclusive container " << to_string(container) << " vs ingredient " << ingredient_index << end(); 309 // easy case: exact match 310 if (types_strictly_match(container, inst.ingredients.at(ingredient_index))) 311 return; 312 if (!is_literal(ingredients.at(ingredient_index))) { -313 raise << maybe(caller.name) << "ingredient " << ingredient_index << " of 'merge' should be a literal, for the tag of exclusive-container '" << container_info.name << "' in '" << to_original_string(inst) << "'\n" << end(); +313 raise << maybe(caller.name) << "ingredient " << ingredient_index << " of 'merge' should be a literal, for the tag of exclusive-container '" << container_info.name << "' in '" << to_original_string(inst) << "'\n" << end(); 314 return; 315 } 316 reagent/*copy*/ ingredient = ingredients.at(ingredient_index); // unnecessary copy just to keep this function from modifying caller 317 populate_value(ingredient); 318 if (ingredient.value >= SIZE(container_info.elements)) { -319 raise << maybe(caller.name) << "invalid tag at " << ingredient_index << " for '" << container_info.name << "' in '" << to_original_string(inst) << "'\n" << end(); +319 raise << maybe(caller.name) << "invalid tag at " << ingredient_index << " for '" << container_info.name << "' in '" << to_original_string(inst) << "'\n" << end(); 320 return; 321 } 322 const reagent& variant = variant_type(container, ingredient.value); -323 trace("transform") << "tag: " << ingredient.value << end(); +323 trace("transform") << "tag: " << ingredient.value << end(); 324 // replace union with its variant 325 state.data.pop(); 326 state.data.push(merge_check_point(variant, 0)); -- cgit 1.4.1-2-gfad0