@@ -57,17 +57,13 @@ const shape_res: u8 = 20u8;
57
57
const shape_var: u8 = 21u8 ;
58
58
const shape_uniq: u8 = 22u8 ;
59
59
const shape_opaque_closure_ptr: u8 = 23u8 ; // the closure itself.
60
- const shape_iface: u8 = 24u8 ;
61
60
const shape_uniq_fn: u8 = 25u8 ;
62
61
const shape_stack_fn: u8 = 26u8 ;
63
62
const shape_bare_fn: u8 = 27u8 ;
64
63
const shape_tydesc: u8 = 28u8 ;
65
64
const shape_send_tydesc: u8 = 29u8 ;
66
65
const shape_class: u8 = 30u8 ;
67
66
68
- // FIXME: This is a bad API in trans_common.
69
- fn C_u8 ( n : u8 ) -> ValueRef { ret trans:: common:: C_u8 ( n as uint ) ; }
70
-
71
67
fn hash_res_info ( ri : res_info ) -> uint {
72
68
let h = 5381 u;
73
69
h *= 33 u;
@@ -404,7 +400,7 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t, ty_param_map: [uint]) -> [u8] {
404
400
}
405
401
add_substr ( s, sub) ;
406
402
}
407
- ty:: ty_iface ( _, _) { s += [ shape_iface ] ; }
403
+ ty:: ty_iface ( _, _) { s += [ shape_box_fn ] ; }
408
404
ty:: ty_class ( _, _) { s += [ shape_class] ; }
409
405
ty:: ty_res ( did, raw_subt, tps) {
410
406
let subt = ty:: substitute_type_params ( ccx. tcx , tps, raw_subt) ;
@@ -720,7 +716,7 @@ fn dynamic_metrics(cx: @block_ctxt, t: ty::t) -> metrics {
720
716
721
717
alt ty:: get ( t) . struct {
722
718
ty:: ty_param ( p, _) {
723
- let ti = none :: < @ tydesc_info > ;
719
+ let ti = none;
724
720
let { bcx, val: tydesc } = base:: get_tydesc ( cx, t, false , ti) . result ;
725
721
let szptr = GEPi ( bcx, tydesc, [ 0 , abi:: tydesc_field_size] ) ;
726
722
let aptr = GEPi ( bcx, tydesc, [ 0 , abi:: tydesc_field_align] ) ;
@@ -783,7 +779,7 @@ fn dynamic_metrics(cx: @block_ctxt, t: ty::t) -> metrics {
783
779
fn simplify_type ( ccx : @crate_ctxt , typ : ty:: t ) -> ty:: t {
784
780
fn simplifier ( ccx : @crate_ctxt , typ : ty:: t ) -> ty:: t {
785
781
alt ty:: get ( typ) . struct {
786
- ty:: ty_box ( _) | ty:: ty_iface ( _ , _ ) {
782
+ ty:: ty_box ( _) | ty:: ty_opaque_box {
787
783
ret ty:: mk_imm_box ( ccx. tcx , ty:: mk_nil ( ccx. tcx ) ) ;
788
784
}
789
785
ty:: ty_uniq ( _) {
0 commit comments