Rollup merge of #62859 - spastorino:rename-to-as-ref, r=Centril
Place::as_place_ref is now Place::as_ref r? @oli-obk
This commit is contained in:
commit
b2155dd747
22 changed files with 93 additions and 93 deletions
|
|
@ -238,7 +238,7 @@ impl<'mir, 'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> Visitor<'tcx>
|
|||
context: PlaceContext,
|
||||
location: Location) {
|
||||
debug!("visit_place(place={:?}, context={:?})", place, context);
|
||||
self.process_place(&place.as_place_ref(), context, location);
|
||||
self.process_place(&place.as_ref(), context, location);
|
||||
}
|
||||
|
||||
fn visit_local(&mut self,
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
|
||||
PassMode::Direct(_) | PassMode::Pair(..) => {
|
||||
let op =
|
||||
self.codegen_consume(&mut bx, &mir::Place::RETURN_PLACE.as_place_ref());
|
||||
self.codegen_consume(&mut bx, &mir::Place::RETURN_PLACE.as_ref());
|
||||
if let Ref(llval, _, align) = op.val {
|
||||
bx.load(llval, align)
|
||||
} else {
|
||||
|
|
@ -314,7 +314,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
return
|
||||
}
|
||||
|
||||
let place = self.codegen_place(&mut bx, &location.as_place_ref());
|
||||
let place = self.codegen_place(&mut bx, &location.as_ref());
|
||||
let (args1, args2);
|
||||
let mut args = if let Some(llextra) = place.llextra {
|
||||
args2 = [place.llval, llextra];
|
||||
|
|
@ -1171,7 +1171,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
LocalRef::Place(place) => self.codegen_transmute_into(bx, src, place),
|
||||
LocalRef::UnsizedPlace(_) => bug!("transmute must not involve unsized locals"),
|
||||
LocalRef::Operand(None) => {
|
||||
let dst_layout = bx.layout_of(self.monomorphized_place_ty(&dst.as_place_ref()));
|
||||
let dst_layout = bx.layout_of(self.monomorphized_place_ty(&dst.as_ref()));
|
||||
assert!(!dst_layout.ty.has_erasable_regions());
|
||||
let place = PlaceRef::alloca(bx, dst_layout, "transmute_temp");
|
||||
place.storage_live(bx);
|
||||
|
|
@ -1186,7 +1186,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
let dst = self.codegen_place(bx, &dst.as_place_ref());
|
||||
let dst = self.codegen_place(bx, &dst.as_ref());
|
||||
self.codegen_transmute_into(bx, src, dst);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -462,7 +462,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
match *operand {
|
||||
mir::Operand::Copy(ref place) |
|
||||
mir::Operand::Move(ref place) => {
|
||||
self.codegen_consume(bx, &place.as_place_ref())
|
||||
self.codegen_consume(bx, &place.as_ref())
|
||||
}
|
||||
|
||||
mir::Operand::Constant(ref constant) => {
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
}
|
||||
|
||||
mir::Rvalue::Ref(_, bk, ref place) => {
|
||||
let cg_place = self.codegen_place(&mut bx, &place.as_place_ref());
|
||||
let cg_place = self.codegen_place(&mut bx, &place.as_ref());
|
||||
|
||||
let ty = cg_place.layout.ty;
|
||||
|
||||
|
|
@ -446,7 +446,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
|
||||
mir::Rvalue::Discriminant(ref place) => {
|
||||
let discr_ty = rvalue.ty(&*self.mir, bx.tcx());
|
||||
let discr = self.codegen_place(&mut bx, &place.as_place_ref())
|
||||
let discr = self.codegen_place(&mut bx, &place.as_ref())
|
||||
.codegen_get_discr(&mut bx, discr_ty);
|
||||
(bx, OperandRef {
|
||||
val: OperandValue::Immediate(discr),
|
||||
|
|
@ -527,7 +527,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
}
|
||||
}
|
||||
// use common size calculation for non zero-sized types
|
||||
let cg_value = self.codegen_place(bx, &place.as_place_ref());
|
||||
let cg_value = self.codegen_place(bx, &place.as_ref());
|
||||
cg_value.len(bx.cx())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,12 +46,12 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
let cg_dest = self.codegen_place(&mut bx, &place.as_place_ref());
|
||||
let cg_dest = self.codegen_place(&mut bx, &place.as_ref());
|
||||
self.codegen_rvalue(bx, cg_dest, rvalue)
|
||||
}
|
||||
}
|
||||
mir::StatementKind::SetDiscriminant{ref place, variant_index} => {
|
||||
self.codegen_place(&mut bx, &place.as_place_ref())
|
||||
self.codegen_place(&mut bx, &place.as_ref())
|
||||
.codegen_set_discr(&mut bx, variant_index);
|
||||
bx
|
||||
}
|
||||
|
|
@ -73,7 +73,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
}
|
||||
mir::StatementKind::InlineAsm(ref asm) => {
|
||||
let outputs = asm.outputs.iter().map(|output| {
|
||||
self.codegen_place(&mut bx, &output.as_place_ref())
|
||||
self.codegen_place(&mut bx, &output.as_ref())
|
||||
}).collect();
|
||||
|
||||
let input_vals = asm.inputs.iter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue