From a802f0cedc7b5580d746f46ae62fcf8074ae3c49 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 2 Mar 2017 04:41:24 -0800 Subject: 3749 --- html/045closure_name.cc.html | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'html/045closure_name.cc.html') diff --git a/html/045closure_name.cc.html b/html/045closure_name.cc.html index 7d769d25..1e73dd3d 100644 --- a/html/045closure_name.cc.html +++ b/html/045closure_name.cc.html @@ -98,7 +98,7 @@ if ('onhashchange' in window) { 37 38 :(code) 39 void collect_surrounding_spaces(const recipe_ordinal r) { - 40 trace(9991, "transform") << "--- collect surrounding spaces for recipe " << get(Recipe, r).name << end(); + 40 trace(9991, "transform") << "--- collect surrounding spaces for recipe " << get(Recipe, r).name << end(); 41 for (int i = 0; i < SIZE(get(Recipe, r).steps); ++i) { 42 const instruction& inst = get(Recipe, r).steps.at(i); 43 if (inst.is_label) continue; @@ -106,28 +106,28 @@ if ('onhashchange' in window) { 45 if (is_literal(inst.products.at(j))) continue; 46 if (inst.products.at(j).name != "0") continue; 47 if (!is_space(inst.products.at(j))) { - 48 raise << "slot 0 should always have type address:array:location, but is '" << to_string(inst.products.at(j)) << "'\n" << end(); + 48 raise << "slot 0 should always have type address:array:location, but is '" << to_string(inst.products.at(j)) << "'\n" << end(); 49 continue; 50 } 51 string_tree* s = property(inst.products.at(j), "names"); 52 if (!s) { - 53 raise << "slot 0 requires a /names property in recipe '" << get(Recipe, r).name << "'\n" << end(); + 53 raise << "slot 0 requires a /names property in recipe '" << get(Recipe, r).name << "'\n" << end(); 54 continue; 55 } - 56 if (!s->atom) raise << "slot 0 should have a single value in /names, but got '" << to_string(inst.products.at(j)) << "'\n" << end(); + 56 if (!s->atom) raise << "slot 0 should have a single value in /names, but got '" << to_string(inst.products.at(j)) << "'\n" << end(); 57 const string& surrounding_recipe_name = s->value; 58 if (surrounding_recipe_name.empty()) { - 59 raise << "slot 0 doesn't initialize its /names property in recipe '" << get(Recipe, r).name << "'\n" << end(); + 59 raise << "slot 0 doesn't initialize its /names property in recipe '" << get(Recipe, r).name << "'\n" << end(); 60 continue; 61 } 62 if (contains_key(Surrounding_space, r) 63 && get(Surrounding_space, r) != get(Recipe_ordinal, surrounding_recipe_name)) { - 64 raise << "recipe '" << get(Recipe, r).name << "' can have only one 'surrounding' recipe but has '" << get(Recipe, get(Surrounding_space, r)).name << "' and '" << surrounding_recipe_name << "'\n" << end(); + 64 raise << "recipe '" << get(Recipe, r).name << "' can have only one 'surrounding' recipe but has '" << get(Recipe, get(Surrounding_space, r)).name << "' and '" << surrounding_recipe_name << "'\n" << end(); 65 continue; 66 } - 67 trace(9993, "name") << "lexically surrounding space for recipe " << get(Recipe, r).name << " comes from " << surrounding_recipe_name << end(); + 67 trace(9993, "name") << "lexically surrounding space for recipe " << get(Recipe, r).name << " comes from " << surrounding_recipe_name << end(); 68 if (!contains_key(Recipe_ordinal, surrounding_recipe_name)) { - 69 raise << "can't find recipe providing surrounding space for '" << get(Recipe, r).name << "'; looking for '" << surrounding_recipe_name << "'\n" << end(); + 69 raise << "can't find recipe providing surrounding space for '" << get(Recipe, r).name << "'; looking for '" << surrounding_recipe_name << "'\n" << end(); 70 continue; 71 } 72 put(Surrounding_space, r, get(Recipe_ordinal, surrounding_recipe_name)); @@ -141,11 +141,11 @@ if ('onhashchange' in window) { 80 :(replace{} "int lookup_name(const reagent& r, const recipe_ordinal default_recipe)") 81 int lookup_name(const reagent& x, const recipe_ordinal default_recipe) { 82 if (!has_property(x, "space")) { - 83 if (Name[default_recipe].empty()) raise << "name not found: " << x.name << '\n' << end(); + 83 if (Name[default_recipe].empty()) raise << "name not found: " << x.name << '\n' << end(); 84 return Name[default_recipe][x.name]; 85 } 86 string_tree* p = property(x, "space"); - 87 if (!p || !p->atom) raise << "/space property should have exactly one (non-negative integer) value\n" << end(); + 87 if (!p || !p->atom) raise << "/space property should have exactly one (non-negative integer) value\n" << end(); 88 int n = to_integer(p->value); 89 assert(n >= 0); 90 recipe_ordinal surrounding_recipe = lookup_surrounding_recipe(default_recipe, n); @@ -160,11 +160,11 @@ if ('onhashchange' in window) { 99 int lookup_name(const reagent& x, const recipe_ordinal r, set<recipe_ordinal>& done, vector<recipe_ordinal>& path) { 100 if (!Name[r].empty()) return Name[r][x.name]; 101 if (contains_key(done, r)) { -102 raise << "can't compute address of '" << to_string(x) << "' because\n" << end(); +102 raise << "can't compute address of '" << to_string(x) << "' because\n" << end(); 103 for (int i = 1; i < SIZE(path); ++i) { -104 raise << path.at(i-1) << " requires computing names of " << path.at(i) << '\n' << end(); +104 raise << path.at(i-1) << " requires computing names of " << path.at(i) << '\n' << end(); 105 } -106 raise << path.at(SIZE(path)-1) << " requires computing names of " << r << "..ad infinitum\n" << end(); +106 raise << path.at(SIZE(path)-1) << " requires computing names of " << r << "..ad infinitum\n" << end(); 107 return -1; 108 } 109 done.insert(r); @@ -177,7 +177,7 @@ if ('onhashchange' in window) { 116 recipe_ordinal lookup_surrounding_recipe(const recipe_ordinal r, int n) { 117 if (n == 0) return r; 118 if (!contains_key(Surrounding_space, r)) { -119 raise << "don't know surrounding recipe of '" << get(Recipe, r).name << "'\n" << end(); +119 raise << "don't know surrounding recipe of '" << get(Recipe, r).name << "'\n" << end(); 120 return -1; 121 } 122 assert(contains_key(Surrounding_space, r)); @@ -190,7 +190,7 @@ if ('onhashchange' in window) { 129 if (has_property(r, "space")) { 130 string_tree* p = property(r, "space"); 131 if (!p || !p->atom) { -132 raise << "/space property should have exactly one (non-negative integer) value in '" << r.original_string << "'\n" << end(); +132 raise << "/space property should have exactly one (non-negative integer) value in '" << r.original_string << "'\n" << end(); 133 return false; 134 } 135 if (p->value != "0") return true; -- cgit 1.4.1-2-gfad0