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) {
|
||||
match place {
|
||||
Place::Base(PlaceBase::Local(local)) => not_ssa(flag_map, local),
|
||||
match place.base {
|
||||
PlaceBase::Local(local) => not_ssa(flag_map, local),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
26
src/base.rs
26
src/base.rs
@ -1148,8 +1148,7 @@ pub fn trans_place<'a, 'tcx: 'a>(
|
||||
fx: &mut FunctionCx<'a, 'tcx, impl Backend>,
|
||||
place: &Place<'tcx>,
|
||||
) -> CPlace<'tcx> {
|
||||
match place {
|
||||
Place::Base(base) => match base {
|
||||
let base = match &place.base {
|
||||
PlaceBase::Local(local) => fx.get_local_place(*local),
|
||||
PlaceBase::Static(static_) => match static_.kind {
|
||||
StaticKind::Static(def_id) => {
|
||||
@ -1159,9 +1158,24 @@ pub fn trans_place<'a, 'tcx: 'a>(
|
||||
crate::constant::trans_promoted(fx, promoted, static_.ty)
|
||||
}
|
||||
}
|
||||
}
|
||||
Place::Projection(projection) => {
|
||||
let base = trans_place(fx, &projection.base);
|
||||
};
|
||||
|
||||
trans_place_projection(fx, base, &place.projection)
|
||||
}
|
||||
|
||||
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 {
|
||||
ProjectionElem::Deref => base.place_deref(fx),
|
||||
ProjectionElem::Field(field, _ty) => base.place_field(fx, field),
|
||||
@ -1211,8 +1225,6 @@ pub fn trans_place<'a, 'tcx: 'a>(
|
||||
}
|
||||
ProjectionElem::Downcast(_adt_def, variant) => base.downcast_variant(fx, variant),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn trans_operand<'a, 'tcx>(
|
||||
|
Loading…
Reference in New Issue
Block a user