about summary refs log tree commit diff stats
path: root/046global.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-04-24 11:54:30 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-04-24 11:54:30 -0700
commitb0bf5321de2ba32f3b92c2faf6b7b68a06b6b432 (patch)
tree9e0473bddd0d9a2d4aec7ac58dec8d85c2833a5d /046global.cc
parent15936c91a9f8023dc868a021029f84b45aa50176 (diff)
downloadmu-b0bf5321de2ba32f3b92c2faf6b7b68a06b6b432.tar.gz
2864 - replace all address:shared with just address
Now that we no longer have non-shared addresses, we can just always
track refcounts for all addresses.

Phew!
Diffstat (limited to '046global.cc')
-rw-r--r--046global.cc20
1 files changed, 9 insertions, 11 deletions
diff --git a/046global.cc b/046global.cc
index 0a5878cf..40cef9d8 100644
--- a/046global.cc
+++ b/046global.cc
@@ -11,15 +11,15 @@
 
 :(scenario global_space)
 def main [
-  # pretend shared:array:location; in practice we'll use new
+  # pretend address:array:location; in practice we'll use new
   10:number <- copy 0  # refcount
   11:number <- copy 5  # length
-  # pretend shared:array:location; in practice we'll use new
+  # pretend address:array:location; in practice we'll use new
   20:number <- copy 0  # refcount
   21:number <- copy 5  # length
   # actual start of this recipe
-  global-space:address:shared:array:location <- copy 20/unsafe
-  default-space:address:shared:array:location <- copy 10/unsafe
+  global-space:address:array:location <- copy 20/unsafe
+  default-space:address:array:location <- copy 10/unsafe
   1:number <- copy 23
   1:number/space:global <- copy 24
 ]
@@ -46,13 +46,11 @@ global_space = 0;
         || !x.type
         || x.type->value != get(Type_ordinal, "address")
         || !x.type->right
-        || x.type->right->value != get(Type_ordinal, "shared")
+        || x.type->right->value != get(Type_ordinal, "array")
         || !x.type->right->right
-        || x.type->right->right->value != get(Type_ordinal, "array")
-        || !x.type->right->right->right
-        || x.type->right->right->right->value != get(Type_ordinal, "location")
-        || x.type->right->right->right->right) {
-      raise << maybe(current_recipe_name()) << "'global-space' should be of type address:shared:array:location, but tried to write " << to_string(data) << '\n' << end();
+        || x.type->right->right->value != get(Type_ordinal, "location")
+        || x.type->right->right->right) {
+      raise << maybe(current_recipe_name()) << "'global-space' should be of type address:array:location, but tried to write " << to_string(data) << '\n' << end();
     }
     if (Current_routine->global_space)
       raise << "routine already has a global-space; you can't over-write your globals" << end();
@@ -73,7 +71,7 @@ global_space = 0;
 
 :(scenario global_space_with_names)
 def main [
-  global-space:address:shared:array:location <- new location:type, 10
+  global-space:address:array:location <- new location:type, 10
   x:number <- copy 23
   1:number/space:global <- copy 24
 ]