diff options
Diffstat (limited to 'cpp/027space')
-rw-r--r-- | cpp/027space | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cpp/027space b/cpp/027space index 2a845015..1bb91b8e 100644 --- a/cpp/027space +++ b/cpp/027space @@ -35,13 +35,15 @@ call(recipe_number r) :running_recipe(r), pc(0), next_ingredient_to_process(0), reagent r = absolutize(x); :(code) reagent absolutize(reagent x) { -//? cout << "absolutize " << x.to_string() << '\n'; //? 2 +//? if (Recipe_number.find("increment-counter") != Recipe_number.end()) //? 1 +//? cout << "AAA " << "increment-counter/2: " << Recipe[Recipe_number["increment-counter"]].steps[2].products[0].to_string() << '\n'; //? 1 +//? cout << "absolutize " << x.to_string() << '\n'; //? 3 //? cout << is_raw(x) << '\n'; //? 1 if (is_raw(x) || is_dummy(x)) return x; //? cout << "not raw: " << x.to_string() << '\n'; //? 1 assert(x.initialized); reagent r = x; - r.set_value(address(r.value, space(r))); + r.set_value(address(r.value, space_base(r))); //? cout << "after absolutize: " << r.value << '\n'; //? 1 r.properties.push_back(pair<string, vector<string> >("raw", vector<string>())); assert(is_raw(r)); @@ -51,12 +53,13 @@ reagent absolutize(reagent x) { result.properties.push_back(pair<string, vector<string> >("raw", vector<string>())); :(code) -int space(const reagent& x) { +int space_base(const reagent& x) { return Current_routine->calls.top().default_space; } int address(int offset, int base) { if (base == 0) return offset; // raw +//? cout << base << '\n'; //? 1 if (offset >= Memory[base]) { // todo: test raise << "location " << offset << " is out of bounds " << Memory[base] << '\n'; |