Check in changes I forgot to check in

This commit is contained in:
Tim Chevalier 2012-06-30 09:12:45 -07:00
parent f64c23fdfd
commit 172fb1756b
2 changed files with 7 additions and 7 deletions

View File

@ -619,7 +619,7 @@ fn emit_tydescs(ccx: @crate_ctxt) {
C_shape(ccx, shape), // shape
shape_tables, // shape_tables
C_int(ccx, 0), // unused
C_int(ccx, 0)]/~); // unused
C_int(ccx, 0)]); // unused
let gvar = ti.tydesc;
llvm::LLVMSetInitializer(gvar, tydesc);
@ -703,8 +703,8 @@ fn make_free_glue(bcx: block, v: ValueRef, t: ty::t) {
}
ty::ty_opaque_box {
let v = PointerCast(bcx, v, type_of(ccx, t));
let td = Load(bcx, GEPi(bcx, v, [0u, abi::box_field_tydesc]/~));
let valptr = GEPi(bcx, v, [0u, abi::box_field_body]/~);
let td = Load(bcx, GEPi(bcx, v, ~[0u, abi::box_field_tydesc]));
let valptr = GEPi(bcx, v, ~[0u, abi::box_field_body]);
// Generate code that, dynamically, indexes into the
// tydesc and calls the drop glue that got set dynamically
call_tydesc_glue_full(bcx, valptr, td, abi::tydesc_field_drop_glue,

View File

@ -118,10 +118,10 @@ fn type_needs_inner(cx: ctx, use: uint, ty: ty::t,
if ty::type_has_params(ty) {
alt ty::get(ty).struct {
/*
This previously included ty_box -- that was wrong
because if we cast an @T to an iface (for example) and return
it, we depend on the drop glue for T (we have to write the
right tydesc into the result)
This previously included ty_box -- that was wrong
because if we cast an @T to an iface (for example) and return
it, we depend on the drop glue for T (we have to write the
right tydesc into the result)
*/
ty::ty_fn(_) | ty::ty_ptr(_) | ty::ty_rptr(_, _)
| ty::ty_iface(_, _) { false }