Skip to content

Commit 7494210

Browse files
wksmmtkgc-bot
andauthored
Use to_address for SFT access (#59)
Upstream change: mmtk/mmtk-core#1122 --------- Co-authored-by: mmtkgc-bot <[email protected]>
1 parent ac309c6 commit 7494210

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

mmtk/Cargo.lock

+4-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
@@ -37,7 +37,7 @@ features = ["is_mmtk_object", "object_pinning"]
3737

3838
# Uncomment the following lines to use mmtk-core from the official repository.
3939
git = "https://github.com/mmtk/mmtk-core.git"
40-
rev = "d291cda52790a34ed10bf72b4c5e27c3ab89a242"
40+
rev = "e79e94e744660c486d5471f252ff05c4248bcea9"
4141

4242
# Uncomment the following line to use mmtk-core from a local repository.
4343
#path = "../../mmtk-core"

mmtk/src/api.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ pub extern "C" fn mmtk_post_alloc(
148148

149149
#[no_mangle]
150150
pub extern "C" fn mmtk_will_never_move(object: ObjectReference) -> bool {
151-
!object.is_movable()
151+
!object.is_movable::<Ruby>()
152152
}
153153

154154
#[no_mangle]
@@ -199,18 +199,18 @@ pub extern "C" fn mmtk_total_bytes() -> usize {
199199

200200
#[no_mangle]
201201
pub extern "C" fn mmtk_is_reachable(object: ObjectReference) -> bool {
202-
object.is_reachable()
202+
object.is_reachable::<Ruby>()
203203
}
204204

205205
#[no_mangle]
206206
pub extern "C" fn mmtk_is_live_object(object: ObjectReference) -> bool {
207-
memory_manager::is_live_object(object)
207+
memory_manager::is_live_object::<Ruby>(object)
208208
}
209209

210210
#[no_mangle]
211211
pub extern "C" fn mmtk_get_forwarded_object(object: ObjectReference) -> ObjectReference {
212212
object
213-
.get_forwarded_object()
213+
.get_forwarded_object::<Ruby>()
214214
.unwrap_or(ObjectReference::NULL)
215215
}
216216

mmtk/src/ppp.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ impl PPPRegistry {
7070

7171
probe!(mmtk_ruby, remove_dead_ppps_start, ppps.len());
7272
ppps.retain_mut(|obj| {
73-
if obj.is_live() {
74-
*obj = obj.get_forwarded_object().unwrap_or(*obj);
73+
if obj.is_live::<Ruby>() {
74+
*obj = obj.get_forwarded_object::<Ruby>().unwrap_or(*obj);
7575
true
7676
} else {
7777
log::trace!(" PPP removed: {}", *obj);

mmtk/src/weak_proc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl GCWork<Ruby> for ProcessObjFreeCandidates {
122122
let mut new_candidates = Vec::new();
123123

124124
for object in obj_free_candidates.iter().copied() {
125-
if object.is_reachable() {
125+
if object.is_reachable::<Ruby>() {
126126
// Forward and add back to the candidate list.
127127
let new_object = object.forward();
128128
trace!(
@@ -216,6 +216,6 @@ trait Forwardable {
216216

217217
impl Forwardable for ObjectReference {
218218
fn forward(&self) -> Self {
219-
self.get_forwarded_object().unwrap_or(*self)
219+
self.get_forwarded_object::<Ruby>().unwrap_or(*self)
220220
}
221221
}

0 commit comments

Comments
 (0)