rustc: rename some ty_self variables to self_arg

This commit is contained in:
Erick Tryzelaar 2013-04-26 18:21:52 -07:00
parent 9c80cf548a
commit 4bfe0f717f
2 changed files with 9 additions and 9 deletions

View file

@ -1664,12 +1664,12 @@ pub fn new_fn_ctxt(ccx: @CrateContext,
// the function's fn_ctxt). create_llargs_for_fn_args populates the llargs
// field of the fn_ctxt with
pub fn create_llargs_for_fn_args(cx: fn_ctxt,
ty_self: self_arg,
self_arg: self_arg,
args: &[ast::arg])
-> ~[ValueRef] {
let _icx = cx.insn_ctxt("create_llargs_for_fn_args");
match ty_self {
match self_arg {
impl_self(tt) => {
cx.llself = Some(ValSelfData {
v: cx.llenv,
@ -1801,7 +1801,7 @@ pub fn trans_closure(ccx: @CrateContext,
decl: &ast::fn_decl,
body: &ast::blk,
llfndecl: ValueRef,
ty_self: self_arg,
self_arg: self_arg,
param_substs: Option<@param_substs>,
id: ast::node_id,
impl_id: Option<ast::def_id>,
@ -1825,7 +1825,7 @@ pub fn trans_closure(ccx: @CrateContext,
impl_id,
param_substs,
Some(body.span));
let raw_llargs = create_llargs_for_fn_args(fcx, ty_self, decl.inputs);
let raw_llargs = create_llargs_for_fn_args(fcx, self_arg, decl.inputs);
// Set the fixed stack segment flag if necessary.
if attr::attrs_contains_name(attributes, "fixed_stack_segment") {
@ -1882,7 +1882,7 @@ pub fn trans_fn(ccx: @CrateContext,
decl: &ast::fn_decl,
body: &ast::blk,
llfndecl: ValueRef,
ty_self: self_arg,
self_arg: self_arg,
param_substs: Option<@param_substs>,
id: ast::node_id,
impl_id: Option<ast::def_id>,
@ -1890,8 +1890,8 @@ pub fn trans_fn(ccx: @CrateContext,
let do_time = ccx.sess.trans_stats();
let start = if do_time { time::get_time() }
else { time::Timespec::new(0, 0) };
debug!("trans_fn(ty_self=%?, param_substs=%s)",
ty_self,
debug!("trans_fn(self_arg=%?, param_substs=%s)",
self_arg,
param_substs.repr(ccx.tcx));
let _icx = ccx.insn_ctxt("trans_fn");
ccx.stats.n_fns += 1;
@ -1902,7 +1902,7 @@ pub fn trans_fn(ccx: @CrateContext,
decl,
body,
llfndecl,
ty_self,
self_arg,
param_substs,
id,
impl_id,

View file

@ -1382,7 +1382,7 @@ pub fn fold_sty_to_ty(tcx: ty::ctxt, sty: &sty, foldop: &fn(t) -> t) -> t {
}
pub fn fold_sig(sig: &FnSig, fldop: &fn(t) -> t) -> FnSig {
let args = sig.inputs.map(|arg| fldop(*arg));
let args = sig.inputs.map(|arg| fldop(*arg));
FnSig {
bound_lifetime_names: copy sig.bound_lifetime_names,