about summary refs log tree commit diff stats
path: root/cpp
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-26 18:17:39 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-26 18:17:39 -0700
commitd72f379919d4956bdda6a682431f422a25ad22c1 (patch)
treeab6b2fa4b87fd8765f1318d0c7e72a05d02f6b47 /cpp
parent7e7493b4bf34a35388fe516e0381cb559590fe3b (diff)
downloadmu-d72f379919d4956bdda6a682431f422a25ad22c1.tar.gz
1202
Diffstat (limited to 'cpp')
-rw-r--r--cpp/035call.cc1
-rw-r--r--cpp/042new.cc13
2 files changed, 6 insertions, 8 deletions
diff --git a/cpp/035call.cc b/cpp/035call.cc
index 0c84056e..75c617a6 100644
--- a/cpp/035call.cc
+++ b/cpp/035call.cc
@@ -50,6 +50,7 @@ struct routine {
 :(code)
 routine::routine(recipe_number r) {
   calls.push(call(r));
+  // End routine Constructor
 }
 
 //:: now update routine's helpers
diff --git a/cpp/042new.cc b/cpp/042new.cc
index ea620b85..e98800a6 100644
--- a/cpp/042new.cc
+++ b/cpp/042new.cc
@@ -18,14 +18,11 @@ Memory_allocated_until = 1000;
 Initial_memory_per_routine = 100000;
 :(before "End routine Fields")
 size_t alloc, alloc_max;
-:(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;
-  alloc_max = Memory_allocated_until;
-  trace("new") << "routine allocated memory from " << alloc << " to " << alloc_max;
-  calls.push(call(r));
-}
+:(before "End routine Constructor")
+alloc = Memory_allocated_until;
+Memory_allocated_until += Initial_memory_per_routine;
+alloc_max = Memory_allocated_until;
+trace("new") << "routine allocated memory from " << alloc << " to " << alloc_max;
 
 //:: First handle 'type' operands.