@@ -5,7 +5,7 @@ use rustc::mir::interpret::{
5
5
} ;
6
6
use rustc:: ty:: Const ;
7
7
use rustc_mir:: interpret:: {
8
- EvalContext , ImmTy , MPlaceTy , Machine , Memory , MemoryKind , OpTy , PlaceTy , Pointer ,
8
+ InterpretCx , ImmTy , MPlaceTy , Machine , Memory , MemoryKind , OpTy , PlaceTy , Pointer ,
9
9
StackPopCleanup ,
10
10
} ;
11
11
@@ -135,7 +135,7 @@ fn trans_const_place<'a, 'tcx: 'a>(
135
135
) -> CPlace < ' tcx > {
136
136
// Adapted from https://github.com/rust-lang/rust/pull/53671/files#diff-e0b58bb6712edaa8595ad7237542c958L551
137
137
let result = || -> EvalResult < ' tcx , & ' tcx Allocation > {
138
- let mut ecx = EvalContext :: new (
138
+ let mut ecx = InterpretCx :: new (
139
139
fx. tcx . at ( DUMMY_SP ) ,
140
140
ty:: ParamEnv :: reveal_all ( ) ,
141
141
TransPlaceInterpreter ,
@@ -338,16 +338,16 @@ impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for TransPlaceInterpreter {
338
338
type MemoryMap = FxHashMap < AllocId , ( MemoryKind < !> , Allocation < ( ) > ) > ;
339
339
const STATIC_KIND : Option < !> = None ;
340
340
341
- fn enforce_validity ( _: & EvalContext < ' a , ' mir , ' tcx , Self > ) -> bool {
341
+ fn enforce_validity ( _: & InterpretCx < ' a , ' mir , ' tcx , Self > ) -> bool {
342
342
false
343
343
}
344
344
345
- fn before_terminator ( _: & mut EvalContext < ' a , ' mir , ' tcx , Self > ) -> EvalResult < ' tcx > {
345
+ fn before_terminator ( _: & mut InterpretCx < ' a , ' mir , ' tcx , Self > ) -> EvalResult < ' tcx > {
346
346
panic ! ( ) ;
347
347
}
348
348
349
349
fn find_fn (
350
- _: & mut EvalContext < ' a , ' mir , ' tcx , Self > ,
350
+ _: & mut InterpretCx < ' a , ' mir , ' tcx , Self > ,
351
351
_: Instance < ' tcx > ,
352
352
_: & [ OpTy < ' tcx > ] ,
353
353
_: Option < PlaceTy < ' tcx > > ,
@@ -357,7 +357,7 @@ impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for TransPlaceInterpreter {
357
357
}
358
358
359
359
fn call_intrinsic (
360
- _: & mut EvalContext < ' a , ' mir , ' tcx , Self > ,
360
+ _: & mut InterpretCx < ' a , ' mir , ' tcx , Self > ,
361
361
_: Instance < ' tcx > ,
362
362
_: & [ OpTy < ' tcx > ] ,
363
363
_: PlaceTy < ' tcx > ,
@@ -374,20 +374,20 @@ impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for TransPlaceInterpreter {
374
374
}
375
375
376
376
fn ptr_op (
377
- _: & EvalContext < ' a , ' mir , ' tcx , Self > ,
377
+ _: & InterpretCx < ' a , ' mir , ' tcx , Self > ,
378
378
_: mir:: BinOp ,
379
379
_: ImmTy < ' tcx > ,
380
380
_: ImmTy < ' tcx > ,
381
381
) -> EvalResult < ' tcx , ( Scalar , bool ) > {
382
382
panic ! ( ) ;
383
383
}
384
384
385
- fn box_alloc ( _: & mut EvalContext < ' a , ' mir , ' tcx , Self > , _: PlaceTy < ' tcx > ) -> EvalResult < ' tcx > {
385
+ fn box_alloc ( _: & mut InterpretCx < ' a , ' mir , ' tcx , Self > , _: PlaceTy < ' tcx > ) -> EvalResult < ' tcx > {
386
386
panic ! ( ) ;
387
387
}
388
388
389
389
fn tag_dereference (
390
- _: & EvalContext < ' a , ' mir , ' tcx , Self > ,
390
+ _: & InterpretCx < ' a , ' mir , ' tcx , Self > ,
391
391
_: MPlaceTy < ' tcx > ,
392
392
_: Option < :: rustc:: hir:: Mutability > ,
393
393
) -> EvalResult < ' tcx , Scalar > {
@@ -402,18 +402,18 @@ impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for TransPlaceInterpreter {
402
402
}
403
403
404
404
fn tag_new_allocation (
405
- _: & mut EvalContext < ' a , ' mir , ' tcx , Self > ,
405
+ _: & mut InterpretCx < ' a , ' mir , ' tcx , Self > ,
406
406
ptr : Pointer ,
407
407
_: MemoryKind < !> ,
408
408
) -> Pointer {
409
409
ptr
410
410
}
411
411
412
- fn stack_push ( _: & mut EvalContext < ' a , ' mir , ' tcx , Self > ) -> EvalResult < ' tcx > {
412
+ fn stack_push ( _: & mut InterpretCx < ' a , ' mir , ' tcx , Self > ) -> EvalResult < ' tcx > {
413
413
Ok ( ( ) )
414
414
}
415
415
416
- fn stack_pop ( _: & mut EvalContext < ' a , ' mir , ' tcx , Self > , _: ( ) ) -> EvalResult < ' tcx > {
416
+ fn stack_pop ( _: & mut InterpretCx < ' a , ' mir , ' tcx , Self > , _: ( ) ) -> EvalResult < ' tcx > {
417
417
Ok ( ( ) )
418
418
}
419
419
}
0 commit comments