about summary refs log tree commit diff stats
path: root/mu.arc.t
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-01-10 13:07:36 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-01-10 13:07:36 -0800
commitc23d31cd60be98fd795546c83d5ca0c82029c932 (patch)
tree29e97732e16f9a1c1b0d29d640f2dd484336701f /mu.arc.t
parent163ede5294b70969129ca8441d0ac24c0bad5576 (diff)
downloadmu-c23d31cd60be98fd795546c83d5ca0c82029c932.tar.gz
524
Diffstat (limited to 'mu.arc.t')
-rw-r--r--mu.arc.t28
1 files changed, 14 insertions, 14 deletions
diff --git a/mu.arc.t b/mu.arc.t
index 3cc99e18..ab015c42 100644
--- a/mu.arc.t
+++ b/mu.arc.t
@@ -2778,25 +2778,25 @@
 (new-trace "fork")
 (add-code
   '((function f1 [
-      (fork f2:fn)
+      (1:integer <- copy 4:literal)
      ])
-    (function f2 [
-      (2:integer <- copy 4:literal)
+    (function main [
+      (fork f1:fn)
      ])))
-(run 'f1)
-(if (~iso memory*.2 4)
+(run 'main)
+(if (~iso memory*.1 4)
   (prn "F - fork works"))
 
 (reset)
 (new-trace "fork-with-args")
 (add-code
   '((function f1 [
-      (fork f2:fn nil:literal/globals nil:literal/limit 4:literal)
-     ])
-    (function f2 [
       (2:integer <- next-input)
+     ])
+    (function main [
+      (fork f1:fn nil:literal/globals nil:literal/limit 4:literal)
      ])))
-(run 'f1)
+(run 'main)
 (if (~iso memory*.2 4)
   (prn "F - fork can pass args"))
 
@@ -2804,15 +2804,15 @@
 (new-trace "fork-copies-args")
 (add-code
   '((function f1 [
+      (2:integer <- next-input)
+     ])
+    (function main [
       (default-space:space-address <- new space:literal 5:literal)
       (x:integer <- copy 4:literal)
-      (fork f2:fn nil:literal/globals nil:literal/limit x:integer)
+      (fork f1:fn nil:literal/globals nil:literal/limit x:integer)
       (x:integer <- copy 0:literal)  ; should be ignored
-     ])
-    (function f2 [
-      (2:integer <- next-input)
      ])))
-(run 'f1)
+(run 'main)
 (if (~iso memory*.2 4)
   (prn "F - fork passes args by value"))