Skip to content

Commit 5ca1f85

Browse files
committed
make some names more consistent
1 parent cc149c7 commit 5ca1f85

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+196
-196
lines changed

src/concurrency/data_race.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,8 @@ impl MemoryCellClocks {
438438
}
439439

440440
/// Evaluation context extensions.
441-
impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for MiriEvalContext<'mir, 'tcx> {}
442-
pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriEvalContextExt<'mir, 'tcx> {
441+
impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for MiriInterpCx<'mir, 'tcx> {}
442+
pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
443443
/// Atomic variant of read_scalar_at_offset.
444444
fn read_scalar_at_offset_atomic(
445445
&self,
@@ -940,8 +940,8 @@ impl VClockAlloc {
940940
}
941941
}
942942

943-
impl<'mir, 'tcx: 'mir> EvalContextPrivExt<'mir, 'tcx> for MiriEvalContext<'mir, 'tcx> {}
944-
trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriEvalContextExt<'mir, 'tcx> {
943+
impl<'mir, 'tcx: 'mir> EvalContextPrivExt<'mir, 'tcx> for MiriInterpCx<'mir, 'tcx> {}
944+
trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
945945
/// Temporarily allow data-races to occur. This should only be used in
946946
/// one of these cases:
947947
/// - One of the appropriate `validate_atomic` functions will be called to
@@ -950,7 +950,7 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriEvalContextExt<'mir, 'tcx> {
950950
/// cannot be accessed by the interpreted program.
951951
/// - Execution of the interpreted program execution has halted.
952952
#[inline]
953-
fn allow_data_races_ref<R>(&self, op: impl FnOnce(&MiriEvalContext<'mir, 'tcx>) -> R) -> R {
953+
fn allow_data_races_ref<R>(&self, op: impl FnOnce(&MiriInterpCx<'mir, 'tcx>) -> R) -> R {
954954
let this = self.eval_context_ref();
955955
if let Some(data_race) = &this.machine.data_race {
956956
let old = data_race.ongoing_action_data_race_free.replace(true);
@@ -969,7 +969,7 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriEvalContextExt<'mir, 'tcx> {
969969
#[inline]
970970
fn allow_data_races_mut<R>(
971971
&mut self,
972-
op: impl FnOnce(&mut MiriEvalContext<'mir, 'tcx>) -> R,
972+
op: impl FnOnce(&mut MiriInterpCx<'mir, 'tcx>) -> R,
973973
) -> R {
974974
let this = self.eval_context_mut();
975975
if let Some(data_race) = &this.machine.data_race {

src/concurrency/sync.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ pub(crate) struct SynchronizationState {
159159
}
160160

161161
// Private extension trait for local helper methods
162-
impl<'mir, 'tcx: 'mir> EvalContextExtPriv<'mir, 'tcx> for crate::MiriEvalContext<'mir, 'tcx> {}
163-
trait EvalContextExtPriv<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx> {
162+
impl<'mir, 'tcx: 'mir> EvalContextExtPriv<'mir, 'tcx> for crate::MiriInterpCx<'mir, 'tcx> {}
163+
trait EvalContextExtPriv<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
164164
/// Take a reader out of the queue waiting for the lock.
165165
/// Returns `true` if some thread got the rwlock.
166166
#[inline]
@@ -208,8 +208,8 @@ trait EvalContextExtPriv<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
208208
// cases, the function calls are infallible and it is the client's (shim
209209
// implementation's) responsibility to detect and deal with erroneous
210210
// situations.
211-
impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriEvalContext<'mir, 'tcx> {}
212-
pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx> {
211+
impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriInterpCx<'mir, 'tcx> {}
212+
pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
213213
#[inline]
214214
/// Create state for a new mutex.
215215
fn mutex_create(&mut self) -> MutexId {
@@ -222,7 +222,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
222222
/// otherwise returns the value from the closure
223223
fn mutex_get_or_create<F>(&mut self, existing: F) -> InterpResult<'tcx, MutexId>
224224
where
225-
F: FnOnce(&mut MiriEvalContext<'mir, 'tcx>, MutexId) -> InterpResult<'tcx, Option<MutexId>>,
225+
F: FnOnce(&mut MiriInterpCx<'mir, 'tcx>, MutexId) -> InterpResult<'tcx, Option<MutexId>>,
226226
{
227227
let this = self.eval_context_mut();
228228
let next_index = this.machine.threads.sync.mutexes.next_index();
@@ -323,7 +323,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
323323
fn rwlock_get_or_create<F>(&mut self, existing: F) -> InterpResult<'tcx, RwLockId>
324324
where
325325
F: FnOnce(
326-
&mut MiriEvalContext<'mir, 'tcx>,
326+
&mut MiriInterpCx<'mir, 'tcx>,
327327
RwLockId,
328328
) -> InterpResult<'tcx, Option<RwLockId>>,
329329
{
@@ -492,7 +492,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
492492
fn condvar_get_or_create<F>(&mut self, existing: F) -> InterpResult<'tcx, CondvarId>
493493
where
494494
F: FnOnce(
495-
&mut MiriEvalContext<'mir, 'tcx>,
495+
&mut MiriInterpCx<'mir, 'tcx>,
496496
CondvarId,
497497
) -> InterpResult<'tcx, Option<CondvarId>>,
498498
{

src/concurrency/thread.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub enum SchedulingAction {
3333
/// Timeout callbacks can be created by synchronization primitives to tell the
3434
/// scheduler that they should be called once some period of time passes.
3535
type TimeoutCallback<'mir, 'tcx> =
36-
Box<dyn FnOnce(&mut InterpCx<'mir, 'tcx, Evaluator<'mir, 'tcx>>) -> InterpResult<'tcx> + 'tcx>;
36+
Box<dyn FnOnce(&mut InterpCx<'mir, 'tcx, MiriMachine<'mir, 'tcx>>) -> InterpResult<'tcx> + 'tcx>;
3737

3838
/// A thread identifier.
3939
#[derive(Clone, Copy, Debug, PartialOrd, Ord, PartialEq, Eq, Hash)]
@@ -253,7 +253,7 @@ impl<'mir, 'tcx> Default for ThreadManager<'mir, 'tcx> {
253253
}
254254

255255
impl<'mir, 'tcx: 'mir> ThreadManager<'mir, 'tcx> {
256-
pub(crate) fn init(ecx: &mut MiriEvalContext<'mir, 'tcx>) {
256+
pub(crate) fn init(ecx: &mut MiriInterpCx<'mir, 'tcx>) {
257257
if ecx.tcx.sess.target.os.as_ref() != "windows" {
258258
// The main thread can *not* be joined on except on windows.
259259
ecx.machine.threads.threads[ThreadId::new(0)].join_status = ThreadJoinStatus::Detached;
@@ -628,8 +628,8 @@ impl<'mir, 'tcx: 'mir> ThreadManager<'mir, 'tcx> {
628628
}
629629

630630
// Public interface to thread management.
631-
impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriEvalContext<'mir, 'tcx> {}
632-
pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx> {
631+
impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriInterpCx<'mir, 'tcx> {}
632+
pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
633633
/// Get a thread-specific allocation id for the given thread-local static.
634634
/// If needed, allocate a new one.
635635
fn get_or_create_thread_local_alloc(

src/concurrency/weak_memory.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,9 @@ impl StoreElement {
456456
}
457457
}
458458

459-
impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriEvalContext<'mir, 'tcx> {}
459+
impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriInterpCx<'mir, 'tcx> {}
460460
pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
461-
crate::MiriEvalContextExt<'mir, 'tcx>
461+
crate::MiriInterpCxExt<'mir, 'tcx>
462462
{
463463
// If weak memory emulation is enabled, check if this atomic op imperfectly overlaps with a previous
464464
// atomic read or write. If it does, then we require it to be ordered (non-racy) with all previous atomic
@@ -502,7 +502,7 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
502502
let (alloc_id, base_offset, ..) = this.ptr_get_alloc_id(place.ptr)?;
503503
if let (
504504
crate::AllocExtra { weak_memory: Some(alloc_buffers), .. },
505-
crate::Evaluator { data_race: Some(global), threads, .. },
505+
crate::MiriMachine { data_race: Some(global), threads, .. },
506506
) = this.get_alloc_extra_mut(alloc_id)?
507507
{
508508
if atomic == AtomicRwOrd::SeqCst {
@@ -567,7 +567,7 @@ pub(super) trait EvalContextExt<'mir, 'tcx: 'mir>:
567567
let (alloc_id, base_offset, ..) = this.ptr_get_alloc_id(dest.ptr)?;
568568
if let (
569569
crate::AllocExtra { weak_memory: Some(alloc_buffers), .. },
570-
crate::Evaluator { data_race: Some(global), threads, .. },
570+
crate::MiriMachine { data_race: Some(global), threads, .. },
571571
) = this.get_alloc_extra_mut(alloc_id)?
572572
{
573573
if atomic == AtomicWriteOrd::SeqCst {

src/diagnostics.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ enum DiagLevel {
8989
/// be pointing to a problem in the Rust runtime itself, and do not prune it at all.
9090
fn prune_stacktrace<'tcx>(
9191
mut stacktrace: Vec<FrameInfo<'tcx>>,
92-
machine: &Evaluator<'_, 'tcx>,
92+
machine: &MiriMachine<'_, 'tcx>,
9393
) -> (Vec<FrameInfo<'tcx>>, bool) {
9494
match machine.backtrace_style {
9595
BacktraceStyle::Off => {
@@ -144,7 +144,7 @@ fn prune_stacktrace<'tcx>(
144144

145145
/// Emit a custom diagnostic without going through the miri-engine machinery
146146
pub fn report_error<'tcx, 'mir>(
147-
ecx: &InterpCx<'mir, 'tcx, Evaluator<'mir, 'tcx>>,
147+
ecx: &InterpCx<'mir, 'tcx, MiriMachine<'mir, 'tcx>>,
148148
e: InterpErrorInfo<'tcx>,
149149
) -> Option<i64> {
150150
use InterpError::*;
@@ -311,7 +311,7 @@ fn report_msg<'tcx>(
311311
notes: Vec<(Option<SpanData>, String)>,
312312
helps: Vec<(Option<SpanData>, String)>,
313313
stacktrace: &[FrameInfo<'tcx>],
314-
machine: &Evaluator<'_, 'tcx>,
314+
machine: &MiriMachine<'_, 'tcx>,
315315
) {
316316
let span = stacktrace.first().map_or(DUMMY_SP, |fi| fi.span);
317317
let sess = machine.tcx.sess;
@@ -367,11 +367,11 @@ fn report_msg<'tcx>(
367367
err.emit();
368368
}
369369

370-
impl<'mir, 'tcx> Evaluator<'mir, 'tcx> {
370+
impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> {
371371
pub fn emit_diagnostic(&self, e: NonHaltingDiagnostic) {
372372
use NonHaltingDiagnostic::*;
373373

374-
let stacktrace = MiriEvalContext::generate_stacktrace_from_stack(self.threads.active_thread_stack());
374+
let stacktrace = MiriInterpCx::generate_stacktrace_from_stack(self.threads.active_thread_stack());
375375
let (stacktrace, _was_pruned) = prune_stacktrace(stacktrace, self);
376376

377377
let (title, diag_level) = match e {
@@ -453,8 +453,8 @@ impl<'mir, 'tcx> Evaluator<'mir, 'tcx> {
453453
}
454454
}
455455

456-
impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriEvalContext<'mir, 'tcx> {}
457-
pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx> {
456+
impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for crate::MiriInterpCx<'mir, 'tcx> {}
457+
pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
458458
fn emit_diagnostic(&self, e: NonHaltingDiagnostic) {
459459
let this = self.eval_context_ref();
460460
this.machine.emit_diagnostic(e);

src/eval.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,18 +180,18 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
180180
entry_id: DefId,
181181
entry_type: EntryFnType,
182182
config: &MiriConfig,
183-
) -> InterpResult<'tcx, (InterpCx<'mir, 'tcx, Evaluator<'mir, 'tcx>>, MPlaceTy<'tcx, Provenance>)> {
183+
) -> InterpResult<'tcx, (InterpCx<'mir, 'tcx, MiriMachine<'mir, 'tcx>>, MPlaceTy<'tcx, Provenance>)> {
184184
let param_env = ty::ParamEnv::reveal_all();
185185
let layout_cx = LayoutCx { tcx, param_env };
186186
let mut ecx = InterpCx::new(
187187
tcx,
188188
rustc_span::source_map::DUMMY_SP,
189189
param_env,
190-
Evaluator::new(config, layout_cx),
190+
MiriMachine::new(config, layout_cx),
191191
);
192192

193193
// Some parts of initialization require a full `InterpCx`.
194-
Evaluator::late_init(&mut ecx, config)?;
194+
MiriMachine::late_init(&mut ecx, config)?;
195195

196196
// Make sure we have MIR. We check MIR for some stable monomorphic function in libcore.
197197
let sentinel = ecx.try_resolve_path(&["core", "ascii", "escape_default"]);

src/helpers.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use rand::RngCore;
2121

2222
use crate::*;
2323

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> {}
2525

2626
// This mapping should match `decode_error_kind` in
2727
// <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> {
9696
)
9797
}
9898

99-
pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx> {
99+
pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
100100
/// Gets an instance for a path; fails gracefully if the path does not exist.
101101
fn try_resolve_path(&self, path: &[&str]) -> Option<ty::Instance<'tcx>> {
102102
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
391391
where
392392
F: FnMut(&MPlaceTy<'tcx, Provenance>) -> InterpResult<'tcx>,
393393
{
394-
ecx: &'ecx MiriEvalContext<'mir, 'tcx>,
394+
ecx: &'ecx MiriInterpCx<'mir, 'tcx>,
395395
unsafe_cell_action: F,
396396
}
397397

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>>
399399
for UnsafeCellVisitor<'ecx, 'mir, 'tcx, F>
400400
where
401401
F: FnMut(&MPlaceTy<'tcx, Provenance>) -> InterpResult<'tcx>,
402402
{
403403
type V = MPlaceTy<'tcx, Provenance>;
404404

405405
#[inline(always)]
406-
fn ecx(&self) -> &MiriEvalContext<'mir, 'tcx> {
406+
fn ecx(&self) -> &MiriInterpCx<'mir, 'tcx> {
407407
self.ecx
408408
}
409409

@@ -883,7 +883,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
883883
}
884884
}
885885

886-
impl<'mir, 'tcx> Evaluator<'mir, 'tcx> {
886+
impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> {
887887
pub fn current_span(&self) -> CurrentSpan<'_, 'mir, 'tcx> {
888888
CurrentSpan { current_frame_idx: None, machine: self }
889889
}
@@ -896,11 +896,11 @@ impl<'mir, 'tcx> Evaluator<'mir, 'tcx> {
896896
#[derive(Clone)]
897897
pub struct CurrentSpan<'a, 'mir, 'tcx> {
898898
current_frame_idx: Option<usize>,
899-
machine: &'a Evaluator<'mir, 'tcx>,
899+
machine: &'a MiriMachine<'mir, 'tcx>,
900900
}
901901

902902
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> {
904904
self.machine
905905
}
906906

@@ -919,7 +919,7 @@ impl<'a, 'mir: 'a, 'tcx: 'a + 'mir> CurrentSpan<'a, 'mir, 'tcx> {
919919
Self::frame_span(self.machine, idx.wrapping_sub(1))
920920
}
921921

922-
fn frame_span(machine: &Evaluator<'_, '_>, idx: usize) -> Span {
922+
fn frame_span(machine: &MiriMachine<'_, '_>, idx: usize) -> Span {
923923
machine
924924
.threads
925925
.active_thread_stack()
@@ -937,7 +937,7 @@ impl<'a, 'mir: 'a, 'tcx: 'a + 'mir> CurrentSpan<'a, 'mir, 'tcx> {
937937
// Find the position of the inner-most frame which is part of the crate being
938938
// compiled/executed, part of the Cargo workspace, and is also not #[track_caller].
939939
#[inline(never)]
940-
fn compute_current_frame_index(machine: &Evaluator<'_, '_>) -> usize {
940+
fn compute_current_frame_index(machine: &MiriMachine<'_, '_>) -> usize {
941941
machine
942942
.threads
943943
.active_thread_stack()

src/intptrcast.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl GlobalStateInner {
5959
impl<'mir, 'tcx> GlobalStateInner {
6060
// Returns the exposed `AllocId` that corresponds to the specified addr,
6161
// or `None` if the addr is out of bounds
62-
fn alloc_id_from_addr(ecx: &MiriEvalContext<'mir, 'tcx>, addr: u64) -> Option<AllocId> {
62+
fn alloc_id_from_addr(ecx: &MiriInterpCx<'mir, 'tcx>, addr: u64) -> Option<AllocId> {
6363
let global_state = ecx.machine.intptrcast.borrow();
6464
assert!(global_state.provenance_mode != ProvenanceMode::Strict);
6565

@@ -97,7 +97,7 @@ impl<'mir, 'tcx> GlobalStateInner {
9797
}
9898

9999
pub fn expose_ptr(
100-
ecx: &mut MiriEvalContext<'mir, 'tcx>,
100+
ecx: &mut MiriInterpCx<'mir, 'tcx>,
101101
alloc_id: AllocId,
102102
sb: SbTag,
103103
) -> InterpResult<'tcx> {
@@ -114,7 +114,7 @@ impl<'mir, 'tcx> GlobalStateInner {
114114
}
115115

116116
pub fn ptr_from_addr_transmute(
117-
_ecx: &MiriEvalContext<'mir, 'tcx>,
117+
_ecx: &MiriInterpCx<'mir, 'tcx>,
118118
addr: u64,
119119
) -> Pointer<Option<Provenance>> {
120120
trace!("Transmuting {:#x} to a pointer", addr);
@@ -124,7 +124,7 @@ impl<'mir, 'tcx> GlobalStateInner {
124124
}
125125

126126
pub fn ptr_from_addr_cast(
127-
ecx: &MiriEvalContext<'mir, 'tcx>,
127+
ecx: &MiriInterpCx<'mir, 'tcx>,
128128
addr: u64,
129129
) -> InterpResult<'tcx, Pointer<Option<Provenance>>> {
130130
trace!("Casting {:#x} to a pointer", addr);
@@ -156,7 +156,7 @@ impl<'mir, 'tcx> GlobalStateInner {
156156
Ok(Pointer::new(Some(Provenance::Wildcard), Size::from_bytes(addr)))
157157
}
158158

159-
fn alloc_base_addr(ecx: &MiriEvalContext<'mir, 'tcx>, alloc_id: AllocId) -> u64 {
159+
fn alloc_base_addr(ecx: &MiriInterpCx<'mir, 'tcx>, alloc_id: AllocId) -> u64 {
160160
let mut global_state = ecx.machine.intptrcast.borrow_mut();
161161
let global_state = &mut *global_state;
162162

@@ -202,7 +202,7 @@ impl<'mir, 'tcx> GlobalStateInner {
202202
}
203203

204204
/// Convert a relative (tcx) pointer to an absolute address.
205-
pub fn rel_ptr_to_addr(ecx: &MiriEvalContext<'mir, 'tcx>, ptr: Pointer<AllocId>) -> u64 {
205+
pub fn rel_ptr_to_addr(ecx: &MiriInterpCx<'mir, 'tcx>, ptr: Pointer<AllocId>) -> u64 {
206206
let (alloc_id, offset) = ptr.into_parts(); // offset is relative (AllocId provenance)
207207
let base_addr = GlobalStateInner::alloc_base_addr(ecx, alloc_id);
208208

@@ -214,7 +214,7 @@ impl<'mir, 'tcx> GlobalStateInner {
214214
/// When a pointer is used for a memory access, this computes where in which allocation the
215215
/// access is going.
216216
pub fn abs_ptr_to_rel(
217-
ecx: &MiriEvalContext<'mir, 'tcx>,
217+
ecx: &MiriInterpCx<'mir, 'tcx>,
218218
ptr: Pointer<Provenance>,
219219
) -> Option<(AllocId, Size)> {
220220
let (tag, addr) = ptr.into_parts(); // addr is absolute (Tag provenance)

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub use crate::eval::{
103103
pub use crate::helpers::{CurrentSpan, EvalContextExt as HelpersEvalContextExt};
104104
pub use crate::intptrcast::ProvenanceMode;
105105
pub use crate::machine::{
106-
AllocExtra, Evaluator, FrameData, MiriEvalContext, MiriEvalContextExt, MiriMemoryKind,
106+
AllocExtra, MiriMachine, FrameData, MiriInterpCx, MiriInterpCxExt, MiriMemoryKind,
107107
Provenance, ProvenanceExtra, NUM_CPUS, PAGE_SIZE, STACK_ADDR, STACK_SIZE,
108108
};
109109
pub use crate::mono_hash_map::MonoHashMap;

0 commit comments

Comments
 (0)