Skip to content

Commit 285e9a6

Browse files
authored
Merge pull request #778 from christianpoveda/master
Update tag methods to match Machine changes
2 parents 03cc719 + 5edb9c9 commit 285e9a6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4fb77a0398d0339f35f1b18595b375428babd431
1+
56a12b2ad058f22f1ef090713df15598525ba4a4

src/lib.rs

+5-5
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)