diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-08-25 14:20:21 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-08-25 14:21:05 -0700 |
| commit | 8bd019bdc868e9d563aa72acbb0307deaeca919f (patch) | |
| tree | deadfaf2682bb480816d56526d7113a7be7ea3e2 /src/comp | |
| parent | 608f7ccded67fd65d5e12ef2c0601170fb3345ed (diff) | |
| download | rust-8bd019bdc868e9d563aa72acbb0307deaeca919f.tar.gz rust-8bd019bdc868e9d563aa72acbb0307deaeca919f.zip | |
rt: Remember the number of captured type descriptors for objects in the type descriptor crate cache
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/middle/trans.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index e4a35a8d6b6..bae944659d9 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -958,10 +958,13 @@ fn get_derived_tydesc(cx: &@block_ctxt, t: ty::t, escapes: bool, // If the tydesc escapes in this context, the cached derived // tydesc also has to be one that was marked as escaping. - if !(escapes && !info.escapes) { ret rslt(cx, info.lltydesc); } + if !(escapes && !info.escapes) && storage == tps_normal { + ret rslt(cx, info.lltydesc); + } } none. {/* fall through */ } } + bcx_ccx(cx).stats.n_derived_tydescs += 1u; let bcx = new_raw_block_ctxt(cx.fcx, cx.fcx.llderivedtydescs); let tys = linearize_ty_params(bcx, t); |
