Skip to content

Commit d5c4767

Browse files
committed
Require ObjectReference to point inside object
This makes changes for upstream API changes. Upstream PR: mmtk/mmtk-core#1195
1 parent 13659a7 commit d5c4767

File tree

4 files changed

+9
-17
lines changed

4 files changed

+9
-17
lines changed

mmtk/Cargo.lock

+5-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mmtk/Cargo.toml

+1-1
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 = "56b2521d2b99848ee0613a0a5288fe6d81b754ba" }
30+
mmtk = { git = "https://github.com/wks/mmtk-core.git", rev = "57a98749ff37093b355d7b2f496b8a67315e158b" }
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

+3-3
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub extern "C" fn post_alloc(
9494

9595
#[no_mangle]
9696
pub extern "C" fn will_never_move(object: ObjectReference) -> bool {
97-
!object.is_movable::<V8>()
97+
!object.is_movable()
9898
}
9999

100100
#[no_mangle]
@@ -137,12 +137,12 @@ pub extern "C" fn scan_region(mmtk: &mut MMTK<V8>) {
137137

138138
#[no_mangle]
139139
pub extern "C" fn is_live_object(object: ObjectReference) -> bool {
140-
memory_manager::is_live_object::<V8>(object)
140+
memory_manager::is_live_object(object)
141141
}
142142

143143
#[no_mangle]
144144
pub extern "C" fn is_in_mmtk_spaces(object: ObjectReference) -> bool {
145-
memory_manager::is_in_mmtk_spaces::<V8>(object)
145+
memory_manager::is_in_mmtk_spaces(object)
146146
}
147147

148148
#[no_mangle]

mmtk/src/object_model.rs

-9
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,6 @@ impl ObjectModel<V8> for VMObjectModel {
6464
object.to_raw_address()
6565
}
6666

67-
fn ref_to_address(object: ObjectReference) -> Address {
68-
object.to_raw_address()
69-
}
70-
71-
fn address_to_ref(address: Address) -> ObjectReference {
72-
debug_assert!(!address.is_zero());
73-
unsafe { ObjectReference::from_raw_address_unchecked(address) }
74-
}
75-
7667
fn dump_object(object: ObjectReference) {
7768
unsafe {
7869
((*UPCALLS).dump_object)(object);

0 commit comments

Comments
 (0)