From 1c2d788b454670bf8fa1cb65c6251a8ff6ddcaf7 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 19 Jun 2017 11:29:20 -0700 Subject: 3927 --- html/054static_dispatch.cc.html | 46 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'html/054static_dispatch.cc.html') diff --git a/html/054static_dispatch.cc.html b/html/054static_dispatch.cc.html index ce95b435..25a0a461 100644 --- a/html/054static_dispatch.cc.html +++ b/html/054static_dispatch.cc.html @@ -106,7 +106,7 @@ if ('onhashchange' in window) { 41 ¦ ¦ put(Recipe_ordinal, new_name, Next_recipe_ordinal++); 42 ¦ ¦ get_or_insert(Recipe_variants, result.name).push_back(get(Recipe_ordinal, new_name)); 43 ¦ } - 44 ¦ trace(9999, "load") << "switching " << result.name << " to " << new_name << end(); + 44 ¦ trace(9999, "load") << "switching " << result.name << " to " << new_name << end(); 45 ¦ result.name = new_name; 46 ¦ result.is_autogenerated = true; 47 } @@ -164,9 +164,9 @@ if ('onhashchange' in window) { 99 ¦ if (a->name == "literal" && b->name == "literal") 100 ¦ ¦ return true; 101 ¦ if (a->name == "literal") -102 ¦ ¦ return Literal_type_names.find(b->name) != Literal_type_names.end(); +102 ¦ ¦ return Literal_type_names.find(b->name) != Literal_type_names.end(); 103 ¦ if (b->name == "literal") -104 ¦ ¦ return Literal_type_names.find(a->name) != Literal_type_names.end(); +104 ¦ ¦ return Literal_type_names.find(a->name) != Literal_type_names.end(); 105 ¦ return a->name == b->name; 106 } 107 return deeply_equal_type_names(a->left, b->left) @@ -227,12 +227,12 @@ if ('onhashchange' in window) { 162 :(code) 163 void resolve_ambiguous_calls(const recipe_ordinal r) { 164 recipe& caller_recipe = get(Recipe, r); -165 trace(9991, "transform") << "--- resolve ambiguous calls for recipe " << caller_recipe.name << end(); +165 trace(9991, "transform") << "--- resolve ambiguous calls for recipe " << caller_recipe.name << end(); 166 for (int index = 0; index < SIZE(caller_recipe.steps); ++index) { 167 ¦ instruction& inst = caller_recipe.steps.at(index); 168 ¦ if (inst.is_label) continue; 169 ¦ if (non_ghost_size(get_or_insert(Recipe_variants, inst.name)) == 0) continue; -170 ¦ trace(9992, "transform") << "instruction " << to_original_string(inst) << end(); +170 ¦ trace(9992, "transform") << "instruction " << to_original_string(inst) << end(); 171 ¦ Resolve_stack.push_front(call(r)); 172 ¦ Resolve_stack.front().running_step_index = index; 173 ¦ string new_name = best_variant(inst, caller_recipe); @@ -268,29 +268,29 @@ if ('onhashchange' in window) { 203 if (get(Recipe_ordinal, inst.name) >= MAX_PRIMITIVE_RECIPES) { // we currently don't check types for primitive variants 204 ¦ if (SIZE(variants) == 1) { 205 ¦ ¦ raise << maybe(caller_recipe.name) << "types don't match in call for '" << to_original_string(inst) << "'\n" << end(); -206 ¦ ¦ raise << " which tries to call '" << original_header_label(get(Recipe, variants.at(0))) << "'\n" << end(); +206 ¦ ¦ raise << " which tries to call '" << original_header_label(get(Recipe, variants.at(0))) << "'\n" << end(); 207 ¦ } 208 ¦ else { -209 ¦ ¦ raise << maybe(caller_recipe.name) << "failed to find a matching call for '" << to_original_string(inst) << "'\n" << end(); -210 ¦ ¦ raise << " available variants are:\n" << end(); +209 ¦ ¦ raise << maybe(caller_recipe.name) << "failed to find a matching call for '" << to_original_string(inst) << "'\n" << end(); +210 ¦ ¦ raise << " available variants are:\n" << end(); 211 ¦ ¦ for (int i = 0; i < SIZE(variants); ++i) -212 ¦ ¦ ¦ raise << " " << original_header_label(get(Recipe, variants.at(i))) << '\n' << end(); +212 ¦ ¦ ¦ raise << " " << original_header_label(get(Recipe, variants.at(i))) << '\n' << end(); 213 ¦ } -214 ¦ for (list<call>::iterator p = /*skip*/++Resolve_stack.begin(); p != Resolve_stack.end(); ++p) { +214 ¦ for (list<call>::iterator p = /*skip*/++Resolve_stack.begin(); p != Resolve_stack.end(); ++p) { 215 ¦ ¦ const recipe& specializer_recipe = get(Recipe, p->running_recipe); 216 ¦ ¦ const instruction& specializer_inst = specializer_recipe.steps.at(p->running_step_index); 217 ¦ ¦ if (specializer_recipe.name != "interactive") -218 ¦ ¦ ¦ raise << " (from '" << to_original_string(specializer_inst) << "' in " << specializer_recipe.name << ")\n" << end(); +218 ¦ ¦ ¦ raise << " (from '" << to_original_string(specializer_inst) << "' in " << specializer_recipe.name << ")\n" << end(); 219 ¦ ¦ else -220 ¦ ¦ ¦ raise << " (from '" << to_original_string(specializer_inst) << "')\n" << end(); +220 ¦ ¦ ¦ raise << " (from '" << to_original_string(specializer_inst) << "')\n" << end(); 221 ¦ ¦ // One special-case to help with the rewrite_stash transform. (cross-layer) 222 ¦ ¦ if (specializer_inst.products.at(0).name.find("stash_") == 0) { 223 ¦ ¦ ¦ instruction stash_inst; 224 ¦ ¦ ¦ if (next_stash(*p, &stash_inst)) { 225 ¦ ¦ ¦ ¦ if (specializer_recipe.name != "interactive") -226 ¦ ¦ ¦ ¦ ¦ raise << " (part of '" << to_original_string(stash_inst) << "' in " << specializer_recipe.name << ")\n" << end(); +226 ¦ ¦ ¦ ¦ ¦ raise << " (part of '" << to_original_string(stash_inst) << "' in " << specializer_recipe.name << ")\n" << end(); 227 ¦ ¦ ¦ ¦ else -228 ¦ ¦ ¦ ¦ ¦ raise << " (part of '" << to_original_string(stash_inst) << "')\n" << end(); +228 ¦ ¦ ¦ ¦ ¦ raise << " (part of '" << to_original_string(stash_inst) << "')\n" << end(); 229 ¦ ¦ ¦ } 230 ¦ ¦ } 231 ¦ } @@ -303,7 +303,7 @@ if ('onhashchange' in window) { 238 vector<recipe_ordinal> result; 239 for (int i = 0; i < SIZE(variants); ++i) { 240 ¦ if (variants.at(i) == -1) continue; -241 ¦ trace(9992, "transform") << "checking variant (strict) " << i << ": " << header_label(variants.at(i)) << end(); +241 ¦ trace(9992, "transform") << "checking variant (strict) " << i << ": " << header_label(variants.at(i)) << end(); 242 ¦ if (all_header_reagents_strictly_match(inst, get(Recipe, variants.at(i)))) 243 ¦ ¦ result.push_back(variants.at(i)); 244 } @@ -313,14 +313,14 @@ if ('onhashchange' in window) { 248 bool all_header_reagents_strictly_match(const instruction& inst, const recipe& variant) { 249 for (int i = 0; i < min(SIZE(inst.ingredients), SIZE(variant.ingredients)); ++i) { 250 ¦ if (!types_strictly_match(variant.ingredients.at(i), inst.ingredients.at(i))) { -251 ¦ ¦ trace(9993, "transform") << "strict match failed: ingredient " << i << end(); +251 ¦ ¦ trace(9993, "transform") << "strict match failed: ingredient " << i << end(); 252 ¦ ¦ return false; 253 ¦ } 254 } 255 for (int i = 0; i < min(SIZE(inst.products), SIZE(variant.products)); ++i) { 256 ¦ if (is_dummy(inst.products.at(i))) continue; 257 ¦ if (!types_strictly_match(variant.products.at(i), inst.products.at(i))) { -258 ¦ ¦ trace(9993, "transform") << "strict match failed: product " << i << end(); +258 ¦ ¦ trace(9993, "transform") << "strict match failed: product " << i << end(); 259 ¦ ¦ return false; 260 ¦ } 261 } @@ -332,7 +332,7 @@ if ('onhashchange' in window) { 267 vector<recipe_ordinal> result; 268 for (int i = 0; i < SIZE(variants); ++i) { 269 ¦ if (variants.at(i) == -1) continue; -270 ¦ trace(9992, "transform") << "checking variant (strict except literal-against-boolean) " << i << ": " << header_label(variants.at(i)) << end(); +270 ¦ trace(9992, "transform") << "checking variant (strict except literal-against-boolean) " << i << ": " << header_label(variants.at(i)) << end(); 271 ¦ if (all_header_reagents_strictly_match_except_literal_against_address_or_boolean(inst, get(Recipe, variants.at(i)))) 272 ¦ ¦ result.push_back(variants.at(i)); 273 } @@ -342,14 +342,14 @@ if ('onhashchange' in window) { 277 bool all_header_reagents_strictly_match_except_literal_against_address_or_boolean(const instruction& inst, const recipe& variant) { 278 for (int i = 0; i < min(SIZE(inst.ingredients), SIZE(variant.ingredients)); ++i) { 279 ¦ if (!types_strictly_match_except_literal_against_address_or_boolean(variant.ingredients.at(i), inst.ingredients.at(i))) { -280 ¦ ¦ trace(9993, "transform") << "match failed: ingredient " << i << end(); +280 ¦ ¦ trace(9993, "transform") << "match failed: ingredient " << i << end(); 281 ¦ ¦ return false; 282 ¦ } 283 } 284 for (int i = 0; i < min(SIZE(variant.products), SIZE(inst.products)); ++i) { 285 ¦ if (is_dummy(inst.products.at(i))) continue; 286 ¦ if (!types_strictly_match_except_literal_against_address_or_boolean(variant.products.at(i), inst.products.at(i))) { -287 ¦ ¦ trace(9993, "transform") << "match failed: product " << i << end(); +287 ¦ ¦ trace(9993, "transform") << "match failed: product " << i << end(); 288 ¦ ¦ return false; 289 ¦ } 290 } @@ -371,7 +371,7 @@ if ('onhashchange' in window) { 306 vector<recipe_ordinal> result; 307 for (int i = 0; i < SIZE(variants); ++i) { 308 ¦ if (variants.at(i) == -1) continue; -309 ¦ trace(9992, "transform") << "checking variant " << i << ": " << header_label(variants.at(i)) << end(); +309 ¦ trace(9992, "transform") << "checking variant " << i << ": " << header_label(variants.at(i)) << end(); 310 ¦ if (all_header_reagents_match(inst, get(Recipe, variants.at(i)))) 311 ¦ ¦ result.push_back(variants.at(i)); 312 } @@ -381,14 +381,14 @@ if ('onhashchange' in window) { 316 bool all_header_reagents_match(const instruction& inst, const recipe& variant) { 317 for (int i = 0; i < min(SIZE(inst.ingredients), SIZE(variant.ingredients)); ++i) { 318 ¦ if (!types_match(variant.ingredients.at(i), inst.ingredients.at(i))) { -319 ¦ ¦ trace(9993, "transform") << "match failed: ingredient " << i << end(); +319 ¦ ¦ trace(9993, "transform") << "match failed: ingredient " << i << end(); 320 ¦ ¦ return false; 321 ¦ } 322 } 323 for (int i = 0; i < min(SIZE(variant.products), SIZE(inst.products)); ++i) { 324 ¦ if (is_dummy(inst.products.at(i))) continue; 325 ¦ if (!types_match(variant.products.at(i), inst.products.at(i))) { -326 ¦ ¦ trace(9993, "transform") << "match failed: product " << i << end(); +326 ¦ ¦ trace(9993, "transform") << "match failed: product " << i << end(); 327 ¦ ¦ return false; 328 ¦ } 329 } -- cgit 1.4.1-2-gfad0