about summary refs log tree commit diff stats
path: root/042new.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-21 18:57:25 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-21 18:57:25 -0700
commit7feea75b13522c28d168a5200cfb7a89c06ad161 (patch)
tree66163d75c978eb4a13b59962470d3f26e7a7cf29 /042new.cc
parent5feb36ff8f189f5aeedd9ec3c436a3c5d90972ca (diff)
downloadmu-7feea75b13522c28d168a5200cfb7a89c06ad161.tar.gz
1417 - draft zoom levels in traces
Diffstat (limited to '042new.cc')
-rw-r--r--042new.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/042new.cc b/042new.cc
index decb76db..d297196b 100644
--- a/042new.cc
+++ b/042new.cc
@@ -23,7 +23,7 @@ long long int alloc, alloc_max;
 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;
+trace(Primitive_recipe_depth, "new") << "routine allocated memory from " << alloc << " to " << alloc_max;
 
 //:: First handle 'type' operands.
 
@@ -39,7 +39,7 @@ if (inst.operation == Recipe_number["new"]) {
   if (inst.ingredients.at(0).properties.at(0).second.at(0) == "type") {
     inst.ingredients.at(0).set_value(Type_number[inst.ingredients.at(0).name]);
   }
-  trace("new") << inst.ingredients.at(0).name << " -> " << inst.ingredients.at(0).value;
+  trace(Primitive_recipe_depth, "new") << inst.ingredients.at(0).name << " -> " << inst.ingredients.at(0).value;
 }
 
 //:: Now implement the primitive recipe.
@@ -61,7 +61,7 @@ case NEW: {
     if (SIZE(current_instruction().ingredients) > 1) {
       // array
       array_length = ingredients.at(1).at(0);
-      trace("mem") << "array size is " << array_length;
+      trace(Primitive_recipe_depth, "mem") << "array size is " << array_length;
       size = array_length*size_of(type) + /*space for length*/1;
     }
     else {
@@ -73,7 +73,7 @@ case NEW: {
   // really crappy at the moment
   ensure_space(size);
   const long long int result = Current_routine->alloc;
-  trace("mem") << "new alloc: " << result;
+  trace(Primitive_recipe_depth, "mem") << "new alloc: " << result;
   // save result
   products.resize(1);
   products.at(0).push_back(result);
@@ -100,7 +100,7 @@ void ensure_space(long long int size) {
     Current_routine->alloc = Memory_allocated_until;
     Memory_allocated_until += Initial_memory_per_routine;
     Current_routine->alloc_max = Memory_allocated_until;
-    trace("new") << "routine allocated memory from " << Current_routine->alloc << " to " << Current_routine->alloc_max;
+    trace(Primitive_recipe_depth, "new") << "routine allocated memory from " << Current_routine->alloc << " to " << Current_routine->alloc_max;
   }
 }