diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-03-29 10:21:15 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-03-29 23:20:02 -0700 |
commit | 2f5f7919fd29ff05a8f182d3cb1aa9d168b58b66 (patch) | |
tree | 278fdbfdd7ec8f928ba15a24bc5b99cd4df63371 /cpp/028space_surround | |
parent | 9c5d8413de6a6c8763446f96ce89197a80c514ba (diff) | |
download | mu-2f5f7919fd29ff05a8f182d3cb1aa9d168b58b66.tar.gz |
994 - spaces now check bounds
I'm not testing for bounds-check errors yet, though.
Diffstat (limited to 'cpp/028space_surround')
-rw-r--r-- | cpp/028space_surround | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cpp/028space_surround b/cpp/028space_surround index 9899ed89..7126911d 100644 --- a/cpp/028space_surround +++ b/cpp/028space_surround @@ -7,16 +7,18 @@ :(scenario "surrounding_space") # location 1 in space 1 refers to the space surrounding the default space, here 20. recipe main [ + 10:integer <- copy 5:literal # pretend array + 20:integer <- copy 5:literal # pretend array default-space:address:space <- copy 10:literal 0:address:space <- copy 20:literal 1:integer <- copy 32:literal 1:integer/space:1 <- copy 33:literal ] -+run: instruction main/1 ++run: instruction main/3 +mem: storing 20 in location 11 -+run: instruction main/2 ++run: instruction main/4 +mem: storing 32 in location 12 -+run: instruction main/3 ++run: instruction main/5 +mem: storing 33 in location 22 //: If you think of a space as a collection of variables with a common |