Rustup to rustc 1.38.0-nightly (a7f28678b
2019-07-23)
This commit is contained in:
parent
853234006e
commit
92f2b6243d
@ -47,8 +47,8 @@ pub fn analyze<'a, 'tcx: 'a>(fx: &FunctionCx<'a, 'tcx, impl Backend>) -> HashMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn analyze_non_ssa_place(flag_map: &mut HashMap<Local, Flags>, place: &Place) {
|
fn analyze_non_ssa_place(flag_map: &mut HashMap<Local, Flags>, place: &Place) {
|
||||||
match place {
|
match place.base {
|
||||||
Place::Base(PlaceBase::Local(local)) => not_ssa(flag_map, local),
|
PlaceBase::Local(local) => not_ssa(flag_map, local),
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
24
src/base.rs
24
src/base.rs
@ -1148,8 +1148,7 @@ pub fn trans_place<'a, 'tcx: 'a>(
|
|||||||
fx: &mut FunctionCx<'a, 'tcx, impl Backend>,
|
fx: &mut FunctionCx<'a, 'tcx, impl Backend>,
|
||||||
place: &Place<'tcx>,
|
place: &Place<'tcx>,
|
||||||
) -> CPlace<'tcx> {
|
) -> CPlace<'tcx> {
|
||||||
match place {
|
let base = match &place.base {
|
||||||
Place::Base(base) => match base {
|
|
||||||
PlaceBase::Local(local) => fx.get_local_place(*local),
|
PlaceBase::Local(local) => fx.get_local_place(*local),
|
||||||
PlaceBase::Static(static_) => match static_.kind {
|
PlaceBase::Static(static_) => match static_.kind {
|
||||||
StaticKind::Static(def_id) => {
|
StaticKind::Static(def_id) => {
|
||||||
@ -1159,9 +1158,24 @@ pub fn trans_place<'a, 'tcx: 'a>(
|
|||||||
crate::constant::trans_promoted(fx, promoted, static_.ty)
|
crate::constant::trans_promoted(fx, promoted, static_.ty)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
trans_place_projection(fx, base, &place.projection)
|
||||||
}
|
}
|
||||||
Place::Projection(projection) => {
|
|
||||||
let base = trans_place(fx, &projection.base);
|
pub fn trans_place_projection<'a, 'tcx: 'a>(
|
||||||
|
fx: &mut FunctionCx<'a, 'tcx, impl Backend>,
|
||||||
|
base: CPlace<'tcx>,
|
||||||
|
projection: &Option<Box<Projection<'tcx>>>,
|
||||||
|
) -> CPlace<'tcx> {
|
||||||
|
let projection = if let Some(projection) = projection {
|
||||||
|
projection
|
||||||
|
} else {
|
||||||
|
return base;
|
||||||
|
};
|
||||||
|
|
||||||
|
let base = trans_place_projection(fx, base, &projection.base);
|
||||||
|
|
||||||
match projection.elem {
|
match projection.elem {
|
||||||
ProjectionElem::Deref => base.place_deref(fx),
|
ProjectionElem::Deref => base.place_deref(fx),
|
||||||
ProjectionElem::Field(field, _ty) => base.place_field(fx, field),
|
ProjectionElem::Field(field, _ty) => base.place_field(fx, field),
|
||||||
@ -1212,8 +1226,6 @@ pub fn trans_place<'a, 'tcx: 'a>(
|
|||||||
ProjectionElem::Downcast(_adt_def, variant) => base.downcast_variant(fx, variant),
|
ProjectionElem::Downcast(_adt_def, variant) => base.downcast_variant(fx, variant),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn trans_operand<'a, 'tcx>(
|
pub fn trans_operand<'a, 'tcx>(
|
||||||
fx: &mut FunctionCx<'a, 'tcx, impl Backend>,
|
fx: &mut FunctionCx<'a, 'tcx, impl Backend>,
|
||||||
|
Loading…
Reference in New Issue
Block a user