Skip to content

Commit d940d2a

Browse files
committed
Bump MMTk version
1 parent 08ea7a5 commit d940d2a

File tree

7 files changed

+16
-19
lines changed

7 files changed

+16
-19
lines changed

Diff for: gc/mmtk/Cargo.lock

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

Diff for: gc/mmtk/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ features = ["is_mmtk_object", "object_pinning", "sticky_immix_non_moving_nursery
3030

3131
# Uncomment the following lines to use mmtk-core from the official repository.
3232
git = "https://github.com/mmtk/mmtk-core.git"
33-
rev = "160b7702fccda133c9407234821ad35103623179"
33+
rev = "a025c24104d8d456a865aa0122e6e0fb6d77e8f2"
3434

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

Diff for: gc/mmtk/src/api.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ pub type RubyMutator = Mutator<Ruby>;
2525

2626
#[no_mangle]
2727
pub extern "C" fn mmtk_is_live_object(object: ObjectReference) -> bool {
28-
memory_manager::is_live_object::<Ruby>(object)
28+
memory_manager::is_live_object(object)
2929
}
3030

3131
#[no_mangle]
3232
pub extern "C" fn mmtk_is_reachable(object: ObjectReference) -> bool {
33-
object.is_reachable::<Ruby>()
33+
object.is_reachable()
3434
}
3535

3636
// =============== Bootup ===============

Diff for: gc/mmtk/src/object_model.rs

-2
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ impl ObjectModel<Ruby> for VMObjectModel {
120120
RubyObjectAccess::from_objref(object).payload_addr()
121121
}
122122

123-
const IN_OBJECT_ADDRESS_OFFSET: isize = 0;
124-
125123
fn get_size_when_copied(object: ObjectReference) -> usize {
126124
Self::get_current_size(object)
127125
}

Diff for: gc/mmtk/src/ppp.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ impl PPPRegistry {
7575

7676
probe!(mmtk_ruby, remove_dead_ppps_start, ppps.len());
7777
ppps.retain_mut(|obj| {
78-
if obj.is_live::<Ruby>() {
79-
*obj = obj.get_forwarded_object::<Ruby>().unwrap_or(*obj);
78+
if obj.is_live() {
79+
*obj = obj.get_forwarded_object().unwrap_or(*obj);
8080
true
8181
} else {
8282
log::trace!(" PPP removed: {}", *obj);
@@ -97,7 +97,7 @@ impl PPPRegistry {
9797
.expect("PPPRegistry::pinned_ppp_children should not have races during GC.");
9898
probe!(mmtk_ruby, unpin_ppp_children_start, pinned_ppps.len());
9999
for obj in pinned_ppps.drain(..) {
100-
let unpinned = memory_manager::unpin_object::<Ruby>(obj);
100+
let unpinned = memory_manager::unpin_object(obj);
101101
debug_assert!(unpinned);
102102
}
103103
probe!(mmtk_ruby, unpin_ppp_children_end);
@@ -147,7 +147,7 @@ impl GCWork<Ruby> for PinPPPChildren {
147147
});
148148

149149
for target_object in ppp_children {
150-
if memory_manager::pin_object::<Ruby>(target_object) {
150+
if memory_manager::pin_object(target_object) {
151151
newly_pinned_ppp_children.push(target_object);
152152
}
153153
}

Diff for: gc/mmtk/src/scanning.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ impl<F: RootsWorkFactory<RubySlot>> GCWork<Ruby> for ScanWbUnprotectedRoots<F> {
250250
let gc_tls = unsafe { GCThreadTLS::from_vwt_check(worker.tls) };
251251
VMScanning::collect_object_roots_in("wb_unprot_roots", gc_tls, &mut self.factory, || {
252252
for object in self.objects.iter().copied() {
253-
if object.is_reachable::<Ruby>() {
253+
if object.is_reachable() {
254254
debug!(
255255
"[wb_unprot_roots] Visiting WB-unprotected object (parent): {}",
256256
object

Diff for: gc/mmtk/src/weak_proc.rs

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::sync::{Arc, Mutex};
1+
use std::sync::Mutex;
22

33
use mmtk::{
44
scheduler::{GCWork, GCWorker, WorkBucketStage},
@@ -7,10 +7,9 @@ use mmtk::{
77
};
88

99
use crate::{
10-
abi::{st_table, GCThreadTLS, RubyObjectAccess},
10+
abi::{GCThreadTLS, RubyObjectAccess},
1111
binding::MovedGIVTblEntry,
1212
upcalls,
13-
utils::AfterAll,
1413
Ruby,
1514
};
1615

@@ -202,7 +201,7 @@ impl GCWork<Ruby> for ProcessObjFreeCandidates {
202201
let mut new_candidates = Vec::new();
203202

204203
for object in obj_free_candidates.iter().copied() {
205-
if object.is_reachable::<Ruby>() {
204+
if object.is_reachable() {
206205
// Forward and add back to the candidate list.
207206
let new_object = object.forward();
208207
trace!(
@@ -230,7 +229,7 @@ trait GlobalTableProcessingWork {
230229
// of `trace_object` due to the way it is used in `UPDATE_IF_MOVED`.
231230
let forward_object = |_worker, object: ObjectReference, _pin| {
232231
debug_assert!(
233-
mmtk::memory_manager::is_mmtk_object(object.to_address::<Ruby>()).is_some(),
232+
mmtk::memory_manager::is_mmtk_object(object.to_raw_address()).is_some(),
234233
"{} is not an MMTk object",
235234
object
236235
);
@@ -356,7 +355,7 @@ impl GCWork<Ruby> for UpdateWbUnprotectedObjectsList {
356355
debug!("Updating {} WB-unprotected objects", old_objects.len());
357356

358357
for object in old_objects {
359-
if object.is_reachable::<Ruby>() {
358+
if object.is_reachable() {
360359
// Forward and add back to the candidate list.
361360
let new_object = object.forward();
362361
trace!(
@@ -381,6 +380,6 @@ trait Forwardable {
381380

382381
impl Forwardable for ObjectReference {
383382
fn forward(&self) -> Self {
384-
self.get_forwarded_object::<Ruby>().unwrap_or(*self)
383+
self.get_forwarded_object().unwrap_or(*self)
385384
}
386385
}

0 commit comments

Comments
 (0)