parent
a0fa099469
commit
054a312a33
@ -616,6 +616,9 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: ebml::writer, item: @item,
|
||||
encode_type(ecx, ebml_w, ty::ty_fn_ret(fn_ty));
|
||||
encode_name(ebml_w, item.ident);
|
||||
astencode::encode_inlined_item(ecx, ebml_w, path, ii_item(item));
|
||||
if (tps.len() == 0u) {
|
||||
encode_symbol(ecx, ebml_w, item.id);
|
||||
}
|
||||
encode_path(ebml_w, path, ast_map::path_name(item.ident));
|
||||
ebml_w.end_tag();
|
||||
|
||||
|
@ -706,11 +706,23 @@ fn make_drop_glue(bcx: block, v0: ValueRef, t: ty::t) {
|
||||
fn get_res_dtor(ccx: @crate_ctxt, did: ast::def_id, substs: [ty::t])
|
||||
-> ValueRef {
|
||||
let _icx = ccx.insn_ctxt("trans_res_dtor");
|
||||
let did = if did.crate != ast::local_crate {
|
||||
maybe_instantiate_inline(ccx, did)
|
||||
} else { did };
|
||||
assert did.crate == ast::local_crate;
|
||||
monomorphic_fn(ccx, did, substs, none, none).val
|
||||
if (substs.len() > 0u) {
|
||||
let did = if did.crate != ast::local_crate {
|
||||
maybe_instantiate_inline(ccx, did)
|
||||
} else { did };
|
||||
assert did.crate == ast::local_crate;
|
||||
monomorphic_fn(ccx, did, substs, none, none).val
|
||||
} else if did.crate == ast::local_crate {
|
||||
get_item_val(ccx, did.node)
|
||||
} else {
|
||||
let fty = ty::mk_fn(ccx.tcx, {proto: ast::proto_bare,
|
||||
inputs: [{mode: ast::expl(ast::by_ref),
|
||||
ty: ty::mk_nil_ptr(ccx.tcx)}],
|
||||
output: ty::mk_nil(ccx.tcx),
|
||||
ret_style: ast::return_val,
|
||||
constraints: []});
|
||||
trans_external_path(ccx, did, fty)
|
||||
}
|
||||
}
|
||||
|
||||
fn trans_res_drop(bcx: block, rs: ValueRef, did: ast::def_id,
|
||||
@ -1946,7 +1958,6 @@ fn monomorphic_fn(ccx: @crate_ctxt, fn_id: ast::def_id, real_substs: [ty::t],
|
||||
let s = mangle_exported_name(ccx, pt, mono_ty);
|
||||
let lldecl = decl_internal_cdecl_fn(ccx.llmod, s, llfty);
|
||||
ccx.monomorphized.insert(hash_id, lldecl);
|
||||
ccx.item_symbols.insert(fn_id.node, s);
|
||||
|
||||
let psubsts = some({tys: substs, vtables: vtables, bounds: tpt.bounds});
|
||||
alt check map_node {
|
||||
|
Loading…
x
Reference in New Issue
Block a user