about summary refs log tree commit diff stats
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/042new.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/cpp/042new.cc b/cpp/042new.cc
index d268e6ca..01536689 100644
--- a/cpp/042new.cc
+++ b/cpp/042new.cc
@@ -12,12 +12,16 @@ recipe main [
 
 :(before "End Globals")
 size_t Memory_allocated_until = 1000;
+size_t Initial_memory_per_routine = 100000;
 :(before "End Setup")
 Memory_allocated_until = 1000;
+Initial_memory_per_routine = 100000;
 :(before "End routine Fields")
 size_t alloc;
 :(replace{} "routine::routine(recipe_number r)")
 routine::routine(recipe_number r) :alloc(Memory_allocated_until) {
+  alloc = Memory_allocated_until;
+  Memory_allocated_until += Initial_memory_per_routine;
   calls.push(call(r));
 }
 
@@ -117,10 +121,3 @@ recipe f2 [
   3:boolean <- equal 1:address:integer, 2:address:integer
 ]
 +mem: storing 0 in location 3
-
-:(before "End Globals")
-size_t Initial_memory_per_routine = 100000;
-:(before "End Setup")
-Initial_memory_per_routine = 100000;
-:(after "routine::routine(recipe_number r)")
-  Memory_allocated_until += Initial_memory_per_routine;
1d3efbcfc3cd2e8d852ec196930ebace91ad'>b0c11d3ef ^
0761b449e ^
2df9b442c ^
b0c11d3ef ^
0761b449e ^


a27eb5153 ^
0761b449e ^
2df9b442c ^
e25474154 ^

e3f53409f ^
f44a4362b ^

ce23b814a ^
e25474154 ^
b731e6ef1 ^
0761b449e ^




b731e6ef1 ^
0761b449e ^

92b8fac94 ^

0761b449e ^


92b8fac94 ^
0761b449e ^

b731e6ef1 ^
e25474154 ^
a1f677980 ^
0761b449e ^

92b8fac94 ^
0761b449e ^

73c6efdf6 ^
92b8fac94 ^
e25474154 ^
e3f53409f ^






55c78af9c ^








e3f53409f ^














ce23b814a ^












5cd933a44 ^
2df9b442c ^
ce23b814a ^


f317807a8 ^

ce23b814a ^





f317807a8 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123