about summary refs log tree commit diff stats
path: root/059generic_recipe.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-08 13:58:40 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-08 14:04:46 -0800
commitebdf923d2dd8c75d1391f3523825ab5cb36a6405 (patch)
treedd1caf38c36efa50d6758284aa92ec21617a4460 /059generic_recipe.cc
parentfa8eda45947ca4d4e394441203c0e871251ec121 (diff)
downloadmu-ebdf923d2dd8c75d1391f3523825ab5cb36a6405.tar.gz
2397
Fix that stray issue with a better phase ordering.
Another thing I'm not testing.
Diffstat (limited to '059generic_recipe.cc')
-rw-r--r--059generic_recipe.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/059generic_recipe.cc b/059generic_recipe.cc
index dd6eb94a..811869b6 100644
--- a/059generic_recipe.cc
+++ b/059generic_recipe.cc
@@ -131,11 +131,11 @@ recipe_ordinal new_variant(recipe_ordinal exemplar, const instruction& inst) {
   recently_added_recipes.push_back(new_recipe_ordinal);
   put(Recipe, new_recipe_ordinal, get(Recipe, exemplar));
   recipe& new_recipe = get(Recipe, new_recipe_ordinal);
+  new_recipe.name = new_name;
   // Since the exemplar never ran any transforms, we have to redo some of the
   // work of the check_types_by_name transform while supporting type-ingredients.
   compute_type_names(new_recipe);
   // that gives enough information to replace type-ingredients with concrete types
-  new_recipe.name = new_name;
   map<string, const string_tree*> mappings;
   compute_type_ingredient_mappings(get(Recipe, exemplar), inst, mappings);
   replace_type_ingredients(new_recipe, mappings);
@@ -149,6 +149,7 @@ recipe_ordinal new_variant(recipe_ordinal exemplar, const instruction& inst) {
 }
 
 void compute_type_names(recipe& variant) {
+  trace(9993, "transform") << "compute type names: " << variant.name << end();
   map<string, string_tree*> type_names;
   for (long long int i = 0; i < SIZE(variant.ingredients); ++i) {
     save_or_deduce_type_name(variant.ingredients.at(i), type_names);
@@ -158,6 +159,7 @@ void compute_type_names(recipe& variant) {
   }
   for (long long int i = 0; i < SIZE(variant.steps); ++i) {
     instruction& inst = variant.steps.at(i);
+    trace(9993, "transform") << "  instruction: " << inst.to_string() << end();
     for (long long int in = 0; in < SIZE(inst.ingredients); ++in) {
       save_or_deduce_type_name(inst.ingredients.at(in), type_names);
     }