From 615f4a970a2fa5c91766ee585a7d531b083f4bff Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 23 Sep 2017 19:30:00 -0700 Subject: 4003 --- html/032array.cc.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'html/032array.cc.html') diff --git a/html/032array.cc.html b/html/032array.cc.html index 1b1c343f..fab5ef56 100644 --- a/html/032array.cc.html +++ b/html/032array.cc.html @@ -289,7 +289,7 @@ if ('onhashchange' in window) { 224 reagent container("x:point"); 225 CHECK(!contains_key(Container_metadata, container.type)); 226 // scanning an address to an array of the container precomputes the size of the container -227 reagent r("x:address:array:point"); +227 reagent r("x:address:array:point"); 228 compute_container_sizes(r, ""); 229 CHECK(contains_key(Container_metadata, container.type)); 230 CHECK_EQ(get(Container_metadata, container.type).size, 2); @@ -313,7 +313,7 @@ if ('onhashchange' in window) { 248 reagent container("x:point"); 249 int old_size = SIZE(Container_metadata); 250 // scanning an address to an array of the container precomputes the size of the container -251 reagent r("x:address:array:point:10"); +251 reagent r("x:address:array:point:10"); 252 compute_container_sizes(r, ""); 253 CHECK(contains_key(Container_metadata, container.type)); 254 CHECK_EQ(get(Container_metadata, container.type).size, 2); @@ -326,7 +326,7 @@ if ('onhashchange' in window) { 261 reagent container("x:point"); 262 int old_size = SIZE(Container_metadata); 263 // scanning repeated address and array types modifying the container precomputes the size of the container -264 reagent r("x:address:array:address:array:point:10"); +264 reagent r("x:address:array:address:array:point:10"); 265 compute_container_sizes(r, ""); 266 CHECK(contains_key(Container_metadata, container.type)); 267 CHECK_EQ(get(Container_metadata, container.type).size, 2); @@ -339,7 +339,7 @@ if ('onhashchange' in window) { 274 reagent container("x:point"); 275 int old_size = SIZE(Container_metadata); 276 // scanning address to array with a typo -277 reagent r("x:address:array:adress:number"); +277 reagent r("x:address:array:adress:number"); 278 compute_container_sizes(r, ""); // should not crash 279 // no non-container types precomputed 280 CHECK_EQ(SIZE(Container_metadata), old_size); @@ -359,11 +359,11 @@ if ('onhashchange' in window) { 294 295 :(scenario index_compound_element) 296 def main [ -297 {1: (array (address number) 3)} <- create-array +297 {1: (array (address number) 3)} <- create-array 298 2:num <- copy 14 299 3:num <- copy 15 300 4:num <- copy 16 -301 5:address:num <- index {1: (array (address number) 3)}, 0 +301 5:address:num <- index {1: (array (address number) 3)}, 0 302 ] 303 +mem: storing 14 in location 5 304 @@ -416,7 +416,7 @@ if ('onhashchange' in window) { 351 reagent/*copy*/ base = current_instruction().ingredients.at(0); 352 // Update INDEX base in Run 353 int base_address = base.value; -354 trace(9998, "run") << "base address is " << base_address << end(); +354 trace(9998, "run") << "base address is " << base_address << end(); 355 if (base_address == 0) { 356 ¦ raise << maybe(current_recipe_name()) << "tried to access location 0 in '" << to_original_string(current_instruction()) << "'\n" << end(); 357 ¦ break; @@ -477,7 +477,7 @@ if ('onhashchange' in window) { 412 put(Memory, 2, 14); 413 put(Memory, 3, 15); 414 put(Memory, 4, 16); -415 reagent x("1:array:address:num"); // 3 types, but not a static array +415 reagent x("1:array:address:num"); // 3 types, but not a static array 416 populate_value(x); 417 CHECK_EQ(array_length(x), 3); 418 } @@ -618,8 +618,8 @@ if ('onhashchange' in window) { 553 ¦ raise << maybe(current_recipe_name()) << "invalid index " << no_scientific(index_val.at(0)) << " in '" << to_original_string(current_instruction()) << "'\n" << end(); 554 ¦ break; 555 } -556 int address = base_address + /*skip length*/1 + index_val.at(0)*size_of(array_element(base.type)); -557 trace(9998, "run") << "address to copy to is " << address << end(); +556 int address = base_address + /*skip length*/1 + index_val.at(0)*size_of(array_element(base.type)); +557 trace(9998, "run") << "address to copy to is " << address << end(); 558 // optimization: directly write the element rather than updating 'product' 559 // and writing the entire array 560 write_products = false; -- cgit 1.4.1-2-gfad0