From bfa3f5ba3930fb3919d94e97929a2b962d104e10 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 2 Jun 2017 00:44:32 -0700 Subject: 3900 --- html/043space.cc.html | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'html/043space.cc.html') diff --git a/html/043space.cc.html b/html/043space.cc.html index 6720525a..61a95796 100644 --- a/html/043space.cc.html +++ b/html/043space.cc.html @@ -128,7 +128,7 @@ if ('onhashchange' in window) { 62 if (is_raw(x) || is_dummy(x)) return; 63 if (x.name == "default-space") return; 64 if (!x.initialized) - 65 ¦ raise << to_original_string(current_instruction()) << ": reagent not initialized: '" << x.original_string << "'\n" << end(); + 65 ¦ raise << to_original_string(current_instruction()) << ": reagent not initialized: '" << x.original_string << "'\n" << end(); 66 x.set_value(address(x.value, space_base(x))); 67 x.properties.push_back(pair<string, string_tree*>("raw", NULL)); 68 assert(is_raw(x)); @@ -136,7 +136,7 @@ if ('onhashchange' in window) { 70 71 //: hook replaced in a later layer 72 int space_base(const reagent& x) { - 73 return current_call().default_space ? (current_call().default_space+/*skip refcount*/1) : 0; + 73 return current_call().default_space ? (current_call().default_space+/*skip refcount*/1) : 0; 74 } 75 76 int address(int offset, int base) { @@ -156,8 +156,8 @@ if ('onhashchange' in window) { 90 :(after "Begin Preprocess write_memory(x, data)") 91 if (x.name == "default-space") { 92 if (!scalar(data) || !is_space(x)) - 93 ¦ raise << maybe(current_recipe_name()) << "'default-space' should be of type address:array:location, but is " << to_string(x.type) << '\n' << end(); - 94 current_call().default_space = data.at(0); + 93 ¦ raise << maybe(current_recipe_name()) << "'default-space' should be of type address:array:location, but is " << to_string(x.type) << '\n' << end(); + 94 current_call().default_space = data.at(0); 95 return; 96 } 97 :(code) @@ -175,7 +175,7 @@ if ('onhashchange' in window) { 109 :(after "Begin Preprocess read_memory(x)") 110 if (x.name == "default-space") { 111 vector<double> result; -112 result.push_back(current_call().default_space); +112 result.push_back(current_call().default_space); 113 return result; 114 } 115 @@ -248,14 +248,14 @@ if ('onhashchange' in window) { 182 :(after "Begin Preprocess read_memory(x)") 183 if (x.name == "number-of-locals") { 184 vector<double> result; -185 result.push_back(Name[get(Recipe_ordinal, current_recipe_name())][""]); +185 result.push_back(Name[get(Recipe_ordinal, current_recipe_name())][""]); 186 if (result.back() == 0) -187 ¦ raise << "no space allocated for default-space in recipe " << current_recipe_name() << "; are you using names?\n" << end(); +187 ¦ raise << "no space allocated for default-space in recipe " << current_recipe_name() << "; are you using names?\n" << end(); 188 return result; 189 } 190 :(after "Begin Preprocess write_memory(x, data)") 191 if (x.name == "number-of-locals") { -192 raise << maybe(current_recipe_name()) << "can't write to special name 'number-of-locals'\n" << end(); +192 raise << maybe(current_recipe_name()) << "can't write to special name 'number-of-locals'\n" << end(); 193 return; 194 } 195 @@ -298,7 +298,7 @@ if ('onhashchange' in window) { 232 void try_reclaim_locals() { 233 if (!Reclaim_memory) return; 234 // only reclaim routines starting with 'local-scope' -235 const recipe_ordinal r = get(Recipe_ordinal, current_recipe_name()); +235 const recipe_ordinal r = get(Recipe_ordinal, current_recipe_name()); 236 const recipe& exiting_recipe = get(Recipe, r); 237 if (exiting_recipe.steps.empty()) return; 238 const instruction& inst = exiting_recipe.steps.at(0); @@ -319,8 +319,8 @@ if ('onhashchange' in window) { 253 ¦ ¦ write_memory(product, zeros); 254 ¦ } 255 } -256 trace(9999, "mem") << "automatically abandoning " << current_call().default_space << end(); -257 abandon(current_call().default_space, +256 trace(9999, "mem") << "automatically abandoning " << current_call().default_space << end(); +257 abandon(current_call().default_space, 258 ¦ ¦ ¦ ¦ inst.products.at(0).type->right, 259 ¦ ¦ ¦ ¦ /*refcount*/1 + /*array length*/1 + /*number-of-locals*/Name[r][""]); 260 } @@ -340,9 +340,9 @@ if ('onhashchange' in window) { 274 bool escaping(const reagent& r) { 275 assert(Current_routine); // run-time only 276 // nothing escapes when you fall through past end of recipe -277 if (current_step_index() >= SIZE(Current_routine->steps())) return false; -278 for (long long i = 0; i < SIZE(current_instruction().ingredients); ++i) { -279 ¦ if (r == current_instruction().ingredients.at(i)) { +277 if (current_step_index() >= SIZE(Current_routine->steps())) return false; +278 for (long long i = 0; i < SIZE(current_instruction().ingredients); ++i) { +279 ¦ if (r == current_instruction().ingredients.at(i)) { 280 ¦ ¦ if (caller_uses_product(i)) 281 ¦ ¦ ¦ return true; 282 ¦ } @@ -355,7 +355,7 @@ if ('onhashchange' in window) { 289 290 :(before "End should_update_refcounts() Special-cases") 291 if (Writing_products_of_instruction) { -292 const instruction& inst = current_instruction(); +292 const instruction& inst = current_instruction(); 293 // should_update_refcounts() Special-cases When Writing Products Of Primitive Instructions 294 if (inst.operation < MAX_PRIMITIVE_RECIPES) return true; 295 if (!contains_key(Recipe, inst.operation)) return true; @@ -370,7 +370,7 @@ if ('onhashchange' in window) { 304 assert(!Current_routine->calls.empty()); 305 if (Current_routine->calls.size() == 1) return false; 306 const call& caller = *++Current_routine->calls.begin(); -307 const instruction& caller_inst = to_instruction(caller); +307 const instruction& caller_inst = to_instruction(caller); 308 if (product_index >= SIZE(caller_inst.products)) return false; 309 return !is_dummy(caller_inst.products.at(product_index)); 310 } -- cgit 1.4.1-2-gfad0