about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2014-11-22 00:58:13 -0800
committerKartik K. Agaram <vc@akkartik.com>2014-11-22 00:58:45 -0800
commitd5bb1bfb19ebfe1e852c0e76b991feaf61c6436f (patch)
tree8f123e3eb1646d7050dbcfbe1588d3fd0ff46743
parenteb965a17f4c6220d4fdd97c4b35e2f2b895d5873 (diff)
downloadmu-d5bb1bfb19ebfe1e852c0e76b991feaf61c6436f.tar.gz
296 - finally, shared a channel between routines
Was already working, test was just stale. Reassuring.
-rw-r--r--mu.arc4
-rw-r--r--mu.arc.t4
2 files changed, 4 insertions, 4 deletions
diff --git a/mu.arc b/mu.arc
index a9072859..97fa06d3 100644
--- a/mu.arc
+++ b/mu.arc
@@ -85,7 +85,7 @@
   (= traces* (queue)))
 
 (def new-trace (filename)
-  (prn "new-trace " filename)
+;?   (prn "new-trace " filename)
   (= curr-trace-file* filename))
 
 (= dump-trace* nil)
@@ -362,7 +362,7 @@
       (assert n "setm: can't compute type of @loc")
       (assert addr "setm: null pointer @loc")
       (if (is 1 n)
-        (do (assert (~isa val 'record) "setm: record of size 1 @val")
+        (do (assert (~isa val 'record) "setm: record of size 1 @(tostring prn.val)")
             (trace "setm" loc ": setting " addr " to " val)
             (= (memory* addr) val))
         (do (assert (isa val 'record) "setm: non-record of size >1 @val")
diff --git a/mu.arc.t b/mu.arc.t
index 50ec12ff..58292570 100644
--- a/mu.arc.t
+++ b/mu.arc.t
@@ -2325,7 +2325,7 @@
       ((default-scope scope-address) <- new (scope literal) (30 literal))
       ((chan channel-address) <- new-channel (3 literal))
       (fork (f2 fn) (chan channel-address))
-      ((1 integer global) <- read (chan channel-address)))
+      ((1 tagged-value global) <- read (chan channel-address)))
     (f2
       ((default-scope scope-address) <- new (scope literal) (30 literal))
       ((n integer-address) <- new (integer literal))
@@ -2340,7 +2340,7 @@
 ;? (prn memory*)
 (each routine completed-routines*
   (aif rep.routine!error (prn "error - " it)))
-(if (~is 24 memory*.1)
+(if (~is 24 (memory* memory*.2))  ; location 1 contains tagged-value *x above
   (prn "F - channels are meant to be shared between routines"))
 ;? (quit)