about summary refs log tree commit diff stats
path: root/mu.arc.t
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2014-11-06 11:36:16 -0800
committerKartik K. Agaram <vc@akkartik.com>2014-11-06 11:36:16 -0800
commitfac6a170edcf1ae79ade2d9d8bdcabacacf6b24f (patch)
tree56fcabdd92fcd392819f09e81aed1952da4728e1 /mu.arc.t
parentc6ea9df84135b5accfdaf554c665a8dc49a00e21 (diff)
downloadmu-fac6a170edcf1ae79ade2d9d8bdcabacacf6b24f.tar.gz
233 - start tracking global cycle count
We're gonna need this to implement 'sleep'.
Diffstat (limited to 'mu.arc.t')
-rw-r--r--mu.arc.t18
1 files changed, 11 insertions, 7 deletions
diff --git a/mu.arc.t b/mu.arc.t
index ecfcb643..0438033a 100644
--- a/mu.arc.t
+++ b/mu.arc.t
@@ -831,8 +831,10 @@
       ((1 integer) <- copy (1 literal)))
     (main
       (test1))))
-(if (~is 2 (run 'main))
-  (prn "F - calling a user-defined function runs its instructions exactly once"))
+;? (= dump-trace* (obj whitelist '("run")))
+(run 'main)
+(if (~is 2 curr-cycle*)
+  (prn "F - calling a user-defined function runs its instructions exactly once " curr-cycle*))
 ;? (quit)
 
 ; User-defined functions communicate with their callers through two
@@ -885,8 +887,10 @@
       ((1 integer) <- copy (1 literal))
       ((2 integer) <- copy (3 literal))
       (test1))))
-(if (~is 4 (run 'main))  ; last reply sometimes not counted. worth fixing?
-  (prn "F - 'reply' executes instructions exactly once"))
+;? (= dump-trace* (obj whitelist '("run")))
+(run 'main)
+(if (~is 5 curr-cycle*)
+  (prn "F - 'reply' executes instructions exactly once " curr-cycle*))
 ;? (quit)
 
 (reset)
@@ -1636,9 +1640,9 @@
       ((1 integer) <- copy (3 literal)))
     (f2
       ((2 integer) <- copy (4 literal)))))
-(let ninsts (run 'f1 'f2)
-  (when (~iso 2 ninsts)
-    (prn "F - scheduler didn't run the right number of instructions: " ninsts)))
+(run 'f1 'f2)
+(when (~iso 2 curr-cycle*)
+  (prn "F - scheduler didn't run the right number of instructions: " curr-cycle*))
 (if (~iso memory* (obj 1 3  2 4))
   (prn "F - scheduler runs multiple functions: " memory*))
 (check-trace-contents "scheduler orders functions correctly"