From 9e751bb8c0cdf771d34c839cb6591d892b8e62de Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 7 Mar 2017 01:41:48 -0800 Subject: 3761 --- html/035lookup.cc.html | 71 +++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 35 deletions(-) (limited to 'html/035lookup.cc.html') diff --git a/html/035lookup.cc.html b/html/035lookup.cc.html index 42ea2b90..7ba368f8 100644 --- a/html/035lookup.cc.html +++ b/html/035lookup.cc.html @@ -16,17 +16,18 @@ a { text-decoration: none; } a:hover { text-decoration: underline; } * { font-size: 12pt; font-size: 1em; } .Constant { color: #00a0a0; } -.traceAbsent { color: #c00000; } -.Special { color: #c00000; } -.SalientComment { color: #00ffff; } .muRecipe { color: #ff8700; } -.cSpecial { color: #008000; } +.Conceal { color: #4e4e4e; } +.SalientComment { color: #00ffff; } +.Special { color: #c00000; } .Comment { color: #9090ff; } .Delimiter { color: #800080; } .LineNr { color: #444444; } -.traceContains { color: #008000; } -.Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } .Identifier { color: #c0a020; } +.traceAbsent { color: #c00000; } +.Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } +.cSpecial { color: #008000; } +.traceContains { color: #008000; } --> @@ -144,18 +145,18 @@ if ('onhashchange' in window) { 81 if (is_literal(x)) return; 82 // End canonize(x) Special-cases 83 while (has_property(x, "lookup")) - 84 lookup_memory(x); + 84 ¦ lookup_memory(x); 85 } 86 87 void lookup_memory(reagent& x) { 88 if (!x.type || x.type->atom || x.type->left->value != get(Type_ordinal, "address")) { - 89 raise << maybe(current_recipe_name()) << "tried to /lookup '" << x.original_string << "' but it isn't an address\n" << end(); - 90 return; + 89 ¦ raise << maybe(current_recipe_name()) << "tried to /lookup '" << x.original_string << "' but it isn't an address\n" << end(); + 90 ¦ return; 91 } 92 // compute value 93 if (x.value == 0) { - 94 raise << maybe(current_recipe_name()) << "tried to /lookup 0\n" << end(); - 95 return; + 94 ¦ raise << maybe(current_recipe_name()) << "tried to /lookup 0\n" << end(); + 95 ¦ return; 96 } 97 lookup_memory_core(x, /*check_for_null*/true); 98 } @@ -166,14 +167,14 @@ if ('onhashchange' in window) { 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(); -107 x.set_value(x.value+1); // skip refcount +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 << "tried to /lookup 0 in '" << to_original_string(current_instruction()) << "'\n" << end(); -112 else -113 raise << "tried to /lookup 0\n" << end(); +110 ¦ if (Current_routine) +111 ¦ ¦ raise << "tried to /lookup 0 in '" << to_original_string(current_instruction()) << "'\n" << end(); +112 ¦ else +113 ¦ ¦ raise << "tried to /lookup 0\n" << end(); 114 } 115 drop_one_lookup(x); 116 } @@ -236,22 +237,22 @@ if ('onhashchange' in window) { 173 :(code) 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 << "can't lookup non-address: '" << to_string(r) << "': '" << to_string(r.type) << "'\n" << end(); -178 return false; -179 } -180 drop_from_type(r, "address"); -181 drop_one_lookup(r); +176 ¦ if (!r.type || r.type->atom || !r.type->left || !r.type->left->atom || r.type->left->value != get(Type_ordinal, "address")) { +177 ¦ ¦ raise << "can't lookup non-address: '" << to_string(r) << "': '" << to_string(r.type) << "'\n" << end(); +178 ¦ ¦ return false; +179 ¦ } +180 ¦ drop_from_type(r, "address"); +181 ¦ drop_one_lookup(r); 182 } 183 return true; 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) { -188 if (p->first == "lookup") { -189 r.properties.erase(p); -190 return; -191 } +188 ¦ if (p->first == "lookup") { +189 ¦ ¦ r.properties.erase(p); +190 ¦ ¦ return; +191 ¦ } 192 } 193 assert(false); 194 } @@ -559,11 +560,11 @@ if ('onhashchange' in window) { 496 :(before "End Parsing reagent") 497 { 498 while (starts_with(name, "*")) { -499 name.erase(0, 1); -500 properties.push_back(pair<string, string_tree*>("lookup", NULL)); +499 ¦ name.erase(0, 1); +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 @@ -591,13 +592,13 @@ if ('onhashchange' in window) { 528 :(before "End Primitive Recipe Implementations") 529 case _BAR: { 530 if (current_instruction().ingredients.empty()) { -531 if (Bar != -1) cerr << Bar << ": " << no_scientific(get_or_insert(Memory, Bar)) << '\n'; -532 else cerr << '\n'; +531 ¦ if (Bar != -1) cerr << Bar << ": " << no_scientific(get_or_insert(Memory, Bar)) << '\n'; +532 ¦ else cerr << '\n'; 533 } 534 else { -535 reagent/*copy*/ tmp = current_instruction().ingredients.at(0); -536 canonize(tmp); -537 Bar = tmp.value; +535 ¦ reagent/*copy*/ tmp = current_instruction().ingredients.at(0); +536 ¦ canonize(tmp); +537 ¦ Bar = tmp.value; 538 } 539 break; 540 } -- cgit 1.4.1-2-gfad0