From d72f379919d4956bdda6a682431f422a25ad22c1 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 26 Apr 2015 18:17:39 -0700 Subject: 1202 --- cpp/035call.cc | 1 + cpp/042new.cc | 13 +++++-------- 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. -- cgit 1.4.1-2-gfad0