about summary refs log tree commit diff
path: root/src/comp
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2011-04-27 16:03:45 +0000
committerGraydon Hoare <graydon@mozilla.com>2011-04-27 16:03:45 +0000
commit031e86ca2d3f070d22d6efbebe42e75d606503b3 (patch)
tree004103c331f451734e3548d654572fefc79130c9 /src/comp
parent05587ebdff53def560e04e853fbb3c272fa586d6 (diff)
downloadrust-031e86ca2d3f070d22d6efbebe42e75d606503b3.tar.gz
rust-031e86ca2d3f070d22d6efbebe42e75d606503b3.zip
Partly disable simplified-type glue optimization due to compile-time cost.
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/middle/trans.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index f789a216c17..bddcf272417 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -1617,14 +1617,24 @@ fn get_static_tydesc(&@block_ctxt cx,
             ret info;
         }
         case (none[@tydesc_info]) {
+
+            // FIXME: Use of a simplified tydesc (w/o names) removes a lot of
+            // generated glue, but the compile time goes way down due to
+            // greatly increasing the miss rate on the type_of cache elsewhere
+            // in this file. Experiment with other approaches to this.
+
+            /*
             fn simplifier(ty.t typ) -> ty.t {
                 ret @rec(cname=none[str] with *typ);
             }
             auto f = simplifier;
             auto t_simplified = ty.fold_ty(cx.fcx.lcx.ccx.tcx, f, t);
             auto info = declare_tydesc(cx.fcx.lcx, t_simplified);
-            cx.fcx.lcx.ccx.tydescs.insert(t, info);
             cx.fcx.lcx.ccx.tydescs.insert(t_simplified, info);
+            */
+
+            auto info = declare_tydesc(cx.fcx.lcx, t);
+            cx.fcx.lcx.ccx.tydescs.insert(t, info);
             define_tydesc(cx.fcx.lcx, t, ty_params);
             ret info;
         }