about summary refs log tree commit diff stats
path: root/mu.arc
diff options
context:
space:
mode:
Diffstat (limited to 'mu.arc')
-rw-r--r--mu.arc7
1 files changed, 7 insertions, 0 deletions
diff --git a/mu.arc b/mu.arc
index 0e80fff7..975c23f8 100644
--- a/mu.arc
+++ b/mu.arc
@@ -321,9 +321,11 @@
                 get-address
                   (with (base arg.0
                          idx (v arg.1))
+                    (trace "get-address" base "." idx)
                     (when typeinfo.base!address
                       (assert (pos 'deref metadata.base))
                       (= base (list (memory* v.base) typeinfo.base!elem)))
+                    (trace "get-address" "after: " base)
                     (if typeinfo.base!record
                       (do (assert (< -1 idx (len typeinfo.base!elems)))
                           (+ v.base
@@ -581,6 +583,11 @@
   ((locaddr location deref) <- arg)
   (reply (result tagged-value-address)))
 
+(init-fn list-value-address
+  ((base list-address) <- arg)
+  ((result tagged-value-address) <- get-address (base list-address deref) (0 offset))
+  (reply (result tagged-value-address)))
+
 ; drop all traces while processing above functions
 (on-init
   (= traces* (queue)))