From 69d95127b03ba92be03ed42beeab099dbcc808b9 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 19 Apr 2015 00:21:24 -0700 Subject: 1101 --- cpp/043space | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cpp/043space') diff --git a/cpp/043space b/cpp/043space index c285f65f..cc9c161e 100644 --- a/cpp/043space +++ b/cpp/043space @@ -8,7 +8,7 @@ # then location 0 is really location 11, location 1 is really location 12, and so on. recipe main [ 10:integer <- copy 5:literal # pretend array; in practice we'll use new - default-space:address:space <- copy 10:literal + default-space:address:array:location <- copy 10:literal 1:integer <- copy 23:literal ] +mem: storing 23 in location 12 @@ -20,7 +20,7 @@ recipe main [ # pretend array 1000:integer <- copy 5:literal # actual start of this function - default-space:address:space <- copy 1000:literal + default-space:address:array:location <- copy 1000:literal 1:address:integer <- copy 3:literal 8:integer/raw <- copy 1:address:integer/deref ] @@ -62,7 +62,7 @@ recipe main [ # pretend array 1000:integer <- copy 5:literal # actual start of this function - default-space:address:space <- copy 1000:literal + default-space:address:array:location <- copy 1000:literal 1:address:point <- copy 12:literal 9:integer/raw <- get 1:address:point/deref, 1:offset ] @@ -82,7 +82,7 @@ recipe main [ # pretend array 1000:integer <- copy 5:literal # actual start of this function - default-space:address:space <- copy 1000:literal + default-space:address:array:location <- copy 1000:literal 1:address:array:integer <- copy 12:literal 9:integer/raw <- index 1:address:array:integer/deref, 1:literal ] @@ -118,8 +118,8 @@ int address(int offset, int base) { :(scenario "get_default_space") recipe main [ - default-space:address:space <- copy 10:literal - 1:integer/raw <- copy default-space:address:space + default-space:address:array:location <- copy 10:literal + 1:integer/raw <- copy default-space:address:array:location ] +mem: storing 10 in location 1 -- cgit 1.4.1-2-gfad0 cb3e26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26