about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--071scheduler.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/071scheduler.cc b/071scheduler.cc
index c9e81030..b675883c 100644
--- a/071scheduler.cc
+++ b/071scheduler.cc
@@ -537,7 +537,7 @@ int ninstrs;
 :(before "End routine Constructor")
 ninstrs = 0;
 :(after "stop_running_current_routine:")
-Current_routine->ninstrs = ninstrs;
+Current_routine->ninstrs = Current_routine->ninstrs + ninstrs;
 :(before "End Primitive Recipe Declarations")
 NUMBER_OF_INSTRUCTIONS,
 :(before "End Primitive Recipe Numbers")
@@ -590,6 +590,7 @@ def f2 [
 +mem: storing 0 in location 3
 
 :(scenario number_of_instructions)
+% Scheduling_interval = 1;
 def f1 [
   10:number/child-id <- start-running f2
   {
@@ -598,10 +599,13 @@ def f1 [
   11:number <- number-of-instructions 10:number
 ]
 def f2 [
-  # 2 instructions worth of work
-  11:number <- copy 34
+  # 4 instructions worth of work
+  # Should take 2 scheduling intervals
+  1:number <- copy 34
+  2:number <- copy 1
+  2:number <- copy 3
   20:number <- copy 1
 ]
 # f2 runs an extra instruction for the implicit return added by the
 # fill_in_reply_ingredients transform
-+mem: storing 3 in location 11
++mem: storing 5 in location 11
7 18 19 20 21 22 23 24 25 26 27 28 29 30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65