From 1c2d788b454670bf8fa1cb65c6251a8ff6ddcaf7 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 19 Jun 2017 11:29:20 -0700 Subject: 3927 --- html/035lookup.cc.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'html/035lookup.cc.html') diff --git a/html/035lookup.cc.html b/html/035lookup.cc.html index 1bd371f3..edf376fb 100644 --- a/html/035lookup.cc.html +++ b/html/035lookup.cc.html @@ -156,7 +156,7 @@ if ('onhashchange' in window) { 91 } 92 // compute value 93 if (x.value == 0) { - 94 ¦ raise << maybe(current_recipe_name()) << "tried to /lookup 0\n" << end(); + 94 ¦ raise << maybe(current_recipe_name()) << "tried to /lookup 0\n" << end(); 95 ¦ return; 96 } 97 lookup_memory_core(x, /*check_for_null*/true); @@ -164,18 +164,18 @@ if ('onhashchange' in window) { 99 100 void lookup_memory_core(reagent& x, bool check_for_null) { 101 if (x.value == 0) return; -102 trace(9999, "mem") << "location " << x.value << " is " << no_scientific(get_or_insert(Memory, x.value)) << end(); +102 trace(9999, "mem") << "location " << x.value << " is " << no_scientific(get_or_insert(Memory, x.value)) << end(); 103 x.set_value(get_or_insert(Memory, x.value)); 104 drop_from_type(x, "address"); 105 if (x.value) { -106 ¦ trace(9999, "mem") << "skipping refcount at " << x.value << end(); +106 ¦ trace(9999, "mem") << "skipping refcount at " << x.value << end(); 107 ¦ x.set_value(x.value+1); // skip refcount 108 } 109 else if (check_for_null) { 110 ¦ if (Current_routine) -111 ¦ ¦ raise << maybe(current_recipe_name()) << "tried to /lookup 0 in '" << to_original_string(current_instruction()) << "'\n" << end(); +111 ¦ ¦ raise << maybe(current_recipe_name()) << "tried to /lookup 0 in '" << to_original_string(current_instruction()) << "'\n" << end(); 112 ¦ else -113 ¦ ¦ raise << "tried to /lookup 0\n" << end(); +113 ¦ ¦ raise << "tried to /lookup 0\n" << end(); 114 } 115 drop_one_lookup(x); 116 } @@ -185,7 +185,7 @@ if ('onhashchange' in window) { 120 x.set_value(34); // unsafe 121 put(Memory, 34, 1000); 122 lookup_memory(x); -123 CHECK_TRACE_CONTENTS("mem: skipping refcount at 1000"); +123 CHECK_TRACE_CONTENTS("mem: skipping refcount at 1000"); 124 CHECK_EQ(x.value, 1001); 125 } 126 @@ -195,7 +195,7 @@ if ('onhashchange' in window) { 130 x.set_value(34); // unsafe 131 put(Memory, 34, 0); 132 lookup_memory(x); -133 CHECK_TRACE_DOESNT_CONTAIN("mem: skipping refcount at 0"); +133 CHECK_TRACE_DOESNT_CONTAIN("mem: skipping refcount at 0"); 134 CHECK_EQ(x.value, 0); 135 } 136 @@ -239,7 +239,7 @@ if ('onhashchange' in window) { 174 bool canonize_type(reagent& r) { 175 while (has_property(r, "lookup")) { 176 ¦ if (!r.type || r.type->atom || !r.type->left || !r.type->left->atom || r.type->left->value != get(Type_ordinal, "address")) { -177 ¦ ¦ raise << "cannot perform lookup on '" << r.name << "' because it has non-address type " << to_string(r.type) << '\n' << end(); +177 ¦ ¦ raise << "cannot perform lookup on '" << r.name << "' because it has non-address type " << to_string(r.type) << '\n' << end(); 178 ¦ ¦ return false; 179 ¦ } 180 ¦ drop_from_type(r, "address"); @@ -249,7 +249,7 @@ if ('onhashchange' in window) { 184 } 185 186 void drop_one_lookup(reagent& r) { -187 for (vector<pair<string, string_tree*> >::iterator p = r.properties.begin(); p != r.properties.end(); ++p) { +187 for (vector<pair<string, string_tree*> >::iterator p = r.properties.begin(); p != r.properties.end(); ++p) { 188 ¦ if (p->first == "lookup") { 189 ¦ ¦ r.properties.erase(p); 190 ¦ ¦ return; @@ -334,7 +334,7 @@ if ('onhashchange' in window) { 269 reagent/*copy*/ i = inst.ingredients.at(0); 270 if (!canonize_type(i)) break; // error raised elsewhere 271 if (!types_strictly_match(p, i)) { -272 raise << maybe(get(Recipe, r).name) << "product of 'put' must be first ingredient '" << inst.ingredients.at(0).original_string << "', but got '" << inst.products.at(0).original_string << "'\n" << end(); +272 raise << maybe(get(Recipe, r).name) << "product of 'put' must be first ingredient '" << inst.ingredients.at(0).original_string << "', but got '" << inst.products.at(0).original_string << "'\n" << end(); 273 break; 274 } 275 @@ -444,7 +444,7 @@ if ('onhashchange' in window) { 379 reagent/*copy*/ i = inst.ingredients.at(0); 380 if (!canonize_type(i)) break; // error raised elsewhere 381 if (!types_strictly_match(p, i)) { -382 raise << maybe(get(Recipe, r).name) << "product of 'put-index' must be first ingredient '" << inst.ingredients.at(0).original_string << "', but got '" << inst.products.at(0).original_string << "'\n" << end(); +382 raise << maybe(get(Recipe, r).name) << "product of 'put-index' must be first ingredient '" << inst.ingredients.at(0).original_string << "', but got '" << inst.products.at(0).original_string << "'\n" << end(); 383 break; 384 } 385 @@ -565,7 +565,7 @@ if ('onhashchange' in window) { 500 ¦ properties.push_back(pair<string, string_tree*>("lookup", NULL)); 501 } 502 if (name.empty()) -503 ¦ raise << "illegal name '" << original_string << "'\n" << end(); +503 ¦ raise << "illegal name '" << original_string << "'\n" << end(); 504 } 505 506 //:: helpers for debugging -- cgit 1.4.1-2-gfad0