diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-02-19 13:42:45 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-02-19 13:42:45 -0800 |
commit | 9f95c7451b940b6644cb6fd6783ea9c17168357e (patch) | |
tree | d1443c9c4dc48bdc6bd67c7e16b43b9185d6d835 /057static_dispatch.cc | |
parent | b83b2cfd6676e0caa18b39f22f01bdebf41c9d58 (diff) | |
download | mu-9f95c7451b940b6644cb6fd6783ea9c17168357e.tar.gz |
2685
Stack of plans for cleaning up replace_type_ingredients() and a couple of other things, from main problem to subproblems: include type names in the type_tree rather than in the separate properties vector make type_tree and string_tree real cons cells, with separate leaf nodes redo the vocabulary for dumping various objects: do we really need to_string and debug_string? can we have a version with *all* information? can we have to_string not call debug_string? This commit nibbles at the edges of the final task, switching from member method syntax to global function like almost everything else. I'm mostly using methods just for STL in this project.
Diffstat (limited to '057static_dispatch.cc')
-rw-r--r-- | 057static_dispatch.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/057static_dispatch.cc b/057static_dispatch.cc index 9c71ac38..576ef35f 100644 --- a/057static_dispatch.cc +++ b/057static_dispatch.cc @@ -194,14 +194,14 @@ string best_variant(instruction& inst, const recipe& caller_recipe) { // error messages if (get(Recipe_ordinal, inst.name) >= MAX_PRIMITIVE_RECIPES) { // we currently don't check types for primitive variants - raise_error << maybe(caller_recipe.name) << "failed to find a matching call for '" << inst.to_string() << "'\n" << end(); + raise_error << maybe(caller_recipe.name) << "failed to find a matching call for '" << to_string(inst) << "'\n" << end(); for (list<call>::iterator p = /*skip*/++resolve_stack.begin(); p != resolve_stack.end(); ++p) { const recipe& specializer_recipe = get(Recipe, p->running_recipe); const instruction& specializer_inst = specializer_recipe.steps.at(p->running_step_index); if (specializer_recipe.name != "interactive") - raise_error << " (from '" << specializer_inst.to_string() << "' in " << specializer_recipe.name << ")\n" << end(); + raise_error << " (from '" << to_string(specializer_inst) << "' in " << specializer_recipe.name << ")\n" << end(); else - raise_error << " (from '" << specializer_inst.to_string() << "')\n" << end(); + raise_error << " (from '" << to_string(specializer_inst) << "')\n" << end(); // One special-case to help with the rewrite_stash transform. (cross-layer) if (specializer_inst.products.at(0).name.find("stash_") == 0) { instruction stash_inst; @@ -525,10 +525,10 @@ string header_label(recipe_ordinal r) { ostringstream out; out << "recipe " << caller.name; for (long long int i = 0; i < SIZE(caller.ingredients); ++i) - out << ' ' << caller.ingredients.at(i).to_string(); + out << ' ' << to_string(caller.ingredients.at(i)); if (!caller.products.empty()) out << " ->"; for (long long int i = 0; i < SIZE(caller.products); ++i) - out << ' ' << caller.products.at(i).to_string(); + out << ' ' << to_string(caller.products.at(i)); return out.str(); } |