Skip to content

Commit efd393d

Browse files
committed
Remove dead code
1 parent 9fde2a5 commit efd393d

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

src/comp/middle/trans/base.rs

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4826,43 +4826,6 @@ fn fill_fn_pair(bcx: @block_ctxt, pair: ValueRef, llfn: ValueRef,
48264826
Store(bcx, llenvblobptr, env_cell);
48274827
}
48284828

4829-
// Returns the number of type parameters that the given native function has.
4830-
fn native_fn_ty_param_count(cx: @crate_ctxt, id: ast::node_id) -> uint {
4831-
let count;
4832-
let native_item =
4833-
// invariant?!
4834-
alt cx.ast_map.find(id) {
4835-
some(ast_map::node_native_item(i, _)) { i }
4836-
_ { cx.sess.bug("native_fn_ty_param_count \
4837-
given a non-native item"); } };
4838-
alt native_item.node {
4839-
ast::native_item_fn(_, tps) {
4840-
count = vec::len::<ast::ty_param>(tps);
4841-
}
4842-
}
4843-
ret count;
4844-
}
4845-
4846-
4847-
// TODO: precondition
4848-
fn native_fn_wrapper_type(cx: @crate_ctxt, sp: span,
4849-
param_bounds: [ty::param_bounds],
4850-
x: ty::t) -> TypeRef {
4851-
alt ty::get(x).struct {
4852-
ty::ty_fn({inputs: args, output: out, _}) {
4853-
ret type_of_fn(cx, args, out, param_bounds);
4854-
}
4855-
_ { cx.sess.span_bug(sp, "native_fn_wrapper_type got ill-typed\
4856-
thing"); }
4857-
}
4858-
}
4859-
4860-
fn raw_native_fn_type(ccx: @crate_ctxt, args: [ty::arg],
4861-
ret_ty: ty::t) -> TypeRef {
4862-
check type_has_static_size(ccx, ret_ty);
4863-
ret T_fn(type_of_explicit_args(ccx, args), type_of(ccx, ret_ty));
4864-
}
4865-
48664829
fn link_name(i: @ast::native_item) -> str {
48674830
alt attr::get_meta_item_value_str_by_name(i.attrs, "link_name") {
48684831
none { ret i.ident; }

0 commit comments

Comments
 (0)