diff options
| author | Michael Sullivan <sully@msully.net> | 2012-06-11 12:52:49 -0700 |
|---|---|---|
| committer | Michael Sullivan <sully@msully.net> | 2012-06-11 12:52:49 -0700 |
| commit | baf58a764b4cc5ffc3de7bf43b549a4cc59a57a4 (patch) | |
| tree | 8790e954a83d7d7337d8616fca583256b590614c | |
| parent | 665ba3531d60d26a0f582693255629040313d29d (diff) | |
| download | rust-baf58a764b4cc5ffc3de7bf43b549a4cc59a57a4.tar.gz rust-baf58a764b4cc5ffc3de7bf43b549a4cc59a57a4.zip | |
Stop emitting type parameters in shape.rs.
| -rw-r--r-- | src/rustc/middle/trans/shape.rs | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/rustc/middle/trans/shape.rs b/src/rustc/middle/trans/shape.rs index c5404a40196..d727ad3dfc4 100644 --- a/src/rustc/middle/trans/shape.rs +++ b/src/rustc/middle/trans/shape.rs @@ -249,16 +249,10 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> [u8] { } add_u16(s, id as u16); - // Hack: always encode 0 tps, since we will encode - // a monomorpized version + // Hack: always encode 0 tps, since the shape glue format + // hasn't changed since we started monomorphizing. add_u16(s, 0_u16); - // add_u16(s, vec::len(tps) as u16); - // for vec::each(tps) {|tp| - // let subshape = shape_of(ccx, tp, ty_param_map); - // add_u16(s, vec::len(subshape) as u16); - // s += subshape; - // } s } } @@ -345,10 +339,10 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> [u8] { let ri = @{did: dtor_did, tps: tps}; let id = interner::intern(ccx.shape_cx.resources, ri); add_u16(s, id as u16); - add_u16(s, vec::len(tps) as u16); - for vec::each(tps) {|tp| - add_substr(s, shape_of(ccx, tp)); - } + + // Hack: always encode 0 tps, since the shape glue format + // hasn't changed since we started monomorphizing. + add_u16(s, 0_u16); }; for ty::class_items_as_mutable_fields(ccx.tcx, did, substs).each {|f| sub += shape_of(ccx, f.mt.ty); @@ -374,10 +368,9 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> [u8] { let mut s = [shape_res]; add_u16(s, id as u16); - add_u16(s, vec::len(tps) as u16); - for vec::each(tps) {|tp| - add_substr(s, shape_of(ccx, tp)); - } + // Hack: always encode 0 tps, since the shape glue format + // hasn't changed since we started monomorphizing. + add_u16(s, 0_u16); add_substr(s, shape_of(ccx, subt)); s } |
