@@ -17,7 +17,7 @@ use rustc_span::def_id::LocalDefId;
1717use  rustc_span:: { Span ,  DUMMY_SP } ; 
1818use  rustc_target:: abi:: { self ,  Abi } ; 
1919
20- use  super :: { CanAccessMutGlobal ,  CompileTimeEvalContext ,   CompileTimeInterpreter } ; 
20+ use  super :: { CanAccessMutGlobal ,  CompileTimeInterpCx ,   CompileTimeMachine } ; 
2121use  crate :: const_eval:: CheckAlignment ; 
2222use  crate :: errors:: ConstEvalError ; 
2323use  crate :: errors:: { self ,  DanglingPtrInFinal } ; 
@@ -32,7 +32,7 @@ use crate::CTRL_C_RECEIVED;
3232// Returns a pointer to where the result lives 
3333#[ instrument( level = "trace" ,  skip( ecx,  body) ) ]  
3434fn  eval_body_using_ecx < ' tcx ,  R :  InterpretationResult < ' tcx > > ( 
35-     ecx :  & mut  CompileTimeEvalContext < ' tcx > , 
35+     ecx :  & mut  CompileTimeInterpCx < ' tcx > , 
3636    cid :  GlobalId < ' tcx > , 
3737    body :  & ' tcx  mir:: Body < ' tcx > , 
3838)  -> InterpResult < ' tcx ,  R >  { 
@@ -139,13 +139,13 @@ pub(crate) fn mk_eval_cx_to_read_const_val<'tcx>(
139139    root_span :  Span , 
140140    param_env :  ty:: ParamEnv < ' tcx > , 
141141    can_access_mut_global :  CanAccessMutGlobal , 
142- )  -> CompileTimeEvalContext < ' tcx >  { 
142+ )  -> CompileTimeInterpCx < ' tcx >  { 
143143    debug ! ( "mk_eval_cx: {:?}" ,  param_env) ; 
144144    InterpCx :: new ( 
145145        tcx, 
146146        root_span, 
147147        param_env, 
148-         CompileTimeInterpreter :: new ( can_access_mut_global,  CheckAlignment :: No ) , 
148+         CompileTimeMachine :: new ( can_access_mut_global,  CheckAlignment :: No ) , 
149149    ) 
150150} 
151151
@@ -156,7 +156,7 @@ pub fn mk_eval_cx_for_const_val<'tcx>(
156156    param_env :  ty:: ParamEnv < ' tcx > , 
157157    val :  mir:: ConstValue < ' tcx > , 
158158    ty :  Ty < ' tcx > , 
159- )  -> Option < ( CompileTimeEvalContext < ' tcx > ,  OpTy < ' tcx > ) >  { 
159+ )  -> Option < ( CompileTimeInterpCx < ' tcx > ,  OpTy < ' tcx > ) >  { 
160160    let  ecx = mk_eval_cx_to_read_const_val ( tcx. tcx ,  tcx. span ,  param_env,  CanAccessMutGlobal :: No ) ; 
161161    let  op = ecx. const_val_to_op ( val,  ty,  None ) . ok ( ) ?; 
162162    Some ( ( ecx,  op) ) 
@@ -170,7 +170,7 @@ pub fn mk_eval_cx_for_const_val<'tcx>(
170170/// encounter an `Indirect` they cannot handle. 
171171#[ instrument( skip( ecx) ,  level = "debug" ) ]  
172172pub ( super )  fn  op_to_const < ' tcx > ( 
173-     ecx :  & CompileTimeEvalContext < ' tcx > , 
173+     ecx :  & CompileTimeInterpCx < ' tcx > , 
174174    op :  & OpTy < ' tcx > , 
175175    for_diagnostics :  bool , 
176176)  -> ConstValue < ' tcx >  { 
@@ -328,14 +328,14 @@ pub trait InterpretationResult<'tcx> {
328328     /// evaluation query. 
329329     fn  make_result ( 
330330        mplace :  MPlaceTy < ' tcx > , 
331-         ecx :  & mut  InterpCx < ' tcx ,  CompileTimeInterpreter < ' tcx > > , 
331+         ecx :  & mut  InterpCx < ' tcx ,  CompileTimeMachine < ' tcx > > , 
332332    )  -> Self ; 
333333} 
334334
335335impl < ' tcx >  InterpretationResult < ' tcx >  for  ConstAlloc < ' tcx >  { 
336336    fn  make_result ( 
337337        mplace :  MPlaceTy < ' tcx > , 
338-         _ecx :  & mut  InterpCx < ' tcx ,  CompileTimeInterpreter < ' tcx > > , 
338+         _ecx :  & mut  InterpCx < ' tcx ,  CompileTimeMachine < ' tcx > > , 
339339    )  -> Self  { 
340340        ConstAlloc  {  alloc_id :  mplace. ptr ( ) . provenance . unwrap ( ) . alloc_id ( ) ,  ty :  mplace. layout . ty  } 
341341    } 
@@ -383,7 +383,7 @@ fn eval_in_interpreter<'tcx, R: InterpretationResult<'tcx>>(
383383        // they do not have to behave "as if" they were evaluated at runtime. 
384384        // For consts however we want to ensure they behave "as if" they were evaluated at runtime, 
385385        // so we have to reject reading mutable global memory. 
386-         CompileTimeInterpreter :: new ( CanAccessMutGlobal :: from ( is_static) ,  CheckAlignment :: Error ) , 
386+         CompileTimeMachine :: new ( CanAccessMutGlobal :: from ( is_static) ,  CheckAlignment :: Error ) , 
387387    ) ; 
388388    let  res = ecx. load_mir ( cid. instance . def ,  cid. promoted ) ; 
389389    res. and_then ( |body| eval_body_using_ecx ( & mut  ecx,  cid,  body) ) . map_err ( |error| { 
@@ -417,7 +417,7 @@ fn eval_in_interpreter<'tcx, R: InterpretationResult<'tcx>>(
417417
418418#[ inline( always) ]  
419419fn  const_validate_mplace < ' tcx > ( 
420-     ecx :  & InterpCx < ' tcx ,  CompileTimeInterpreter < ' tcx > > , 
420+     ecx :  & InterpCx < ' tcx ,  CompileTimeMachine < ' tcx > > , 
421421    mplace :  & MPlaceTy < ' tcx > , 
422422    cid :  GlobalId < ' tcx > , 
423423)  -> Result < ( ) ,  ErrorHandled >  { 
@@ -447,7 +447,7 @@ fn const_validate_mplace<'tcx>(
447447
448448#[ inline( always) ]  
449449fn  report_validation_error < ' tcx > ( 
450-     ecx :  & InterpCx < ' tcx ,  CompileTimeInterpreter < ' tcx > > , 
450+     ecx :  & InterpCx < ' tcx ,  CompileTimeMachine < ' tcx > > , 
451451    error :  InterpErrorInfo < ' tcx > , 
452452    alloc_id :  AllocId , 
453453)  -> ErrorHandled  { 
0 commit comments