diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-14 17:46:43 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-14 17:46:43 -0700 |
commit | e05847550c276debb831eb4853474b0da38614ef (patch) | |
tree | 2825eb7d50600b267731b6832fca0d61759c834d /cpp/027space | |
parent | 6d6b656fa939e6af886f14d37736f3215a8694fc (diff) | |
download | mu-e05847550c276debb831eb4853474b0da38614ef.tar.gz |
1061
Diffstat (limited to 'cpp/027space')
-rw-r--r-- | cpp/027space | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cpp/027space b/cpp/027space index 7794db23..9d3ef572 100644 --- a/cpp/027space +++ b/cpp/027space @@ -71,3 +71,17 @@ int address(int offset, int base) { //? cout << "AAA " << Current_routine.calls.top().default_space << '\n'; //? 1 return; } + +:(scenario "get_default_space") +recipe main [ + default-space:address:space <- copy 10:literal + 1:integer/raw <- copy default-space:address:space +] ++mem: storing 10 in location 1 + +:(after "vector<int> read_memory(reagent x)") + if (x.name == "default-space") { + vector<int> result; + result.push_back(Current_routine.calls.top().default_space); + return result; + } |