From 2c678a4e1d7f97c862342ee19cf2d6ee6e901d85 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 29 May 2017 14:21:32 -0700 Subject: 3897 - various updates to documentation --- html/043space.cc.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'html/043space.cc.html') diff --git a/html/043space.cc.html b/html/043space.cc.html index ccdf1fde..6720525a 100644 --- a/html/043space.cc.html +++ b/html/043space.cc.html @@ -70,9 +70,9 @@ if ('onhashchange' in window) { 4 5 //: A space is just an array of any scalar location. 6 :(before "End Mu Types Initialization") - 7 put(Type_abbreviations, "space", new_type_tree("address:array:location")); + 7 put(Type_abbreviations, "space", new_type_tree("address:array:location")); 8 //: Spaces are often called 'scopes' in other languages. - 9 put(Type_abbreviations, "scope", new_type_tree("address:array:location")); + 9 put(Type_abbreviations, "scope", new_type_tree("address:array:location")); 10 11 :(scenario set_default_space) 12 # if default-space is 10, and if an array of 5 locals lies from location 12 to 16 (inclusive), @@ -142,7 +142,7 @@ if ('onhashchange' in window) { 76 int address(int offset, int base) { 77 assert(offset >= 0); 78 if (base == 0) return offset; // raw - 79 int size = get_or_insert(Memory, base); + 79 int size = get_or_insert(Memory, base); 80 if (offset >= size) { 81 ¦ // todo: test 82 ¦ raise << "location " << offset << " is out of bounds " << size << " at " << base << '\n' << end(); @@ -305,9 +305,9 @@ if ('onhashchange' in window) { 239 if (inst.name_before_rewrite != "local-scope") return; 240 // reclaim any local variables unless they're being returned 241 vector<double> zeros; -242 for (int i = /*leave default space for last*/1; i < SIZE(exiting_recipe.steps); ++i) { +242 for (int i = /*leave default space for last*/1; i < SIZE(exiting_recipe.steps); ++i) { 243 ¦ const instruction& inst = exiting_recipe.steps.at(i); -244 ¦ for (int i = 0; i < SIZE(inst.products); ++i) { +244 ¦ for (int i = 0; i < SIZE(inst.products); ++i) { 245 ¦ ¦ const reagent& product = inst.products.at(i); 246 ¦ ¦ // local variables only 247 ¦ ¦ if (has_property(product, "lookup")) continue; @@ -340,8 +340,8 @@ 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) { +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; @@ -371,7 +371,7 @@ if ('onhashchange' in window) { 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); -308 if (product_index >= SIZE(caller_inst.products)) return false; +308 if (product_index >= SIZE(caller_inst.products)) return false; 309 return !is_dummy(caller_inst.products.at(product_index)); 310 } 311 @@ -421,7 +421,7 @@ if ('onhashchange' in window) { 355 3:num <- get 1:foo, x:offset 356 4:&:num <- get 1:foo, y:offset 357 5:num <- copy *4:&:num -358 1:foo <- put 1:foo, y:offset, 0 +358 1:foo <- put 1:foo, y:offset, 0 359 4:&:num <- copy 0 360 ] 361 +mem: storing 34 in location 1 @@ -433,7 +433,7 @@ if ('onhashchange' in window) { 367 # 1:foo wasn't abandoned/cleared 368 +run: {5: "number"} <- copy {4: ("address" "number"), "lookup": ()} 369 +mem: storing 12 in location 5 -370 +run: {1: "foo"} <- put {1: "foo"}, {y: "offset"}, {0: "literal"} +370 +run: {1: "foo"} <- put {1: "foo"}, {y: "offset"}, {0: "literal"} 371 +mem: decrementing refcount of 1006: 2 -> 1 372 +run: {4: ("address" "number")} <- copy {0: "literal"} 373 +mem: decrementing refcount of 1006: 1 -> 0 -- cgit 1.4.1-2-gfad0