From 85553e522cfd8cf6ecb9f8c6819bff044197502b Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 7 Feb 2017 00:25:27 -0800 Subject: 3747 --- 043space.cc | 10 +++++----- 062convert_ingredients_to_text.cc | 2 +- html/043space.cc.html | 10 +++++----- html/062convert_ingredients_to_text.cc.html | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/043space.cc b/043space.cc index 33c4bb09..879561ee 100644 --- a/043space.cc +++ b/043space.cc @@ -235,7 +235,7 @@ void try_reclaim_locals() { const recipe& exiting_recipe = get(Recipe, r); if (exiting_recipe.steps.empty()) return; const instruction& inst = exiting_recipe.steps.at(0); - if (inst.old_name != "local-scope") return; + if (inst.name_before_rewrite != "local-scope") return; // reclaim any local variables unless they're being returned vector zeros; for (int i = /*leave default space for last*/1; i < SIZE(exiting_recipe.steps); ++i) { @@ -261,11 +261,11 @@ void try_reclaim_locals() { //: Reclaiming local variables above requires remembering what name an //: instruction had before any rewrites or transforms. :(before "End instruction Fields") -string old_name; +string name_before_rewrite; :(before "End instruction Clear") -old_name.clear(); +name_before_rewrite.clear(); :(before "End next_instruction(curr)") -curr->old_name = curr->name; // before rewrite rules modify it +curr->name_before_rewrite = curr->name; :(code) // is this reagent one of the values returned by the current (return) instruction? @@ -298,7 +298,7 @@ bool should_update_refcounts_in_write_memory() { if (!contains_key(Recipe, inst.operation)) return true; const recipe& callee = get(Recipe, inst.operation); if (callee.steps.empty()) return true; - return callee.steps.at(0).old_name != "local-scope"; // callees that call local-scope are already dealt with before return + return callee.steps.at(0).name_before_rewrite != "local-scope"; // callees that call local-scope are already dealt with before return } bool caller_uses_product(int product_index) { diff --git a/062convert_ingredients_to_text.cc b/062convert_ingredients_to_text.cc index 94ff5df3..cf639b9e 100644 --- a/062convert_ingredients_to_text.cc +++ b/062convert_ingredients_to_text.cc @@ -86,7 +86,7 @@ void convert_ingredients_to_text(recipe& caller) { convert_ingredient_to_text(inst.ingredients.at(j), new_instructions, ingredient_name.str()); } } - else if (inst.old_name == "append") { + else if (inst.name_before_rewrite == "append") { // override only variants that try to append to a string // Beware: this hack restricts how much 'append' can be overridden. Any // new variants that match: diff --git a/html/043space.cc.html b/html/043space.cc.html index 60bc5518..2cdff102 100644 --- a/html/043space.cc.html +++ b/html/043space.cc.html @@ -299,7 +299,7 @@ if ('onhashchange' in window) { 235 const recipe& exiting_recipe = get(Recipe, r); 236 if (exiting_recipe.steps.empty()) return; 237 const instruction& inst = exiting_recipe.steps.at(0); -238 if (inst.old_name != "local-scope") return; +238 if (inst.name_before_rewrite != "local-scope") return; 239 // reclaim any local variables unless they're being returned 240 vector<double> zeros; 241 for (int i = /*leave default space for last*/1; i < SIZE(exiting_recipe.steps); ++i) { @@ -325,11 +325,11 @@ if ('onhashchange' in window) { 261 //: Reclaiming local variables above requires remembering what name an 262 //: instruction had before any rewrites or transforms. 263 :(before "End instruction Fields") -264 string old_name; +264 string name_before_rewrite; 265 :(before "End instruction Clear") -266 old_name.clear(); +266 name_before_rewrite.clear(); 267 :(before "End next_instruction(curr)") -268 curr->old_name = curr->name; // before rewrite rules modify it +268 curr->name_before_rewrite = curr->name; 269 270 :(code) 271 // is this reagent one of the values returned by the current (return) instruction? @@ -362,7 +362,7 @@ if ('onhashchange' in window) { 298 if (!contains_key(Recipe, inst.operation)) return true; 299 const recipe& callee = get(Recipe, inst.operation); 300 if (callee.steps.empty()) return true; -301 return callee.steps.at(0).old_name != "local-scope"; // callees that call local-scope are already dealt with before return +301 return callee.steps.at(0).name_before_rewrite != "local-scope"; // callees that call local-scope are already dealt with before return 302 } 303 304 bool caller_uses_product(int product_index) { diff --git a/html/062convert_ingredients_to_text.cc.html b/html/062convert_ingredients_to_text.cc.html index 9eae6173..c97557e4 100644 --- a/html/062convert_ingredients_to_text.cc.html +++ b/html/062convert_ingredients_to_text.cc.html @@ -147,7 +147,7 @@ if ('onhashchange' in window) { 86 convert_ingredient_to_text(inst.ingredients.at(j), new_instructions, ingredient_name.str()); 87 } 88 } - 89 else if (inst.old_name == "append") { + 89 else if (inst.name_before_rewrite == "append") { 90 // override only variants that try to append to a string 91 // Beware: this hack restricts how much 'append' can be overridden. Any 92 // new variants that match: -- cgit 1.4.1-2-gfad0