Convert portions of rustc to istrs. Recover a lot of performance.

Issue #855
This commit is contained in:
Brian Anderson 2011-08-24 22:13:16 -07:00
parent fcc031c5b4
commit b2408d57f0
8 changed files with 66 additions and 60 deletions

View file

@ -1232,7 +1232,8 @@ fn make_generic_glue(cx: &@local_ctxt, sp: &span, t: ty::t, llfn: ValueRef,
let start = time::get_time();
let llval = make_generic_glue_inner(cx, sp, t, llfn, helper, ty_params);
let end = time::get_time();
log_fn_time(cx.ccx, "glue " + name + " " + ty_to_short_str(cx.ccx.tcx, t),
log_fn_time(cx.ccx, "glue " + name + " " +
istr::to_estr(ty_to_short_str(cx.ccx.tcx, t)),
start, end);
ret llval;
}

View file

@ -223,7 +223,7 @@ type ctxt =
freevars: freevars::freevar_map,
tcache: type_cache,
rcache: creader_cache,
short_names_cache: hashmap<t, str>,
short_names_cache: hashmap<t, @istr>,
has_pointer_cache: hashmap<t, bool>,
kind_cache: hashmap<t, ast::kind>,
owns_heap_mem_cache: hashmap<t, bool>,