diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-03 11:42:50 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-03 11:42:50 -0700 |
commit | 4b79c627c226bc64f271c31531c805cd6875c8ca (patch) | |
tree | 14a4aed8fc49613700b5d48f1874becb2408218e /cpp/027space | |
parent | 48e1071c5a03746f63d726a21da636b64821819a (diff) | |
download | mu-4b79c627c226bc64f271c31531c805cd6875c8ca.tar.gz |
1009
Diffstat (limited to 'cpp/027space')
-rw-r--r-- | cpp/027space | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/cpp/027space b/cpp/027space index 07ac5aa6..fed15bf6 100644 --- a/cpp/027space +++ b/cpp/027space @@ -13,6 +13,19 @@ recipe main [ ] +mem: storing 23 in location 12 +:(scenario "deref_sidesteps_default_space") +recipe main [ + # pretend pointer from outside + 7:integer <- copy 34:literal + # pretend array + 10:integer <- copy 5:literal + # actual start of this function + default-space:address:space <- copy 10:literal + 1:address:integer <- copy 7:literal + 8:integer/raw <- copy 1:address:integer/deref +] ++mem: storing 34 in location 8 + :(before "End Call Fields") size_t default_space; :(replace "call(recipe_number r) :running_recipe(r)") @@ -22,7 +35,8 @@ 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'; //? 1 +//? cout << "absolutize " << x.to_string() << '\n'; //? 2 +//? 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); @@ -33,7 +47,10 @@ reagent absolutize(reagent x) { assert(is_raw(r)); return r; } +:(before "return result" following "reagent deref(reagent x)") +result.properties.push_back(pair<string, vector<string> >("raw", vector<string>())); +:(code) int space(const reagent& x) { return Current_routine.calls.top().default_space; } |