@@ -4826,43 +4826,6 @@ fn fill_fn_pair(bcx: @block_ctxt, pair: ValueRef, llfn: ValueRef,
4826
4826
Store ( bcx, llenvblobptr, env_cell) ;
4827
4827
}
4828
4828
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
-
4866
4829
fn link_name ( i : @ast:: native_item ) -> str {
4867
4830
alt attr:: get_meta_item_value_str_by_name ( i. attrs , "link_name" ) {
4868
4831
none { ret i. ident ; }
0 commit comments