pub fn trans_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
                          decl: &ast::FnDecl,
                          body: &ast::Block,
                          llfndecl: ValueRef,
                          param_substs: &'tcx Substs<'tcx>,
                          id: ast::NodeId,
                          attrs: &[ast::Attribute]) {
    let _s = StatRecorder::new(ccx, ccx.tcx().map.path_to_string(id).to_string());
    debug!("trans_fn(param_substs={})", param_substs.repr(ccx.tcx()));
    let _icx = push_ctxt("trans_fn");
    let fn_ty = ty::node_id_to_type(ccx.tcx(), id);
    let output_type = ty::erase_late_bound_regions(ccx.tcx(), &ty::ty_fn_ret(fn_ty));
    let abi = ty::ty_fn_abi(fn_ty);
    trans_closure(ccx, decl, body, llfndecl, param_substs, id, attrs, output_type, abi,
                  closure::ClosureEnv::NotClosure);
}
/// Creates an LLVM function corresponding to a source language function.
Creates an LLVM function corresponding to a source language function.
Creates an LLVM function corresponding to a source language function .
pub fn trans_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
                          decl: &ast::FnDecl,
                          body: &ast::Block,
                          llfndecl: ValueRef,
                          param_substs: &'tcx Substs<'tcx>,
                          id: ast::NodeId,
                          attrs: &[ast::Attribute]) {
    let _s = StatRecorder::new(ccx, ccx.tcx().map.path_to_string(id).to_string());
    debug!("trans_fn(param_substs={})", param_substs.repr(ccx.tcx()));
    let _icx = push_ctxt("trans_fn");
    let fn_ty = ty::node_id_to_type(ccx.tcx(), id);
    let output_type = ty::erase_late_bound_regions(ccx.tcx(), &ty::ty_fn_ret(fn_ty));
    let abi = ty::ty_fn_abi(fn_ty);
    trans_closure(ccx, decl, body, llfndecl, param_substs, id, attrs, output_type, abi,
                  closure::ClosureEnv::NotClosure);
}
pub fn trans_fn < ' a , ' tcx > ( ccx : & CrateContext < ' a , ' tcx > , decl : & ast :: FnDecl , body : & ast :: Block , llfndecl : ValueRef , param_substs : & ' tcx Substs < ' tcx > , id : ast :: NodeId , attrs : & [ ast :: Attribute ] ) { let _s = StatRecorder :: new ( ccx , ccx . tcx ( ) . map . path_to_string ( id ) . to_string ( ) ) ; debug ! ( " " param_substs repr ( ccx tcx ( ) ) ) ; let _icx = push_ctxt ( " " ) ; let fn_ty = ty :: node_id_to_type ( ccx . tcx ( ) , id ) ; let output_type = ty :: erase_late_bound_regions ( ccx . tcx ( ) , & ty :: ty_fn_ret ( fn_ty ) ) ; let abi = ty :: ty_fn_abi ( fn_ty ) ; trans_closure ( ccx , decl , body , llfndecl , param_substs , id , attrs , output_type , abi , closure :: ClosureEnv :: NotClosure ) ; }
Creates an LLVM function corresponding to a source language function.
Creates an LLVM function corresponding to a source language function .
ccx
&CrateContext<'a, 'tcx>
decl
&ast::FnDecl
body
&ast::Block
llfndecl
ValueRef
param_substs
&'tcx Substs<'tcx>
id
ast::NodeId
attrs
&[ast::Attribute]