about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Sullivan <sully@msully.net>2012-06-11 12:52:49 -0700
committerMichael Sullivan <sully@msully.net>2012-06-11 12:52:49 -0700
commitbaf58a764b4cc5ffc3de7bf43b549a4cc59a57a4 (patch)
tree8790e954a83d7d7337d8616fca583256b590614c
parent665ba3531d60d26a0f582693255629040313d29d (diff)
downloadrust-baf58a764b4cc5ffc3de7bf43b549a4cc59a57a4.tar.gz
rust-baf58a764b4cc5ffc3de7bf43b549a4cc59a57a4.zip
Stop emitting type parameters in shape.rs.
-rw-r--r--src/rustc/middle/trans/shape.rs25
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
       }