Skip to content

Commit 4211d7e

Browse files
committed
Update tag methods to match Machine changes
1 parent e4b298b commit 4211d7e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -508,21 +508,21 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'tcx> {
508508
id: AllocId,
509509
alloc: Cow<'b, Allocation>,
510510
kind: Option<MemoryKind<Self::MemoryKinds>>,
511-
memory_extra: &Self::MemoryExtra,
511+
memory: &Memory<'mir, 'tcx, Self>,
512512
) -> (Cow<'b, Allocation<Self::PointerTag, Self::AllocExtra>>, Self::PointerTag) {
513513
let kind = kind.expect("we set our STATIC_KIND so this cannot be None");
514514
let alloc = alloc.into_owned();
515515
let (extra, base_tag) = Stacks::new_allocation(
516516
id,
517517
Size::from_bytes(alloc.bytes.len() as u64),
518-
Rc::clone(memory_extra),
518+
Rc::clone(&memory.extra),
519519
kind,
520520
);
521521
if kind != MiriMemoryKind::Static.into() {
522522
assert!(alloc.relocations.is_empty(), "Only statics can come initialized with inner pointers");
523523
// Now we can rely on the inner pointers being static, too.
524524
}
525-
let mut memory_extra = memory_extra.borrow_mut();
525+
let mut memory_extra = memory.extra.borrow_mut();
526526
let alloc: Allocation<Tag, Self::AllocExtra> = Allocation {
527527
bytes: alloc.bytes,
528528
relocations: Relocations::from_presorted(
@@ -543,9 +543,9 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'tcx> {
543543
#[inline(always)]
544544
fn tag_static_base_pointer(
545545
id: AllocId,
546-
memory_extra: &Self::MemoryExtra,
546+
memory: &Memory<'mir, 'tcx, Self>,
547547
) -> Self::PointerTag {
548-
memory_extra.borrow_mut().static_base_ptr(id)
548+
memory.extra.borrow_mut().static_base_ptr(id)
549549
}
550550

551551
#[inline(always)]

0 commit comments

Comments
 (0)