about summary refs log tree commit diff stats
path: root/032array.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-01-20 20:47:54 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-01-20 20:47:54 -0800
commit263e6b2a9f35d977d8e2ca883432c6743a4b7711 (patch)
tree5a25feb442f38d5fd0588ac2e1058cf8749aee66 /032array.cc
parentbd6134610c2ab2742f2fc4159b6e9a99e85d183f (diff)
downloadmu-263e6b2a9f35d977d8e2ca883432c6743a4b7711.tar.gz
2581 - make space for the refcount in address:shared
We don't yet actually maintain the refcount. That's next.

Hardest part of this was debugging the assume-console scenarios in layer
85. That took some detailed manual diffing of traces (because the output
of diff was no good).

New tracing added in this commit add 8% to .traces LoC. Commented out
trace() calls (used during debugging) make that 45%.
Diffstat (limited to '032array.cc')
-rw-r--r--032array.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/032array.cc b/032array.cc
index dbc6a4dc..f2eacb03 100644
--- a/032array.cc
+++ b/032array.cc
@@ -112,7 +112,7 @@ if (r.type && r.type->value == get(Type_ordinal, "array")) {
     raise_error << maybe(current_recipe_name()) << "'" << r.original_string << "' is an array of what?\n" << end();
     return 1;
   }
-  // skip the 'array' type to get at the element type
+//?   trace(9999, "mem") << "computing size of array starting at " << r.value << end();
   return 1 + get_or_insert(Memory, r.value)*size_of(array_element(r.type));
 }
 
@@ -171,6 +171,7 @@ case INDEX: {
   reagent base = current_instruction().ingredients.at(0);
   canonize(base);
   long long int base_address = base.value;
+  trace(9998, "run") << "base address is " << base_address << end();
   if (base_address == 0) {
     raise_error << maybe(current_recipe_name()) << "tried to access location 0 in '" << current_instruction().to_string() << "'\n" << end();
     break;