about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2014-12-17 23:14:58 -0800
committerKartik K. Agaram <vc@akkartik.com>2014-12-17 23:14:58 -0800
commit4fc54b3d98023d36387f009de23f9ea03a68d939 (patch)
tree4e1aaafa7e03618451b1ac3c1aa758490fe78408
parent63892e6e03bf4a4836a017b987e2e208f608bd60 (diff)
downloadmu-4fc54b3d98023d36387f009de23f9ea03a68d939.tar.gz
440
-rw-r--r--mu.arc8
1 files changed, 6 insertions, 2 deletions
diff --git a/mu.arc b/mu.arc
index 5bf196ec..72d47469 100644
--- a/mu.arc
+++ b/mu.arc
@@ -315,6 +315,10 @@
 (def not-raw-string (operand)
   (~isa operand 'string))
 
+(def address? (operand)
+  (or (is ty.operand.0 'location)
+      typeinfo.operand!address))
+
 ($:require "charterm/main.rkt")
 
 ; run instructions from 'routine*' for 'time-slice'
@@ -456,7 +460,7 @@
                   (sizeof `((_ ,(m arg.0))))
                 length
                   (let base arg.0
-                    (if (or typeinfo.base!array typeinfo.base!address)
+                    (if (or typeinfo.base!array address?.base)
                       array-len.base
                       -1))
 
@@ -709,7 +713,7 @@
 
 (def deref (operand)
   (assert (pos '(deref) metadata.operand))
-  (assert typeinfo.operand!address)
+  (assert address?.operand)
   (cons `(,(memory* v.operand) ,@typeinfo.operand!elem)
         (drop-one '(deref) metadata.operand)))