From 104e521c04d1a0cad9c68fb11e250e12ad8917ef Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Wed, 17 Oct 2018 07:08:47 -0700 Subject: 4709 --- html/035lookup.cc.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'html/035lookup.cc.html') diff --git a/html/035lookup.cc.html b/html/035lookup.cc.html index 1bf9d7e2..97957855 100644 --- a/html/035lookup.cc.html +++ b/html/035lookup.cc.html @@ -137,13 +137,13 @@ if ('onhashchange' in window) { 72 73 void lookup_memory(reagent& x) { 74 if (!x.type || x.type->atom || x.type->left->value != Address_type_ordinal) { - 75 raise << maybe(current_recipe_name()) << "tried to lookup '" << x.original_string << "' but it isn't an address\n" << end(); + 75 raise << maybe(current_recipe_name()) << "tried to lookup '" << x.original_string << "' but it isn't an address\n" << end(); 76 dump_callstack(); 77 return; 78 } 79 // compute value 80 if (x.value == 0) { - 81 raise << maybe(current_recipe_name()) << "tried to lookup 0\n" << end(); + 81 raise << maybe(current_recipe_name()) << "tried to lookup 0\n" << end(); 82 dump_callstack(); 83 return; 84 } @@ -153,15 +153,15 @@ if ('onhashchange' in window) { 88 void lookup_memory_core(reagent& x, bool check_for_null) { 89 double address = x.value + /*skip alloc id in address*/1; 90 double new_value = get_or_insert(Memory, address); - 91 trace("mem") << "location " << address << " contains " << no_scientific(new_value) << end(); + 91 trace("mem") << "location " << address << " contains " << no_scientific(new_value) << end(); 92 // check for null 93 if (check_for_null && new_value == 0) { 94 if (Current_routine) { - 95 raise << maybe(current_recipe_name()) << "tried to lookup 0 in '" << to_original_string(current_instruction()) << "'\n" << end(); + 95 raise << maybe(current_recipe_name()) << "tried to lookup 0 in '" << to_original_string(current_instruction()) << "'\n" << end(); 96 dump_callstack(); 97 } 98 else { - 99 raise << "tried to lookup 0\n" << end(); + 99 raise << "tried to lookup 0\n" << end(); 100 } 101 } 102 // validate alloc-id @@ -169,7 +169,7 @@ if ('onhashchange' in window) { 104 double alloc_id_in_payload = get_or_insert(Memory, new_value); 105 //? cerr << x.value << ": " << alloc_id_in_address << " vs " << new_value << ": " << alloc_id_in_payload << '\n'; 106 if (alloc_id_in_address != alloc_id_in_payload) { -107 raise << maybe(current_recipe_name()) << "address is already abandoned in '" << to_original_string(current_instruction()) << "'\n" << end(); +107 raise << maybe(current_recipe_name()) << "address is already abandoned in '" << to_original_string(current_instruction()) << "'\n" << end(); 108 dump_callstack(); 109 } 110 // all well; complete the lookup @@ -216,7 +216,7 @@ if ('onhashchange' in window) { 151 bool canonize_type(reagent& r) { 152 while (has_property(r, "lookup")) { 153 if (!r.type || r.type->atom || !r.type->left || !r.type->left->atom || r.type->left->value != Address_type_ordinal) { -154 raise << "cannot perform lookup on '" << r.name << "' because it has non-address type " << to_string(r.type) << '\n' << end(); +154 raise << "cannot perform lookup on '" << r.name << "' because it has non-address type " << to_string(r.type) << '\n' << end(); 155 return false; 156 } 157 drop_from_type(r, "address"); @@ -226,7 +226,7 @@ if ('onhashchange' in window) { 161 } 162 163 void drop_one_lookup(reagent& r) { -164 for (vector<pair<string, string_tree*> >::iterator p = r.properties.begin(); p != r.properties.end(); ++p) { +164 for (vector<pair<string, string_tree*> >::iterator p = r.properties.begin(); p != r.properties.end(); ++p) { 165 if (p->first == "lookup") { 166 r.properties.erase(p); 167 return; @@ -317,7 +317,7 @@ if ('onhashchange' in window) { 252 reagent/*copy*/ i = inst.ingredients.at(0); 253 if (!canonize_type(i)) break; // error raised elsewhere 254 if (!types_strictly_match(p, i)) { -255 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(); +255 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(); 256 break; 257 } 258 @@ -432,7 +432,7 @@ if ('onhashchange' in window) { 367 reagent/*copy*/ i = inst.ingredients.at(0); 368 if (!canonize_type(i)) break; // error raised elsewhere 369 if (!types_strictly_match(p, i)) { -370 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(); +370 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(); 371 break; 372 } 373 @@ -561,7 +561,7 @@ if ('onhashchange' in window) { 496 properties.push_back(pair<string, string_tree*>("lookup", NULL)); 497 } 498 if (name.empty()) -499 raise << "illegal name '" << original_string << "'\n" << end(); +499 raise << "illegal name '" << original_string << "'\n" << end(); 500 } 501 502 //:: helpers for debugging -- cgit 1.4.1-2-gfad0