trans: Change @ast::Expr -> &ast::Expr where possible
This commit is contained in:
parent
92e7bb67a8
commit
948b5ab87a
|
@ -422,7 +422,7 @@ impl<'self, O:DataFlowOperator> PropagationContext<'self, O> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn walk_expr(&mut self,
|
fn walk_expr(&mut self,
|
||||||
expr: @ast::Expr,
|
expr: &ast::Expr,
|
||||||
in_out: &mut [uint],
|
in_out: &mut [uint],
|
||||||
loop_scopes: &mut ~[LoopScope]) {
|
loop_scopes: &mut ~[LoopScope]) {
|
||||||
debug!("DataFlowContext::walk_expr(expr=%s, in_out=%s)",
|
debug!("DataFlowContext::walk_expr(expr=%s, in_out=%s)",
|
||||||
|
@ -744,7 +744,7 @@ impl<'self, O:DataFlowOperator> PropagationContext<'self, O> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn pop_scopes(&mut self,
|
fn pop_scopes(&mut self,
|
||||||
from_expr: @ast::Expr,
|
from_expr: &ast::Expr,
|
||||||
to_scope: &mut LoopScope,
|
to_scope: &mut LoopScope,
|
||||||
in_out: &mut [uint]) {
|
in_out: &mut [uint]) {
|
||||||
//! Whenever you have a `break` or a `loop` statement, flow
|
//! Whenever you have a `break` or a `loop` statement, flow
|
||||||
|
@ -778,7 +778,7 @@ impl<'self, O:DataFlowOperator> PropagationContext<'self, O> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn break_from_to(&mut self,
|
fn break_from_to(&mut self,
|
||||||
from_expr: @ast::Expr,
|
from_expr: &ast::Expr,
|
||||||
to_scope: &mut LoopScope,
|
to_scope: &mut LoopScope,
|
||||||
in_out: &mut [uint]) {
|
in_out: &mut [uint]) {
|
||||||
self.pop_scopes(from_expr, to_scope, in_out);
|
self.pop_scopes(from_expr, to_scope, in_out);
|
||||||
|
@ -811,7 +811,7 @@ impl<'self, O:DataFlowOperator> PropagationContext<'self, O> {
|
||||||
fn walk_call(&mut self,
|
fn walk_call(&mut self,
|
||||||
_callee_id: ast::NodeId,
|
_callee_id: ast::NodeId,
|
||||||
call_id: ast::NodeId,
|
call_id: ast::NodeId,
|
||||||
arg0: @ast::Expr,
|
arg0: &ast::Expr,
|
||||||
args: &[@ast::Expr],
|
args: &[@ast::Expr],
|
||||||
in_out: &mut [uint],
|
in_out: &mut [uint],
|
||||||
loop_scopes: &mut ~[LoopScope]) {
|
loop_scopes: &mut ~[LoopScope]) {
|
||||||
|
@ -865,7 +865,7 @@ impl<'self, O:DataFlowOperator> PropagationContext<'self, O> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn find_scope<'a>(&self,
|
fn find_scope<'a>(&self,
|
||||||
expr: @ast::Expr,
|
expr: &ast::Expr,
|
||||||
label: Option<ast::Name>,
|
label: Option<ast::Name>,
|
||||||
loop_scopes: &'a mut ~[LoopScope]) -> &'a mut LoopScope {
|
loop_scopes: &'a mut ~[LoopScope]) -> &'a mut LoopScope {
|
||||||
let index = match label {
|
let index = match label {
|
||||||
|
@ -899,7 +899,7 @@ impl<'self, O:DataFlowOperator> PropagationContext<'self, O> {
|
||||||
&mut loop_scopes[index]
|
&mut loop_scopes[index]
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_method_call(&self, expr: @ast::Expr) -> bool {
|
fn is_method_call(&self, expr: &ast::Expr) -> bool {
|
||||||
self.dfcx.method_map.contains_key(&expr.id)
|
self.dfcx.method_map.contains_key(&expr.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1398,7 +1398,7 @@ fn insert_lllocals(bcx: @mut Block,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn compile_guard(bcx: @mut Block,
|
fn compile_guard(bcx: @mut Block,
|
||||||
guard_expr: @ast::Expr,
|
guard_expr: &ast::Expr,
|
||||||
data: &ArmData,
|
data: &ArmData,
|
||||||
m: &[Match],
|
m: &[Match],
|
||||||
vals: &[ValueRef],
|
vals: &[ValueRef],
|
||||||
|
@ -1826,7 +1826,7 @@ fn compile_submatch_continue(mut bcx: @mut Block,
|
||||||
|
|
||||||
pub fn trans_match(bcx: @mut Block,
|
pub fn trans_match(bcx: @mut Block,
|
||||||
match_expr: &ast::Expr,
|
match_expr: &ast::Expr,
|
||||||
discr_expr: @ast::Expr,
|
discr_expr: &ast::Expr,
|
||||||
arms: &[ast::Arm],
|
arms: &[ast::Arm],
|
||||||
dest: Dest) -> @mut Block {
|
dest: Dest) -> @mut Block {
|
||||||
let _icx = push_ctxt("match::trans_match");
|
let _icx = push_ctxt("match::trans_match");
|
||||||
|
@ -1876,7 +1876,7 @@ fn create_bindings_map(bcx: @mut Block, pat: @ast::Pat) -> BindingsMap {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn trans_match_inner(scope_cx: @mut Block,
|
fn trans_match_inner(scope_cx: @mut Block,
|
||||||
discr_expr: @ast::Expr,
|
discr_expr: &ast::Expr,
|
||||||
arms: &[ast::Arm],
|
arms: &[ast::Arm],
|
||||||
dest: Dest) -> @mut Block {
|
dest: Dest) -> @mut Block {
|
||||||
let _icx = push_ctxt("match::trans_match_inner");
|
let _icx = push_ctxt("match::trans_match_inner");
|
||||||
|
|
|
@ -77,7 +77,7 @@ pub struct Callee {
|
||||||
data: CalleeData
|
data: CalleeData
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn trans(bcx: @mut Block, expr: @ast::Expr) -> Callee {
|
pub fn trans(bcx: @mut Block, expr: &ast::Expr) -> Callee {
|
||||||
let _icx = push_ctxt("trans_callee");
|
let _icx = push_ctxt("trans_callee");
|
||||||
debug!("callee::trans(expr=%s)", expr.repr(bcx.tcx()));
|
debug!("callee::trans(expr=%s)", expr.repr(bcx.tcx()));
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ pub fn trans(bcx: @mut Block, expr: @ast::Expr) -> Callee {
|
||||||
// any other expressions are closures:
|
// any other expressions are closures:
|
||||||
return datum_callee(bcx, expr);
|
return datum_callee(bcx, expr);
|
||||||
|
|
||||||
fn datum_callee(bcx: @mut Block, expr: @ast::Expr) -> Callee {
|
fn datum_callee(bcx: @mut Block, expr: &ast::Expr) -> Callee {
|
||||||
let DatumBlock {bcx, datum} = expr::trans_to_datum(bcx, expr);
|
let DatumBlock {bcx, datum} = expr::trans_to_datum(bcx, expr);
|
||||||
match ty::get(datum.ty).sty {
|
match ty::get(datum.ty).sty {
|
||||||
ty::ty_bare_fn(*) => {
|
ty::ty_bare_fn(*) => {
|
||||||
|
@ -115,7 +115,7 @@ pub fn trans(bcx: @mut Block, expr: @ast::Expr) -> Callee {
|
||||||
return Callee {bcx: bcx, data: Fn(fd)};
|
return Callee {bcx: bcx, data: Fn(fd)};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn trans_def(bcx: @mut Block, def: ast::Def, ref_expr: @ast::Expr) -> Callee {
|
fn trans_def(bcx: @mut Block, def: ast::Def, ref_expr: &ast::Expr) -> Callee {
|
||||||
match def {
|
match def {
|
||||||
ast::DefFn(did, _) |
|
ast::DefFn(did, _) |
|
||||||
ast::DefStaticMethod(did, ast::FromImpl(_), _) => {
|
ast::DefStaticMethod(did, ast::FromImpl(_), _) => {
|
||||||
|
@ -447,8 +447,8 @@ pub fn trans_fn_ref_with_vtables(
|
||||||
// Translating calls
|
// Translating calls
|
||||||
|
|
||||||
pub fn trans_call(in_cx: @mut Block,
|
pub fn trans_call(in_cx: @mut Block,
|
||||||
call_ex: @ast::Expr,
|
call_ex: &ast::Expr,
|
||||||
f: @ast::Expr,
|
f: &ast::Expr,
|
||||||
args: CallArgs,
|
args: CallArgs,
|
||||||
id: ast::NodeId,
|
id: ast::NodeId,
|
||||||
dest: expr::Dest)
|
dest: expr::Dest)
|
||||||
|
@ -465,9 +465,9 @@ pub fn trans_call(in_cx: @mut Block,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn trans_method_call(in_cx: @mut Block,
|
pub fn trans_method_call(in_cx: @mut Block,
|
||||||
call_ex: @ast::Expr,
|
call_ex: &ast::Expr,
|
||||||
callee_id: ast::NodeId,
|
callee_id: ast::NodeId,
|
||||||
rcvr: @ast::Expr,
|
rcvr: &ast::Expr,
|
||||||
args: CallArgs,
|
args: CallArgs,
|
||||||
dest: expr::Dest)
|
dest: expr::Dest)
|
||||||
-> @mut Block {
|
-> @mut Block {
|
||||||
|
@ -834,7 +834,7 @@ pub enum AutorefArg {
|
||||||
pub fn trans_arg_expr(bcx: @mut Block,
|
pub fn trans_arg_expr(bcx: @mut Block,
|
||||||
formal_arg_ty: ty::t,
|
formal_arg_ty: ty::t,
|
||||||
self_mode: ty::SelfMode,
|
self_mode: ty::SelfMode,
|
||||||
arg_expr: @ast::Expr,
|
arg_expr: &ast::Expr,
|
||||||
temp_cleanups: &mut ~[ValueRef],
|
temp_cleanups: &mut ~[ValueRef],
|
||||||
autoref_arg: AutorefArg) -> Result {
|
autoref_arg: AutorefArg) -> Result {
|
||||||
let _icx = push_ctxt("trans_arg_expr");
|
let _icx = push_ctxt("trans_arg_expr");
|
||||||
|
|
|
@ -670,7 +670,7 @@ impl Block {
|
||||||
ast_map::node_id_to_str(self.tcx().items, id, self.sess().intr())
|
ast_map::node_id_to_str(self.tcx().items, id, self.sess().intr())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn expr_to_str(&self, e: @ast::Expr) -> ~str {
|
pub fn expr_to_str(&self, e: &ast::Expr) -> ~str {
|
||||||
e.repr(self.tcx())
|
e.repr(self.tcx())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,7 @@ pub fn get_const_val(cx: @mut CrateContext,
|
||||||
!cx.non_inlineable_statics.contains(&def_id.node))
|
!cx.non_inlineable_statics.contains(&def_id.node))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn const_expr(cx: @mut CrateContext, e: @ast::Expr) -> (ValueRef, bool) {
|
pub fn const_expr(cx: @mut CrateContext, e: &ast::Expr) -> (ValueRef, bool) {
|
||||||
let (llconst, inlineable) = const_expr_unadjusted(cx, e);
|
let (llconst, inlineable) = const_expr_unadjusted(cx, e);
|
||||||
let mut llconst = llconst;
|
let mut llconst = llconst;
|
||||||
let mut inlineable = inlineable;
|
let mut inlineable = inlineable;
|
||||||
|
|
|
@ -45,7 +45,7 @@ pub fn trans_block(bcx: @mut Block, b: &ast::Block, dest: expr::Dest) -> @mut Bl
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn trans_if(bcx: @mut Block,
|
pub fn trans_if(bcx: @mut Block,
|
||||||
cond: @ast::Expr,
|
cond: &ast::Expr,
|
||||||
thn: &ast::Block,
|
thn: &ast::Block,
|
||||||
els: Option<@ast::Expr>,
|
els: Option<@ast::Expr>,
|
||||||
dest: expr::Dest)
|
dest: expr::Dest)
|
||||||
|
@ -158,7 +158,7 @@ pub fn join_blocks(parent_bcx: @mut Block, in_cxs: &[@mut Block]) -> @mut Block
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn trans_while(bcx: @mut Block, cond: @ast::Expr, body: &ast::Block) -> @mut Block {
|
pub fn trans_while(bcx: @mut Block, cond: &ast::Expr, body: &ast::Block) -> @mut Block {
|
||||||
let _icx = push_ctxt("trans_while");
|
let _icx = push_ctxt("trans_while");
|
||||||
let next_bcx = sub_block(bcx, "while next");
|
let next_bcx = sub_block(bcx, "while next");
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,7 @@ fn drop_and_cancel_clean(bcx: @mut Block, dat: Datum) -> @mut Block {
|
||||||
return bcx;
|
return bcx;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn trans_to_datum(bcx: @mut Block, expr: @ast::Expr) -> DatumBlock {
|
pub fn trans_to_datum(bcx: @mut Block, expr: &ast::Expr) -> DatumBlock {
|
||||||
debug!("trans_to_datum(expr=%s)", bcx.expr_to_str(expr));
|
debug!("trans_to_datum(expr=%s)", bcx.expr_to_str(expr));
|
||||||
|
|
||||||
let mut bcx = bcx;
|
let mut bcx = bcx;
|
||||||
|
@ -307,7 +307,7 @@ pub fn trans_to_datum(bcx: @mut Block, expr: @ast::Expr) -> DatumBlock {
|
||||||
|
|
||||||
fn auto_borrow_obj(mut bcx: @mut Block,
|
fn auto_borrow_obj(mut bcx: @mut Block,
|
||||||
autoderefs: uint,
|
autoderefs: uint,
|
||||||
expr: @ast::Expr,
|
expr: &ast::Expr,
|
||||||
source_datum: Datum) -> DatumBlock {
|
source_datum: Datum) -> DatumBlock {
|
||||||
let tcx = bcx.tcx();
|
let tcx = bcx.tcx();
|
||||||
let target_obj_ty = expr_ty_adjusted(bcx, expr);
|
let target_obj_ty = expr_ty_adjusted(bcx, expr);
|
||||||
|
@ -419,7 +419,7 @@ pub fn trans_to_datum(bcx: @mut Block, expr: @ast::Expr) -> DatumBlock {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn trans_into(bcx: @mut Block, expr: @ast::Expr, dest: Dest) -> @mut Block {
|
pub fn trans_into(bcx: @mut Block, expr: &ast::Expr, dest: Dest) -> @mut Block {
|
||||||
if bcx.tcx().adjustments.contains_key(&expr.id) {
|
if bcx.tcx().adjustments.contains_key(&expr.id) {
|
||||||
// use trans_to_datum, which is mildly less efficient but
|
// use trans_to_datum, which is mildly less efficient but
|
||||||
// which will perform the adjustments:
|
// which will perform the adjustments:
|
||||||
|
@ -477,7 +477,7 @@ pub fn trans_into(bcx: @mut Block, expr: @ast::Expr, dest: Dest) -> @mut Block {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn trans_lvalue(bcx: @mut Block, expr: @ast::Expr) -> DatumBlock {
|
fn trans_lvalue(bcx: @mut Block, expr: &ast::Expr) -> DatumBlock {
|
||||||
/*!
|
/*!
|
||||||
*
|
*
|
||||||
* Translates an lvalue expression, always yielding a by-ref
|
* Translates an lvalue expression, always yielding a by-ref
|
||||||
|
@ -496,7 +496,7 @@ fn trans_lvalue(bcx: @mut Block, expr: @ast::Expr) -> DatumBlock {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn trans_to_datum_unadjusted(bcx: @mut Block, expr: @ast::Expr) -> DatumBlock {
|
fn trans_to_datum_unadjusted(bcx: @mut Block, expr: &ast::Expr) -> DatumBlock {
|
||||||
/*!
|
/*!
|
||||||
* Translates an expression into a datum. If this expression
|
* Translates an expression into a datum. If this expression
|
||||||
* is an rvalue, this will result in a temporary value being
|
* is an rvalue, this will result in a temporary value being
|
||||||
|
@ -562,7 +562,7 @@ fn trans_to_datum_unadjusted(bcx: @mut Block, expr: @ast::Expr) -> DatumBlock {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn trans_rvalue_datum_unadjusted(bcx: @mut Block, expr: @ast::Expr) -> DatumBlock {
|
fn trans_rvalue_datum_unadjusted(bcx: @mut Block, expr: &ast::Expr) -> DatumBlock {
|
||||||
let _icx = push_ctxt("trans_rvalue_datum_unadjusted");
|
let _icx = push_ctxt("trans_rvalue_datum_unadjusted");
|
||||||
|
|
||||||
trace_span!(bcx, expr.span, shorten(bcx.expr_to_str(expr)));
|
trace_span!(bcx, expr.span, shorten(bcx.expr_to_str(expr)));
|
||||||
|
@ -615,7 +615,7 @@ fn trans_rvalue_datum_unadjusted(bcx: @mut Block, expr: @ast::Expr) -> DatumBloc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn trans_rvalue_stmt_unadjusted(bcx: @mut Block, expr: @ast::Expr) -> @mut Block {
|
fn trans_rvalue_stmt_unadjusted(bcx: @mut Block, expr: &ast::Expr) -> @mut Block {
|
||||||
let mut bcx = bcx;
|
let mut bcx = bcx;
|
||||||
let _icx = push_ctxt("trans_rvalue_stmt");
|
let _icx = push_ctxt("trans_rvalue_stmt");
|
||||||
|
|
||||||
|
@ -669,7 +669,7 @@ fn trans_rvalue_stmt_unadjusted(bcx: @mut Block, expr: @ast::Expr) -> @mut Block
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn trans_rvalue_dps_unadjusted(bcx: @mut Block, expr: @ast::Expr,
|
fn trans_rvalue_dps_unadjusted(bcx: @mut Block, expr: &ast::Expr,
|
||||||
dest: Dest) -> @mut Block {
|
dest: Dest) -> @mut Block {
|
||||||
let _icx = push_ctxt("trans_rvalue_dps_unadjusted");
|
let _icx = push_ctxt("trans_rvalue_dps_unadjusted");
|
||||||
let tcx = bcx.tcx();
|
let tcx = bcx.tcx();
|
||||||
|
@ -878,7 +878,7 @@ fn trans_def_datum_unadjusted(bcx: @mut Block,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn trans_lvalue_unadjusted(bcx: @mut Block, expr: @ast::Expr) -> DatumBlock {
|
fn trans_lvalue_unadjusted(bcx: @mut Block, expr: &ast::Expr) -> DatumBlock {
|
||||||
/*!
|
/*!
|
||||||
*
|
*
|
||||||
* Translates an lvalue expression, always yielding a by-ref
|
* Translates an lvalue expression, always yielding a by-ref
|
||||||
|
@ -918,7 +918,7 @@ fn trans_lvalue_unadjusted(bcx: @mut Block, expr: @ast::Expr) -> DatumBlock {
|
||||||
};
|
};
|
||||||
|
|
||||||
fn trans_rec_field(bcx: @mut Block,
|
fn trans_rec_field(bcx: @mut Block,
|
||||||
base: @ast::Expr,
|
base: &ast::Expr,
|
||||||
field: ast::Ident) -> DatumBlock {
|
field: ast::Ident) -> DatumBlock {
|
||||||
//! Translates `base.field`.
|
//! Translates `base.field`.
|
||||||
|
|
||||||
|
@ -942,8 +942,8 @@ fn trans_lvalue_unadjusted(bcx: @mut Block, expr: @ast::Expr) -> DatumBlock {
|
||||||
|
|
||||||
fn trans_index(bcx: @mut Block,
|
fn trans_index(bcx: @mut Block,
|
||||||
index_expr: &ast::Expr,
|
index_expr: &ast::Expr,
|
||||||
base: @ast::Expr,
|
base: &ast::Expr,
|
||||||
idx: @ast::Expr) -> DatumBlock {
|
idx: &ast::Expr) -> DatumBlock {
|
||||||
//! Translates `base[idx]`.
|
//! Translates `base[idx]`.
|
||||||
|
|
||||||
let _icx = push_ctxt("trans_index");
|
let _icx = push_ctxt("trans_index");
|
||||||
|
@ -1321,7 +1321,7 @@ fn trans_adt(bcx: @mut Block, repr: &adt::Repr, discr: ty::Disr,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn trans_immediate_lit(bcx: @mut Block, expr: @ast::Expr,
|
fn trans_immediate_lit(bcx: @mut Block, expr: &ast::Expr,
|
||||||
lit: ast::lit) -> DatumBlock {
|
lit: ast::lit) -> DatumBlock {
|
||||||
// must not be a string constant, that is a RvalueDpsExpr
|
// must not be a string constant, that is a RvalueDpsExpr
|
||||||
let _icx = push_ctxt("trans_immediate_lit");
|
let _icx = push_ctxt("trans_immediate_lit");
|
||||||
|
@ -1332,7 +1332,7 @@ fn trans_immediate_lit(bcx: @mut Block, expr: @ast::Expr,
|
||||||
fn trans_unary_datum(bcx: @mut Block,
|
fn trans_unary_datum(bcx: @mut Block,
|
||||||
un_expr: &ast::Expr,
|
un_expr: &ast::Expr,
|
||||||
op: ast::UnOp,
|
op: ast::UnOp,
|
||||||
sub_expr: @ast::Expr) -> DatumBlock {
|
sub_expr: &ast::Expr) -> DatumBlock {
|
||||||
let _icx = push_ctxt("trans_unary_datum");
|
let _icx = push_ctxt("trans_unary_datum");
|
||||||
|
|
||||||
// if deref, would be LvalueExpr
|
// if deref, would be LvalueExpr
|
||||||
|
@ -1391,7 +1391,7 @@ fn trans_unary_datum(bcx: @mut Block,
|
||||||
|
|
||||||
fn trans_boxed_expr(bcx: @mut Block,
|
fn trans_boxed_expr(bcx: @mut Block,
|
||||||
box_ty: ty::t,
|
box_ty: ty::t,
|
||||||
contents: @ast::Expr,
|
contents: &ast::Expr,
|
||||||
contents_ty: ty::t,
|
contents_ty: ty::t,
|
||||||
heap: heap) -> DatumBlock {
|
heap: heap) -> DatumBlock {
|
||||||
let _icx = push_ctxt("trans_boxed_expr");
|
let _icx = push_ctxt("trans_boxed_expr");
|
||||||
|
@ -1416,7 +1416,7 @@ fn trans_unary_datum(bcx: @mut Block,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn trans_addr_of(bcx: @mut Block, expr: &ast::Expr,
|
fn trans_addr_of(bcx: @mut Block, expr: &ast::Expr,
|
||||||
subexpr: @ast::Expr) -> DatumBlock {
|
subexpr: &ast::Expr) -> DatumBlock {
|
||||||
let _icx = push_ctxt("trans_addr_of");
|
let _icx = push_ctxt("trans_addr_of");
|
||||||
let mut bcx = bcx;
|
let mut bcx = bcx;
|
||||||
let sub_datum = unpack_datum!(bcx, trans_to_datum(bcx, subexpr));
|
let sub_datum = unpack_datum!(bcx, trans_to_datum(bcx, subexpr));
|
||||||
|
@ -1532,8 +1532,8 @@ enum lazy_binop_ty { lazy_and, lazy_or }
|
||||||
fn trans_lazy_binop(bcx: @mut Block,
|
fn trans_lazy_binop(bcx: @mut Block,
|
||||||
binop_expr: &ast::Expr,
|
binop_expr: &ast::Expr,
|
||||||
op: lazy_binop_ty,
|
op: lazy_binop_ty,
|
||||||
a: @ast::Expr,
|
a: &ast::Expr,
|
||||||
b: @ast::Expr) -> DatumBlock {
|
b: &ast::Expr) -> DatumBlock {
|
||||||
let _icx = push_ctxt("trans_lazy_binop");
|
let _icx = push_ctxt("trans_lazy_binop");
|
||||||
let binop_ty = expr_ty(bcx, binop_expr);
|
let binop_ty = expr_ty(bcx, binop_expr);
|
||||||
let bcx = bcx;
|
let bcx = bcx;
|
||||||
|
@ -1577,8 +1577,8 @@ fn trans_lazy_binop(bcx: @mut Block,
|
||||||
fn trans_binary(bcx: @mut Block,
|
fn trans_binary(bcx: @mut Block,
|
||||||
binop_expr: &ast::Expr,
|
binop_expr: &ast::Expr,
|
||||||
op: ast::BinOp,
|
op: ast::BinOp,
|
||||||
lhs: @ast::Expr,
|
lhs: &ast::Expr,
|
||||||
rhs: @ast::Expr) -> DatumBlock
|
rhs: &ast::Expr) -> DatumBlock
|
||||||
{
|
{
|
||||||
let _icx = push_ctxt("trans_binary");
|
let _icx = push_ctxt("trans_binary");
|
||||||
|
|
||||||
|
@ -1603,7 +1603,7 @@ fn trans_binary(bcx: @mut Block,
|
||||||
fn trans_overloaded_op(bcx: @mut Block,
|
fn trans_overloaded_op(bcx: @mut Block,
|
||||||
expr: &ast::Expr,
|
expr: &ast::Expr,
|
||||||
callee_id: ast::NodeId,
|
callee_id: ast::NodeId,
|
||||||
rcvr: @ast::Expr,
|
rcvr: &ast::Expr,
|
||||||
args: ~[@ast::Expr],
|
args: ~[@ast::Expr],
|
||||||
ret_ty: ty::t,
|
ret_ty: ty::t,
|
||||||
dest: Dest)
|
dest: Dest)
|
||||||
|
@ -1679,7 +1679,7 @@ pub fn cast_type_kind(t: ty::t) -> cast_kind {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn trans_imm_cast(bcx: @mut Block, expr: @ast::Expr,
|
fn trans_imm_cast(bcx: @mut Block, expr: &ast::Expr,
|
||||||
id: ast::NodeId) -> DatumBlock {
|
id: ast::NodeId) -> DatumBlock {
|
||||||
let _icx = push_ctxt("trans_cast");
|
let _icx = push_ctxt("trans_cast");
|
||||||
let ccx = bcx.ccx();
|
let ccx = bcx.ccx();
|
||||||
|
@ -1748,10 +1748,10 @@ fn trans_imm_cast(bcx: @mut Block, expr: @ast::Expr,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn trans_assign_op(bcx: @mut Block,
|
fn trans_assign_op(bcx: @mut Block,
|
||||||
expr: @ast::Expr,
|
expr: &ast::Expr,
|
||||||
callee_id: ast::NodeId,
|
callee_id: ast::NodeId,
|
||||||
op: ast::BinOp,
|
op: ast::BinOp,
|
||||||
dst: @ast::Expr,
|
dst: &ast::Expr,
|
||||||
src: @ast::Expr) -> @mut Block
|
src: @ast::Expr) -> @mut Block
|
||||||
{
|
{
|
||||||
let _icx = push_ctxt("trans_assign_op");
|
let _icx = push_ctxt("trans_assign_op");
|
||||||
|
|
|
@ -139,7 +139,7 @@ pub fn trans_method(ccx: @mut CrateContext,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn trans_self_arg(bcx: @mut Block,
|
pub fn trans_self_arg(bcx: @mut Block,
|
||||||
base: @ast::Expr,
|
base: &ast::Expr,
|
||||||
temp_cleanups: &mut ~[ValueRef],
|
temp_cleanups: &mut ~[ValueRef],
|
||||||
mentry: typeck::method_map_entry) -> Result {
|
mentry: typeck::method_map_entry) -> Result {
|
||||||
let _icx = push_ctxt("impl::trans_self_arg");
|
let _icx = push_ctxt("impl::trans_self_arg");
|
||||||
|
@ -156,7 +156,7 @@ pub fn trans_self_arg(bcx: @mut Block,
|
||||||
|
|
||||||
pub fn trans_method_callee(bcx: @mut Block,
|
pub fn trans_method_callee(bcx: @mut Block,
|
||||||
callee_id: ast::NodeId,
|
callee_id: ast::NodeId,
|
||||||
this: @ast::Expr,
|
this: &ast::Expr,
|
||||||
mentry: typeck::method_map_entry)
|
mentry: typeck::method_map_entry)
|
||||||
-> Callee {
|
-> Callee {
|
||||||
let _icx = push_ctxt("impl::trans_method_callee");
|
let _icx = push_ctxt("impl::trans_method_callee");
|
||||||
|
@ -313,7 +313,7 @@ pub fn method_with_name(ccx: &mut CrateContext,
|
||||||
|
|
||||||
pub fn trans_monomorphized_callee(bcx: @mut Block,
|
pub fn trans_monomorphized_callee(bcx: @mut Block,
|
||||||
callee_id: ast::NodeId,
|
callee_id: ast::NodeId,
|
||||||
base: @ast::Expr,
|
base: &ast::Expr,
|
||||||
mentry: typeck::method_map_entry,
|
mentry: typeck::method_map_entry,
|
||||||
trait_id: ast::DefId,
|
trait_id: ast::DefId,
|
||||||
n_method: uint,
|
n_method: uint,
|
||||||
|
@ -420,7 +420,7 @@ pub fn combine_impl_and_methods_tps(bcx: @mut Block,
|
||||||
pub fn trans_trait_callee(bcx: @mut Block,
|
pub fn trans_trait_callee(bcx: @mut Block,
|
||||||
callee_id: ast::NodeId,
|
callee_id: ast::NodeId,
|
||||||
n_method: uint,
|
n_method: uint,
|
||||||
self_expr: @ast::Expr)
|
self_expr: &ast::Expr)
|
||||||
-> Callee {
|
-> Callee {
|
||||||
/*!
|
/*!
|
||||||
* Create a method callee where the method is coming from a trait
|
* Create a method callee where the method is coming from a trait
|
||||||
|
@ -630,7 +630,7 @@ fn emit_vtable_methods(bcx: @mut Block,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn trans_trait_cast(bcx: @mut Block,
|
pub fn trans_trait_cast(bcx: @mut Block,
|
||||||
val: @ast::Expr,
|
val: &ast::Expr,
|
||||||
id: ast::NodeId,
|
id: ast::NodeId,
|
||||||
dest: expr::Dest,
|
dest: expr::Dest,
|
||||||
_store: ty::TraitStore)
|
_store: ty::TraitStore)
|
||||||
|
|
|
@ -158,7 +158,7 @@ impl VecTypes {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn trans_fixed_vstore(bcx: @mut Block,
|
pub fn trans_fixed_vstore(bcx: @mut Block,
|
||||||
vstore_expr: @ast::Expr,
|
vstore_expr: &ast::Expr,
|
||||||
content_expr: &ast::Expr,
|
content_expr: &ast::Expr,
|
||||||
dest: expr::Dest)
|
dest: expr::Dest)
|
||||||
-> @mut Block {
|
-> @mut Block {
|
||||||
|
@ -187,8 +187,8 @@ pub fn trans_fixed_vstore(bcx: @mut Block,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn trans_slice_vstore(bcx: @mut Block,
|
pub fn trans_slice_vstore(bcx: @mut Block,
|
||||||
vstore_expr: @ast::Expr,
|
vstore_expr: &ast::Expr,
|
||||||
content_expr: @ast::Expr,
|
content_expr: &ast::Expr,
|
||||||
dest: expr::Dest)
|
dest: expr::Dest)
|
||||||
-> @mut Block {
|
-> @mut Block {
|
||||||
//!
|
//!
|
||||||
|
@ -246,7 +246,7 @@ pub fn trans_slice_vstore(bcx: @mut Block,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn trans_lit_str(bcx: @mut Block,
|
pub fn trans_lit_str(bcx: @mut Block,
|
||||||
lit_expr: @ast::Expr,
|
lit_expr: &ast::Expr,
|
||||||
str_lit: @str,
|
str_lit: @str,
|
||||||
dest: Dest)
|
dest: Dest)
|
||||||
-> @mut Block {
|
-> @mut Block {
|
||||||
|
@ -280,7 +280,7 @@ pub fn trans_lit_str(bcx: @mut Block,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub fn trans_uniq_or_managed_vstore(bcx: @mut Block, heap: heap, vstore_expr: @ast::Expr,
|
pub fn trans_uniq_or_managed_vstore(bcx: @mut Block, heap: heap, vstore_expr: &ast::Expr,
|
||||||
content_expr: &ast::Expr) -> DatumBlock {
|
content_expr: &ast::Expr) -> DatumBlock {
|
||||||
//!
|
//!
|
||||||
//
|
//
|
||||||
|
@ -343,7 +343,7 @@ pub fn trans_uniq_or_managed_vstore(bcx: @mut Block, heap: heap, vstore_expr: @a
|
||||||
|
|
||||||
pub fn write_content(bcx: @mut Block,
|
pub fn write_content(bcx: @mut Block,
|
||||||
vt: &VecTypes,
|
vt: &VecTypes,
|
||||||
vstore_expr: @ast::Expr,
|
vstore_expr: &ast::Expr,
|
||||||
content_expr: &ast::Expr,
|
content_expr: &ast::Expr,
|
||||||
dest: Dest)
|
dest: Dest)
|
||||||
-> @mut Block {
|
-> @mut Block {
|
||||||
|
|
Loading…
Reference in New Issue