about summary refs log tree commit diff stats
path: root/036refcount.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-05-26 21:13:24 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-05-26 21:13:24 -0700
commit2b4bf8a800858d0e2209cd753b0ad1e95a4dfc1f (patch)
tree4000d5d9eafb59c3713c33e37941b96d871da13e /036refcount.cc
parenta0decd22b6534663818c1780b1726d59cbe615c2 (diff)
downloadmu-2b4bf8a800858d0e2209cd753b0ad1e95a4dfc1f.tar.gz
3018
Diffstat (limited to '036refcount.cc')
-rw-r--r--036refcount.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/036refcount.cc b/036refcount.cc
index 53ccbd91..ca790bb5 100644
--- a/036refcount.cc
+++ b/036refcount.cc
@@ -134,15 +134,12 @@ if (is_mu_address(element))
 :(scenario refcounts_put_index)
 def main [
   1:address:number <- new number:type
-  # fake array because we can't yet create an array of addresses (wait for the
-  # support for dilated reagents and parsing more complex type trees)
-  1003:number/raw <- copy 3  # skip refcount at 1002
-  2:address:array:address:number <- copy 1002/unsafe
+  2:address:array:address:number <- new {(address number): type}, 3
   *2:address:array:address:number <- put-index *2:address:array:address:number, 0, 1:address:number
 ]
 +run: {1: ("address" "number")} <- new {number: "type"}
 +mem: incrementing refcount of 1000: 0 -> 1
-+run: {2: ("address" "array" "address" "number")} <- copy {1002: "literal", "unsafe": ()}
++run: {2: ("address" "array" "address" "number")} <- new {(address number): "type"}, {3: "literal"}
 +mem: incrementing refcount of 1002: 0 -> 1
 +run: {2: ("address" "array" "address" "number"), "lookup": ()} <- put-index {2: ("address" "array" "address" "number"), "lookup": ()}, {0: "literal"}, {1: ("address" "number")}
 # put-index increments refcount