@@ -139,8 +139,7 @@ fn type_of(cx: @crate_ctxt, t: ty::t) -> TypeRef {
139
139
ty:: ty_iface ( _, _) { T_opaque_iface ( cx) }
140
140
ty:: ty_res ( _, sub, tps) {
141
141
let sub1 = ty:: substitute_type_params ( cx. tcx , tps, sub) ;
142
- // FIXME #1184: Resource flag is larger than necessary
143
- ret T_struct ( [ cx. int_type , type_of ( cx, sub1) ] ) ;
142
+ ret T_struct ( [ T_i8 ( ) , type_of ( cx, sub1) ] ) ;
144
143
}
145
144
ty:: ty_param ( _, _) { T_typaram ( cx. tn ) }
146
145
ty:: ty_send_type | ty:: ty_type { T_ptr ( cx. tydesc_type ) }
@@ -1050,8 +1049,7 @@ fn trans_res_drop(bcx: block, rs: ValueRef, did: ast::def_id,
1050
1049
Call ( bcx, dtor_addr, args + [ val_cast] ) ;
1051
1050
1052
1051
bcx = drop_ty ( bcx, valptr, inner_t_s) ;
1053
- // FIXME #1184: Resource flag is larger than necessary
1054
- Store ( bcx, C_int ( ccx, 0 ) , drop_flag) ;
1052
+ Store ( bcx, C_u8 ( 0 u) , drop_flag) ;
1055
1053
bcx
1056
1054
}
1057
1055
}
@@ -1479,9 +1477,10 @@ fn free_ty(cx: block, v: ValueRef, t: ty::t) -> block {
1479
1477
1480
1478
fn call_memmove ( cx : block , dst : ValueRef , src : ValueRef ,
1481
1479
n_bytes : ValueRef ) -> result {
1482
- // FIXME: Provide LLVM with better alignment information when the alignment
1483
- // is statically known (it must be nothing more than a constant int, or
1484
- // LLVM complains -- not even a constant element of a tydesc works).
1480
+ // FIXME: Provide LLVM with better alignment information when the
1481
+ // alignment is statically known (it must be nothing more than a constant
1482
+ // int, or LLVM complains -- not even a constant element of a tydesc
1483
+ // works).
1485
1484
1486
1485
let ccx = cx. ccx ( ) ;
1487
1486
let key = alt ccx. sess . targ_cfg . arch {
@@ -1493,7 +1492,6 @@ fn call_memmove(cx: block, dst: ValueRef, src: ValueRef,
1493
1492
let memmove = i. get ( key) ;
1494
1493
let src_ptr = PointerCast ( cx, src, T_ptr ( T_i8 ( ) ) ) ;
1495
1494
let dst_ptr = PointerCast ( cx, dst, T_ptr ( T_i8 ( ) ) ) ;
1496
- // FIXME #1184: Resource flag is larger than necessary
1497
1495
let size = IntCast ( cx, n_bytes, ccx. int_type ) ;
1498
1496
let align = C_i32 ( 1i32 ) ;
1499
1497
let volatile = C_bool ( false ) ;
@@ -4114,7 +4112,8 @@ fn trans_res_ctor(ccx: @crate_ctxt, path: path, dtor: ast::fn_decl,
4114
4112
let bcx = top_scope_block ( fcx, none) , lltop = bcx. llbb ;
4115
4113
let fty = node_id_type ( bcx, ctor_id) ;
4116
4114
let arg_t = ty:: ty_fn_args ( fty) [ 0 ] . ty ;
4117
- let tup_t = ty:: mk_tup ( ccx. tcx , [ ty:: mk_int ( ccx. tcx ) , arg_t] ) ;
4115
+ let tup_t = ty:: mk_tup ( ccx. tcx , [ ty:: mk_mach_uint ( ccx. tcx , ast:: ty_u8) ,
4116
+ arg_t] ) ;
4118
4117
let arg = alt fcx. llargs . find ( dtor. inputs [ 0 ] . id ) {
4119
4118
some ( local_mem ( x) ) { x }
4120
4119
_ { ccx. sess . bug ( "Someone forgot to document an invariant \
@@ -4130,8 +4129,7 @@ fn trans_res_ctor(ccx: @crate_ctxt, path: path, dtor: ast::fn_decl,
4130
4129
bcx = memmove_ty ( bcx, dst, arg, arg_t) ;
4131
4130
let flag = GEP_tup_like ( bcx, tup_t, llretptr, [ 0 , 0 ] ) ;
4132
4131
bcx = flag. bcx ;
4133
- // FIXME #1184: Resource flag is larger than necessary
4134
- let one = C_int ( ccx, 1 ) ;
4132
+ let one = C_u8 ( 1 u) ;
4135
4133
Store ( bcx, one, flag. val ) ;
4136
4134
build_return ( bcx) ;
4137
4135
finish_fn ( fcx, lltop) ;
0 commit comments