From fd7d8138a4ff5515f9b79c584a98d5c26d8ddb8a Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 2 Mar 2017 05:48:01 -0800 Subject: 3750 --- html/031merge.cc.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'html/031merge.cc.html') diff --git a/html/031merge.cc.html b/html/031merge.cc.html index bc0c1166..9fe3e71b 100644 --- a/html/031merge.cc.html +++ b/html/031merge.cc.html @@ -177,12 +177,12 @@ if ('onhashchange' in window) { 114 :(code) 115 void check_merge_calls(const recipe_ordinal r) { 116 const recipe& caller = get(Recipe, r); -117 trace(9991, "transform") << "--- type-check merge instructions in recipe " << caller.name << end(); +117 trace(9991, "transform") << "--- type-check merge instructions in recipe " << caller.name << end(); 118 for (int i = 0; i < SIZE(caller.steps); ++i) { 119 const instruction& inst = caller.steps.at(i); 120 if (inst.name != "merge") continue; 121 if (SIZE(inst.products) != 1) { -122 raise << maybe(caller.name) << "'merge' should yield a single product in '" << inst.original_string << "'\n" << end(); +122 raise << maybe(caller.name) << "'merge' should yield a single product in '" << inst.original_string << "'\n" << end(); 123 continue; 124 } 125 reagent/*copy*/ product = inst.products.at(0); @@ -190,12 +190,12 @@ if ('onhashchange' in window) { 127 const type_tree* product_base_type = product.type->atom ? product.type : product.type->left; 128 assert(product_base_type->atom); 129 if (product_base_type->value == 0 || !contains_key(Type, product_base_type->value)) { -130 raise << maybe(caller.name) << "'merge' should yield a container in '" << inst.original_string << "'\n" << end(); +130 raise << maybe(caller.name) << "'merge' should yield a container in '" << inst.original_string << "'\n" << end(); 131 continue; 132 } 133 const type_info& info = get(Type, product_base_type->value); 134 if (info.kind != CONTAINER && info.kind != EXCLUSIVE_CONTAINER) { -135 raise << maybe(caller.name) << "'merge' should yield a container in '" << inst.original_string << "'\n" << end(); +135 raise << maybe(caller.name) << "'merge' should yield a container in '" << inst.original_string << "'\n" << end(); 136 continue; 137 } 138 check_merge_call(inst.ingredients, product, caller, inst); @@ -208,9 +208,9 @@ if ('onhashchange' in window) { 145 state.data.push(merge_check_point(product, 0)); 146 while (true) { 147 assert(!state.data.empty()); -148 trace(9999, "transform") << ingredient_index << " vs " << SIZE(ingredients) << end(); +148 trace(9999, "transform") << ingredient_index << " vs " << SIZE(ingredients) << end(); 149 if (ingredient_index >= SIZE(ingredients)) { -150 raise << maybe(caller.name) << "too few ingredients in '" << inst.original_string << "'\n" << end(); +150 raise << maybe(caller.name) << "too few ingredients in '" << inst.original_string << "'\n" << end(); 151 return; 152 } 153 reagent& container = state.data.top().container; @@ -224,7 +224,7 @@ if ('onhashchange' in window) { 161 if (state.data.top().container_element_index == 0 && types_coercible(container, inst.ingredients.at(ingredient_index))) 162 return; 163 const reagent& expected_ingredient = element_type(container.type, state.data.top().container_element_index); -164 trace(9999, "transform") << "checking container " << to_string(container) << " || " << to_string(expected_ingredient) << " vs ingredient " << ingredient_index << end(); +164 trace(9999, "transform") << "checking container " << to_string(container) << " || " << to_string(expected_ingredient) << " vs ingredient " << ingredient_index << end(); 165 // if the current element is the ingredient we expect, move on to the next element/ingredient 166 if (types_coercible(expected_ingredient, ingredients.at(ingredient_index))) { 167 ++ingredient_index; @@ -233,7 +233,7 @@ if ('onhashchange' in window) { 170 state.data.pop(); 171 if (state.data.empty()) { 172 if (ingredient_index < SIZE(ingredients)) -173 raise << maybe(caller.name) << "too many ingredients in '" << inst.original_string << "'\n" << end(); +173 raise << maybe(caller.name) << "too many ingredients in '" << inst.original_string << "'\n" << end(); 174 return; 175 } 176 ++state.data.top().container_element_index; @@ -249,9 +249,9 @@ if ('onhashchange' in window) { 186 // End check_merge_call Special-cases 187 default: { 188 if (!types_coercible(container, ingredients.at(ingredient_index))) { -189 raise << maybe(caller.name) << "incorrect type of ingredient " << ingredient_index << " in '" << inst.original_string << "'\n" << end(); -190 raise << " (expected '" << debug_string(container) << "')\n" << end(); -191 raise << " (got '" << debug_string(ingredients.at(ingredient_index)) << "')\n" << end(); +189 raise << maybe(caller.name) << "incorrect type of ingredient " << ingredient_index << " in '" << inst.original_string << "'\n" << end(); +190 raise << " (expected '" << debug_string(container) << "')\n" << end(); +191 raise << " (got '" << debug_string(ingredients.at(ingredient_index)) << "')\n" << end(); 192 return; 193 } 194 ++ingredient_index; @@ -260,7 +260,7 @@ if ('onhashchange' in window) { 197 state.data.pop(); 198 if (state.data.empty()) { 199 if (ingredient_index < SIZE(ingredients)) -200 raise << maybe(caller.name) << "too many ingredients in '" << inst.original_string << "'\n" << end(); +200 raise << maybe(caller.name) << "too many ingredients in '" << inst.original_string << "'\n" << end(); 201 return; 202 } 203 ++state.data.top().container_element_index; -- cgit 1.4.1-2-gfad0