diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-11-05 14:13:26 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-11-05 14:13:26 -0800 |
commit | 8389d168e4e6eada19462cf70249c45508fd1f4d (patch) | |
tree | 29de397dd65b71181af8313f6bdf6b6b4fd5668b | |
parent | 356c966dc6de9d7a9306eb9da1b731d061331e5d (diff) | |
download | mu-8389d168e4e6eada19462cf70249c45508fd1f4d.tar.gz |
2373 - bad bug: instruction was losing /lookup
-rw-r--r-- | 012transform.cc | 4 | ||||
-rw-r--r-- | 030container.cc | 4 | ||||
-rw-r--r-- | 031address.cc | 12 |
3 files changed, 18 insertions, 2 deletions
diff --git a/012transform.cc b/012transform.cc index 1dedc93c..a45077ab 100644 --- a/012transform.cc +++ b/012transform.cc @@ -32,6 +32,10 @@ vector<transform_fn> Transform; void transform_all() { trace(9990, "transform") << "=== transform_all()" << end(); for (long long int t = 0; t < SIZE(Transform); ++t) { +//? if (Recipe_ordinal.find("delete-sandbox") != Recipe_ordinal.end() +//? && Recipe.find(Recipe_ordinal["delete-sandbox"]) != Recipe.end() +//? && !Recipe[Recipe_ordinal["delete-sandbox"]].steps.empty()) +//? cerr << "transform " << t << ": " << Recipe[Recipe_ordinal["delete-sandbox"]].steps.at(14).products.at(0).to_string() << '\n'; //? cerr << "transform " << t << '\n'; for (map<recipe_ordinal, recipe>::iterator p = Recipe.begin(); p != Recipe.end(); ++p) { recipe& r = p->second; diff --git a/030container.cc b/030container.cc index 03af439c..9fde367e 100644 --- a/030container.cc +++ b/030container.cc @@ -131,7 +131,7 @@ case GET: { raise_error << maybe(Recipe[r].name) << "'get' expects exactly 2 ingredients in '" << inst.to_string() << "'\n" << end(); break; } - reagent base = inst.ingredients.at(0); + reagent base = inst.ingredients.at(0); // new copy for every invocation // Update GET base in Check if (!base.type || !base.type->value || Type[base.type->value].kind != CONTAINER) { raise_error << maybe(Recipe[r].name) << "first ingredient of 'get' should be a container, but got " << inst.ingredients.at(0).original_string << '\n' << end(); @@ -152,7 +152,7 @@ case GET: { raise_error << maybe(Recipe[r].name) << "invalid offset " << offset_value << " for " << Type[base_type].name << '\n' << end(); break; } - reagent& product = inst.products.at(0); + reagent product = inst.products.at(0); // Update GET product in Check const reagent element = element_type(base, offset_value); if (!types_match(product, element)) { diff --git a/031address.cc b/031address.cc index 813f0464..2478de03 100644 --- a/031address.cc +++ b/031address.cc @@ -114,6 +114,16 @@ recipe main [ ] +mem: storing 34 in location 4 +:(scenario get_indirect2) +recipe main [ + 1:number <- copy 2 + 2:number <- copy 34 + 3:number <- copy 35 + 4:address:number <- copy 5/raw + *4:address:number <- get 1:address:point/lookup, 0:offset +] ++mem: storing 34 in location 5 + :(scenario include_nonlookup_properties) recipe main [ 1:number <- copy 2 @@ -155,6 +165,7 @@ recipe main [ 2:number <- copy 34 3:number <- copy *1:address:number ] ++parse: ingredient: {"1": <"address" : <"number" : <>>>, "lookup": <>} +mem: storing 34 in location 3 :(before "End Parsing reagent") @@ -165,6 +176,7 @@ recipe main [ } if (name.empty()) raise_error << "illegal name " << original_string << '\n' << end(); + properties.at(0).first = name; } //:: helpers for debugging |