Skip to content

Commit 4e7881e

Browse files
committed
---
yaml --- r: 14399 b: refs/heads/try c: 389aff3 h: refs/heads/master i: 14397: a119c09 14395: f03efb4 14391: e2f92c4 14383: 97c2ffa 14367: 789b735 14335: 4cc2ad4 v: v3
1 parent 4303785 commit 4e7881e

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 5458da0fd924c18791c80b31659469f636dcbb9a
5+
refs/heads/try: 389aff333d17053878823fc8e6b09096f8eeb78c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/comp/middle/trans/base.rs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ fn type_of(cx: @crate_ctxt, t: ty::t) -> TypeRef {
139139
ty::ty_iface(_, _) { T_opaque_iface(cx) }
140140
ty::ty_res(_, sub, tps) {
141141
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)]);
144143
}
145144
ty::ty_param(_, _) { T_typaram(cx.tn) }
146145
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,
10501049
Call(bcx, dtor_addr, args + [val_cast]);
10511050

10521051
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(0u), drop_flag);
10551053
bcx
10561054
}
10571055
}
@@ -1479,9 +1477,10 @@ fn free_ty(cx: block, v: ValueRef, t: ty::t) -> block {
14791477

14801478
fn call_memmove(cx: block, dst: ValueRef, src: ValueRef,
14811479
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).
14851484

14861485
let ccx = cx.ccx();
14871486
let key = alt ccx.sess.targ_cfg.arch {
@@ -1493,7 +1492,6 @@ fn call_memmove(cx: block, dst: ValueRef, src: ValueRef,
14931492
let memmove = i.get(key);
14941493
let src_ptr = PointerCast(cx, src, T_ptr(T_i8()));
14951494
let dst_ptr = PointerCast(cx, dst, T_ptr(T_i8()));
1496-
// FIXME #1184: Resource flag is larger than necessary
14971495
let size = IntCast(cx, n_bytes, ccx.int_type);
14981496
let align = C_i32(1i32);
14991497
let volatile = C_bool(false);
@@ -4114,7 +4112,8 @@ fn trans_res_ctor(ccx: @crate_ctxt, path: path, dtor: ast::fn_decl,
41144112
let bcx = top_scope_block(fcx, none), lltop = bcx.llbb;
41154113
let fty = node_id_type(bcx, ctor_id);
41164114
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]);
41184117
let arg = alt fcx.llargs.find(dtor.inputs[0].id) {
41194118
some(local_mem(x)) { x }
41204119
_ { 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,
41304129
bcx = memmove_ty(bcx, dst, arg, arg_t);
41314130
let flag = GEP_tup_like(bcx, tup_t, llretptr, [0, 0]);
41324131
bcx = flag.bcx;
4133-
// FIXME #1184: Resource flag is larger than necessary
4134-
let one = C_int(ccx, 1);
4132+
let one = C_u8(1u);
41354133
Store(bcx, one, flag.val);
41364134
build_return(bcx);
41374135
finish_fn(fcx, lltop);

0 commit comments

Comments
 (0)