aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-04-27 16:03:45 +0000
committerGraydon Hoare <[email protected]>2011-04-27 16:03:45 +0000
commit031e86ca2d3f070d22d6efbebe42e75d606503b3 (patch)
tree004103c331f451734e3548d654572fefc79130c9
parentrustc: Ignore the return value of native functions that return nil. stage1 ca... (diff)
downloadrust-031e86ca2d3f070d22d6efbebe42e75d606503b3.tar.xz
rust-031e86ca2d3f070d22d6efbebe42e75d606503b3.zip
Partly disable simplified-type glue optimization due to compile-time cost.
-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 f789a216..bddcf272 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;
}