mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
librustc: Remove the legacy mode in the type visitor intrinsic.
This commit is contained in:
parent
c6a9e28842
commit
0780b2830f
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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");
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user