提交 03d38d42 编写于 作者: O Oliver Scherer

Address review comments

上级 de7c8366
......@@ -101,7 +101,7 @@ pub enum MirPhase {
/// After this phase, generators are explicit state machines (no more `Yield`).
/// `AggregateKind::Generator` is gone for good.
GeneratorLowering = 4,
Optimized = 5,
Optimization = 5,
}
impl MirPhase {
......
......@@ -436,7 +436,7 @@ impl<'mir, 'tcx: 'mir, M: super::intern::CompileTimeMachine<'mir, 'tcx>> InterpC
/// A helper function that allocates memory for the layout given and gives you access to mutate
/// it. Once your own mutation code is done, the backing `Allocation` is removed from the
/// current `Memory` and returned.
pub(crate) fn with_temp_alloc(
pub(crate) fn intern_with_temp_alloc(
&mut self,
layout: TyAndLayout<'tcx>,
f: impl FnOnce(
......
......@@ -845,7 +845,7 @@ fn replace_with_const(
if ty_is_scalar(ty1) && ty_is_scalar(ty2) {
let alloc = this
.ecx
.with_temp_alloc(value.layout, |ecx, dest| {
.intern_with_temp_alloc(value.layout, |ecx, dest| {
ecx.write_immediate_to_mplace(*imm, dest)
})
.unwrap();
......
......@@ -228,7 +228,7 @@ pub fn run_passes(
body.phase = mir_phase;
if mir_phase == MirPhase::Optimized {
if mir_phase == MirPhase::Optimization {
validate::Validator { when: format!("end of phase {:?}", mir_phase), mir_phase }
.run_pass(tcx, source, body);
}
......@@ -504,7 +504,7 @@ fn run_optimization_passes<'tcx>(
body,
InstanceDef::Item(ty::WithOptConstParam::unknown(def_id.to_def_id())),
promoted,
MirPhase::Optimized,
MirPhase::Optimization,
&[
if mir_opt_level > 0 { optimizations } else { no_optimizations },
pre_codegen_cleanup,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册