about summary refs log tree commit diff stats
path: root/032array.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-22 11:51:36 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-22 11:51:36 -0800
commit7136ddd5ac12d3aa4d516f719dea37a027a25b5a (patch)
treec11e4ba47269076b39a96905b9d03b0765f639c4 /032array.cc
parentaff93bb2c1ea1a96fc110fad8b2dd84e0673f87f (diff)
downloadmu-7136ddd5ac12d3aa4d516f719dea37a027a25b5a.tar.gz
2473 - bad idea to use /raw with multiple intentions
/raw is to express absolute addresses
/unsafe is to sidestep type-checking in test setup
Diffstat (limited to '032array.cc')
-rw-r--r--032array.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/032array.cc b/032array.cc
index ac883490..81bfbe18 100644
--- a/032array.cc
+++ b/032array.cc
@@ -85,7 +85,7 @@ recipe main [
   2:number <- copy 14
   3:number <- copy 15
   4:number <- copy 16
-  5:address:array:number <- copy 1/raw
+  5:address:array:number <- copy 1/unsafe
   6:array:number <- copy *5:address:array:number
 ]
 +mem: storing 3 in location 6
@@ -204,7 +204,7 @@ recipe main [
   2:number <- copy 14
   3:number <- copy 15
   4:number <- copy 16
-  5:address:array:number <- copy 1/raw
+  5:address:array:number <- copy 1/unsafe
   6:number <- index *5:address:array:number, 1
 ]
 +mem: storing 15 in location 6
@@ -234,7 +234,7 @@ recipe main [
   5:number <- copy 14
   6:number <- copy 15
   7:number <- copy 16
-  8:address:array:point <- copy 1/raw
+  8:address:array:point <- copy 1/unsafe
   index *8:address:array:point, -1
 ]
 +error: main: invalid index -1
@@ -249,7 +249,7 @@ recipe main [
   5:number <- copy 14
   6:number <- copy 15
   7:number <- copy 16
-  8:address:array:point <- copy 1/raw
+  8:address:array:point <- copy 1/unsafe
   9:number <- index *8:address:array:point, 0
 ]
 +error: main: 'index' on *8:address:array:point can't be saved in 9:number; type should be point
@@ -354,7 +354,7 @@ recipe main [
   5:number <- copy 14
   6:number <- copy 15
   7:number <- copy 16
-  8:address:array:point <- copy 1/raw
+  8:address:array:point <- copy 1/unsafe
   index-address *8:address:array:point, -1
 ]
 +error: main: invalid index -1
@@ -369,7 +369,7 @@ recipe main [
   5:number <- copy 14
   6:number <- copy 15
   7:number <- copy 16
-  8:address:array:point <- copy 1/raw
+  8:address:array:point <- copy 1/unsafe
   9:address:number <- index-address *8:address:array:point, 0
 ]
 +error: main: 'index' on *8:address:array:point can't be saved in 9:address:number; type should be <address : <point : <>>>