Skip to content

Commit 157ad87

Browse files
authored
Update to MMTk core PR #643 (#72)
1 parent a88a788 commit 157ad87

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

mmtk/Cargo.lock

Lines changed: 23 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mmtk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ log = "*"
2727
# - change branch
2828
# - change repo name
2929
# But other changes including adding/removing whitespaces in commented lines may break the CI.
30-
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "69b4fe46ee4353a2fdeb4911ba914b63a7ffa29a" }
30+
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "6e1b4df8e6bf41f86c24824b4c664f05b2b9fbfb" }
3131
# Uncomment the following and fix the path to mmtk-core to build locally
3232
# mmtk = { path = "../repos/mmtk-core" }
3333

mmtk/src/api.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ pub extern "C" fn bind_mutator(
6060
// It is fine we turn the pointer back to box, as we turned a boxed value to the raw pointer in bind_mutator()
6161
#[allow(clippy::not_unsafe_ptr_arg_deref)]
6262
pub extern "C" fn destroy_mutator(mutator: *mut Mutator<V8>) {
63-
memory_manager::destroy_mutator(unsafe { Box::from_raw(mutator) })
63+
// Turn this back to boxed mutator, and let Rust reclaim it when it goes out of scope
64+
let mut boxed_mutator = unsafe { Box::from_raw(mutator) };
65+
memory_manager::destroy_mutator(&mut boxed_mutator);
6466
}
6567

6668
#[no_mangle]

mmtk/src/object_model.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ impl ObjectModel<V8> for VMObjectModel {
5353
unimplemented!()
5454
}
5555

56+
const UNIFIED_OBJECT_REFERENCE_ADDRESS: bool = true;
57+
const OBJECT_REF_OFFSET_LOWER_BOUND: isize = 0;
58+
5659
fn ref_to_object_start(object: ObjectReference) -> Address {
5760
object.to_raw_address()
5861
}

0 commit comments

Comments
 (0)