librustc: Remove the legacy mode in the type visitor intrinsic.

This commit is contained in:
Patrick Walton 2013-04-22 18:08:24 -07:00
parent c6a9e28842
commit 0780b2830f
3 changed files with 9 additions and 4 deletions

View File

@ -132,7 +132,7 @@ pub mod intrinsic {
#[abi = "rust-intrinsic"]
pub extern "rust-intrinsic" {
pub fn get_tydesc<T>() -> *();
pub fn visit_tydesc(++td: *TyDesc, &&tv: @TyVisitor);
pub fn visit_tydesc(++td: *TyDesc, ++tv: @TyVisitor);
}
}
}

View File

@ -771,9 +771,14 @@ pub fn trans_intrinsic(ccx: @CrateContext,
~"visit_tydesc" => {
let td = get_param(decl, first_real_arg);
let visitor = get_param(decl, first_real_arg + 1u);
let llvisitorptr = alloca(bcx, val_ty(visitor));
Store(bcx, visitor, llvisitorptr);
let td = PointerCast(bcx, td, T_ptr(ccx.tydesc_type));
glue::call_tydesc_glue_full(bcx, visitor, td,
abi::tydesc_field_visit_glue, None);
glue::call_tydesc_glue_full(bcx,
llvisitorptr,
td,
abi::tydesc_field_visit_glue,
None);
}
~"frame_address" => {
let frameaddress = *ccx.intrinsics.get(&~"llvm.frameaddress");

View File

@ -3479,7 +3479,7 @@ pub fn check_intrinsic_type(ccx: @mut CrateCtxt, it: @ast::foreign_item) {
let td_ptr = ty::mk_ptr(ccx.tcx, ty::mt {ty: tydesc_ty,
mutbl: ast::m_imm});
(0u, ~[arg(ast::by_copy, td_ptr),
arg(ast::by_ref, visitor_object_ty)], ty::mk_nil())
arg(ast::by_copy, visitor_object_ty)], ty::mk_nil())
}
~"frame_address" => {
let fty = ty::mk_closure(ccx.tcx, ty::ClosureTy {