diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2014-12-30 14:37:04 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2014-12-30 14:37:04 -0800 |
commit | 1f00ad3730efb3c48126d13be6243ca3af8db804 (patch) | |
tree | e090550c28c6db9e9c2e1613ccbf3c7cb5ead8ee | |
parent | 9c729fb4464d1eab956fc20bb2717381a1409e16 (diff) | |
download | mu-1f00ad3730efb3c48126d13be6243ca3af8db804.tar.gz |
464 - reply broken in channel 'write'
How did this work until now? The reply was being treated as a label, and if 'write' returned nothing it would still work fine because the output is already present, and a missing 'reply' leaves oargs as-is. Should we do something to catch this? Perhaps we should track args modified and check that there are oargs for them. But that seems quite heavyweight.. Maybe we should clear oargs when missing a 'reply'?
-rw-r--r-- | mu.arc | 2 | ||||
-rw-r--r-- | mu.arc.t | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/mu.arc b/mu.arc index c53a6ccd..6299e054 100644 --- a/mu.arc +++ b/mu.arc @@ -1307,7 +1307,7 @@ (break-if remaining?:boolean) (free:integer-address/deref <- copy 0:literal) } - reply:chan:channel-address/deref) + (reply chan:channel-address/deref)) (init-fn read (default-scope:scope-address <- new scope:literal 30:literal) diff --git a/mu.arc.t b/mu.arc.t index b1d6937b..b6f11a1e 100644 --- a/mu.arc.t +++ b/mu.arc.t @@ -2731,10 +2731,14 @@ (5:integer <- get 1:channel-address/deref first-full:offset) (6:integer <- get 1:channel-address/deref first-free:offset) ]))) +;? (prn function*!write) ;? (set dump-trace*) ;? (= dump-trace* (obj blacklist '("sz" "m" "setm" "addr" "array-len" "cvt0" "cvt1"))) ;? (= dump-trace* (obj whitelist '("jump"))) +;? (= dump-trace* (obj whitelist '("run" "reply"))) (run 'main) +(each routine completed-routines* + (aif rep.routine!error (prn "error - " it))) ;? (prn canon.memory*) (if (or (~is 0 memory*.5) (~is 1 memory*.6)) |