about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-06-07 21:28:45 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-06-07 21:28:45 -0700
commitb9a78a84cfee93db9f5bc59dfda135f43e38a9b3 (patch)
tree901d3556dcfa13a81d57728a552f6d9a0577f4e4
parent5a6645bc94aecb0b907a961c724dfcc9b76b37b7 (diff)
downloadmu-b9a78a84cfee93db9f5bc59dfda135f43e38a9b3.tar.gz
3037
By disabling lookups on the product of 'create-array', I'd messed it up
so we were treating the product as a raw address and ignoring
default-space. Just remove that exception.
-rw-r--r--035lookup.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/035lookup.cc b/035lookup.cc
index e56078bc..bab280b6 100644
--- a/035lookup.cc
+++ b/035lookup.cc
@@ -261,14 +261,18 @@ def main [
 +mem: storing 15 in location 4
 +mem: storing 16 in location 5
 
-:(before "Update CREATE_ARRAY product in Check")
-// 'create-array' does not support indirection. Static arrays are meant to be
-// allocated on the 'stack'.
-assert(!has_property(product, "lookup"));
-:(before "Update CREATE_ARRAY product in Run")
-// 'create-array' does not support indirection. Static arrays are meant to be
-// allocated on the 'stack'.
-assert(!has_property(product, "lookup"));
+:(scenario create_array_indirect)
+def main [
+  1000:number/raw <- copy 1  # pretend refcount
+  1:address:array:number:3 <- copy 1000/unsafe  # pretend allocation
+  1:address:array:number:3/lookup <- create-array
+]
++mem: storing 3 in location 1001
+
+:(after "Update CREATE_ARRAY product in Check")
+if (!canonize_type(product)) break;
+:(after "Update CREATE_ARRAY product in Run")
+canonize(product);
 
 :(scenario index_indirect)
 def main [