Skip to content

Commit 442a372

Browse files
committed
---
yaml --- r: 10434 b: refs/heads/snap-stage3 c: baf58a7 h: refs/heads/master v: v3
1 parent 2ce7b04 commit 442a372

File tree

2 files changed

+10
-17
lines changed

2 files changed

+10
-17
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 665ba3531d60d26a0f582693255629040313d29d
4+
refs/heads/snap-stage3: baf58a764b4cc5ffc3de7bf43b549a4cc59a57a4
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/snap-stage3/src/rustc/middle/trans/shape.rs

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -249,16 +249,10 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> [u8] {
249249
}
250250
add_u16(s, id as u16);
251251

252-
// Hack: always encode 0 tps, since we will encode
253-
// a monomorpized version
252+
// Hack: always encode 0 tps, since the shape glue format
253+
// hasn't changed since we started monomorphizing.
254254
add_u16(s, 0_u16);
255255

256-
// add_u16(s, vec::len(tps) as u16);
257-
// for vec::each(tps) {|tp|
258-
// let subshape = shape_of(ccx, tp, ty_param_map);
259-
// add_u16(s, vec::len(subshape) as u16);
260-
// s += subshape;
261-
// }
262256
s
263257
}
264258
}
@@ -345,10 +339,10 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> [u8] {
345339
let ri = @{did: dtor_did, tps: tps};
346340
let id = interner::intern(ccx.shape_cx.resources, ri);
347341
add_u16(s, id as u16);
348-
add_u16(s, vec::len(tps) as u16);
349-
for vec::each(tps) {|tp|
350-
add_substr(s, shape_of(ccx, tp));
351-
}
342+
343+
// Hack: always encode 0 tps, since the shape glue format
344+
// hasn't changed since we started monomorphizing.
345+
add_u16(s, 0_u16);
352346
};
353347
for ty::class_items_as_mutable_fields(ccx.tcx, did, substs).each {|f|
354348
sub += shape_of(ccx, f.mt.ty);
@@ -374,10 +368,9 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t) -> [u8] {
374368

375369
let mut s = [shape_res];
376370
add_u16(s, id as u16);
377-
add_u16(s, vec::len(tps) as u16);
378-
for vec::each(tps) {|tp|
379-
add_substr(s, shape_of(ccx, tp));
380-
}
371+
// Hack: always encode 0 tps, since the shape glue format
372+
// hasn't changed since we started monomorphizing.
373+
add_u16(s, 0_u16);
381374
add_substr(s, shape_of(ccx, subt));
382375
s
383376
}

0 commit comments

Comments
 (0)