about summary refs log tree commit diff stats
path: root/030container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-09-07 11:12:48 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-09-07 11:12:48 -0700
commit32d4af5458a97152f19b97af664cf22599e1b3fd (patch)
tree8c18ec415fe06a198da33158f5ad016f568bd9c6 /030container.cc
parentf46dbde539abbe34a5d29288e9114a911cb72bd6 (diff)
downloadmu-32d4af5458a97152f19b97af664cf22599e1b3fd.tar.gz
3304
Highlight a couple of places where it turns out that we're flying by the
seat of our pants with heuristics, and we don't really understand how to
precompute metadata for a program's types.
Diffstat (limited to '030container.cc')
-rw-r--r--030container.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/030container.cc b/030container.cc
index ac78a103..a1499a8b 100644
--- a/030container.cc
+++ b/030container.cc
@@ -165,8 +165,7 @@ if (t.kind == CONTAINER) {
 
 //: precompute Container_metadata before we need size_of
 //: also store a copy in each reagent in each instruction in each recipe
-//: does unnecessary work for meaningless types
-//:   e.g. (address number) also computes size of 'address'
+//: sometimes does unnecessary work for meaningless types
 
 :(after "Begin Instruction Modifying Transforms")  // needs to happen before transform_names, therefore after Type Modifying Transforms below
 Transform.push_back(compute_container_sizes);
@@ -197,7 +196,8 @@ void compute_container_sizes(const type_tree* type, set<type_ordinal>& pending_m
   if (contains_key(pending_metadata, type->value)) return;
   if (type->value) pending_metadata.insert(type->value);
   if (contains_key(Container_metadata, type)) return;
-  if (type->left) compute_container_sizes(type->left, pending_metadata);
+  // might be needed by later layers, but we haven't found a need for it yet
+//?   if (type->left) compute_container_sizes(type->left, pending_metadata);
   if (type->right) compute_container_sizes(type->right, pending_metadata);
   if (!contains_key(Type, type->value)) return;  // error raised elsewhere
   type_info& info = get(Type, type->value);