Partly disable simplified-type glue optimization due to compile-time cost.
This commit is contained in:
parent
05587ebdff
commit
031e86ca2d
1 changed files with 11 additions and 1 deletions
|
@ -1617,14 +1617,24 @@ fn get_static_tydesc(&@block_ctxt cx,
|
||||||
ret info;
|
ret info;
|
||||||
}
|
}
|
||||||
case (none[@tydesc_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 {
|
fn simplifier(ty.t typ) -> ty.t {
|
||||||
ret @rec(cname=none[str] with *typ);
|
ret @rec(cname=none[str] with *typ);
|
||||||
}
|
}
|
||||||
auto f = simplifier;
|
auto f = simplifier;
|
||||||
auto t_simplified = ty.fold_ty(cx.fcx.lcx.ccx.tcx, f, t);
|
auto t_simplified = ty.fold_ty(cx.fcx.lcx.ccx.tcx, f, t);
|
||||||
auto info = declare_tydesc(cx.fcx.lcx, t_simplified);
|
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);
|
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);
|
define_tydesc(cx.fcx.lcx, t, ty_params);
|
||||||
ret info;
|
ret info;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue