@@ -21,7 +21,7 @@ use rand::RngCore;
21
21
22
22
use crate :: * ;
23
23
24
- impl < ' mir , ' tcx : ' mir > EvalContextExt < ' mir , ' tcx > for crate :: MiriEvalContext < ' mir , ' tcx > { }
24
+ impl < ' mir , ' tcx : ' mir > EvalContextExt < ' mir , ' tcx > for crate :: MiriInterpCx < ' mir , ' tcx > { }
25
25
26
26
// This mapping should match `decode_error_kind` in
27
27
// <https://github.com/rust-lang/rust/blob/master/library/std/src/sys/unix/mod.rs>.
@@ -96,7 +96,7 @@ fn try_resolve_did<'tcx>(tcx: TyCtxt<'tcx>, path: &[&str]) -> Option<DefId> {
96
96
)
97
97
}
98
98
99
- pub trait EvalContextExt < ' mir , ' tcx : ' mir > : crate :: MiriEvalContextExt < ' mir , ' tcx > {
99
+ pub trait EvalContextExt < ' mir , ' tcx : ' mir > : crate :: MiriInterpCxExt < ' mir , ' tcx > {
100
100
/// Gets an instance for a path; fails gracefully if the path does not exist.
101
101
fn try_resolve_path ( & self , path : & [ & str ] ) -> Option < ty:: Instance < ' tcx > > {
102
102
let did = try_resolve_did ( self . eval_context_ref ( ) . tcx . tcx , path) ?;
@@ -391,19 +391,19 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
391
391
where
392
392
F : FnMut ( & MPlaceTy < ' tcx , Provenance > ) -> InterpResult < ' tcx > ,
393
393
{
394
- ecx : & ' ecx MiriEvalContext < ' mir , ' tcx > ,
394
+ ecx : & ' ecx MiriInterpCx < ' mir , ' tcx > ,
395
395
unsafe_cell_action : F ,
396
396
}
397
397
398
- impl < ' ecx , ' mir , ' tcx : ' mir , F > ValueVisitor < ' mir , ' tcx , Evaluator < ' mir , ' tcx > >
398
+ impl < ' ecx , ' mir , ' tcx : ' mir , F > ValueVisitor < ' mir , ' tcx , MiriMachine < ' mir , ' tcx > >
399
399
for UnsafeCellVisitor < ' ecx , ' mir , ' tcx , F >
400
400
where
401
401
F : FnMut ( & MPlaceTy < ' tcx , Provenance > ) -> InterpResult < ' tcx > ,
402
402
{
403
403
type V = MPlaceTy < ' tcx , Provenance > ;
404
404
405
405
#[ inline( always) ]
406
- fn ecx ( & self ) -> & MiriEvalContext < ' mir , ' tcx > {
406
+ fn ecx ( & self ) -> & MiriInterpCx < ' mir , ' tcx > {
407
407
self . ecx
408
408
}
409
409
@@ -883,7 +883,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
883
883
}
884
884
}
885
885
886
- impl < ' mir , ' tcx > Evaluator < ' mir , ' tcx > {
886
+ impl < ' mir , ' tcx > MiriMachine < ' mir , ' tcx > {
887
887
pub fn current_span ( & self ) -> CurrentSpan < ' _ , ' mir , ' tcx > {
888
888
CurrentSpan { current_frame_idx : None , machine : self }
889
889
}
@@ -896,11 +896,11 @@ impl<'mir, 'tcx> Evaluator<'mir, 'tcx> {
896
896
#[ derive( Clone ) ]
897
897
pub struct CurrentSpan < ' a , ' mir , ' tcx > {
898
898
current_frame_idx : Option < usize > ,
899
- machine : & ' a Evaluator < ' mir , ' tcx > ,
899
+ machine : & ' a MiriMachine < ' mir , ' tcx > ,
900
900
}
901
901
902
902
impl < ' a , ' mir : ' a , ' tcx : ' a + ' mir > CurrentSpan < ' a , ' mir , ' tcx > {
903
- pub fn machine ( & self ) -> & ' a Evaluator < ' mir , ' tcx > {
903
+ pub fn machine ( & self ) -> & ' a MiriMachine < ' mir , ' tcx > {
904
904
self . machine
905
905
}
906
906
@@ -919,7 +919,7 @@ impl<'a, 'mir: 'a, 'tcx: 'a + 'mir> CurrentSpan<'a, 'mir, 'tcx> {
919
919
Self :: frame_span ( self . machine , idx. wrapping_sub ( 1 ) )
920
920
}
921
921
922
- fn frame_span ( machine : & Evaluator < ' _ , ' _ > , idx : usize ) -> Span {
922
+ fn frame_span ( machine : & MiriMachine < ' _ , ' _ > , idx : usize ) -> Span {
923
923
machine
924
924
. threads
925
925
. active_thread_stack ( )
@@ -937,7 +937,7 @@ impl<'a, 'mir: 'a, 'tcx: 'a + 'mir> CurrentSpan<'a, 'mir, 'tcx> {
937
937
// Find the position of the inner-most frame which is part of the crate being
938
938
// compiled/executed, part of the Cargo workspace, and is also not #[track_caller].
939
939
#[ inline( never) ]
940
- fn compute_current_frame_index ( machine : & Evaluator < ' _ , ' _ > ) -> usize {
940
+ fn compute_current_frame_index ( machine : & MiriMachine < ' _ , ' _ > ) -> usize {
941
941
machine
942
942
. threads
943
943
. active_thread_stack ( )
0 commit comments