From 996a8acd6c2ce1c7d3b13cfbd799269669b0038b Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 14 Feb 2016 23:18:33 -0800 Subject: 2656 --- 060immutable.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to '060immutable.cc') diff --git a/060immutable.cc b/060immutable.cc index 08660ab1..4d637d6c 100644 --- a/060immutable.cc +++ b/060immutable.cc @@ -152,11 +152,10 @@ void check_immutable_ingredients(recipe_ordinal r) { // call get-address or index-address with it, and that any non-primitive // recipe calls in the body aren't returning it as a product. const recipe& caller = get(Recipe, r); -//? cerr << caller.name << '\n'; + trace(9991, "transform") << "--- check mutability of ingredients in recipe " << caller.name << end(); if (!caller.has_header) return; // skip check for old-style recipes calling next-ingredient directly for (long long int i = 0; i < SIZE(caller.ingredients); ++i) { const reagent& current_ingredient = caller.ingredients.at(i); -//? cerr << " " << current_ingredient.original_string << '\n'; if (!is_mu_address(current_ingredient)) continue; // will be copied if (is_present_in_products(caller, current_ingredient.name)) continue; // not expected to be immutable // End Immutable Ingredients Special-cases @@ -164,7 +163,6 @@ void check_immutable_ingredients(recipe_ordinal r) { immutable_vars.insert(current_ingredient.name); for (long long int i = 0; i < SIZE(caller.steps); ++i) { const instruction& inst = caller.steps.at(i); -//? cerr << " " << inst.to_string() << '\n'; check_immutable_ingredient_in_instruction(inst, immutable_vars, current_ingredient.name, caller); update_aliases(inst, immutable_vars); } @@ -238,7 +236,6 @@ void check_immutable_ingredient_in_instruction(const instruction& inst, const se if (current_ingredient_indices.empty()) return; // ingredient not found in call for (set::iterator p = current_ingredient_indices.begin(); p != current_ingredient_indices.end(); ++p) { const long long int current_ingredient_index = *p; -//? cerr << " ingredient index: " << *p << '\n'; reagent current_ingredient = inst.ingredients.at(current_ingredient_index); canonize_type(current_ingredient); const string& current_ingredient_name = current_ingredient.name; -- cgit 1.4.1-2-gfad0