Skip to content

Commit af2130b

Browse files
wksmmtkgc-bot
andauthored
Rename edge to slot (#64)
Parent PR: mmtk/mmtk-core#1134 --------- Co-authored-by: mmtkgc-bot <mmtkgc.bot@gmail.com>
1 parent 70548ee commit af2130b

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

mmtk/Cargo.lock

Lines changed: 2 additions & 2 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
@@ -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 = "dccce9063b57dde96d2e97670297aed4dc32e6e1"
40+
rev = "56b2521d2b99848ee0613a0a5288fe6d81b754ba"
4141

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

mmtk/src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use std::thread::ThreadId;
1212

1313
use abi::RubyUpcalls;
1414
use binding::{RubyBinding, RubyBindingFast, RubyBindingFastMut};
15-
use mmtk::vm::edge_shape::{SimpleEdge, UnimplementedMemorySlice};
15+
use mmtk::vm::slot::{SimpleSlot, UnimplementedMemorySlice};
1616
use mmtk::vm::VMBinding;
1717
use mmtk::MMTK;
1818
use once_cell::sync::OnceCell;
@@ -31,15 +31,15 @@ pub mod weak_proc;
3131
#[derive(Default)]
3232
pub struct Ruby;
3333

34-
/// Ruby edge type, i.e. a slot that holds a VALUE.
35-
/// Currently we use SimpleEdge.
36-
/// It doesn't matter, becaues we have not started using edge-enqueuing, yet.
37-
pub type RubyEdge = SimpleEdge;
34+
/// Ruby slot type, i.e. a slot that holds a VALUE.
35+
/// Currently we use SimpleSlot.
36+
/// It doesn't matter, becaues we have not started using slot-enqueuing, yet.
37+
pub type RubySlot = SimpleSlot;
3838

3939
/// Ruby memory slice, i.e. an array of VALUEs.
4040
/// It is used by array-copy barriers which is supposed to perform bettern than copying array
4141
/// elements one by one. At this moment, we just leave it unimplemented.
42-
pub type RubyMemorySlice = UnimplementedMemorySlice<RubyEdge>;
42+
pub type RubyMemorySlice = UnimplementedMemorySlice<RubySlot>;
4343

4444
impl VMBinding for Ruby {
4545
type VMObjectModel = object_model::VMObjectModel;
@@ -48,7 +48,7 @@ impl VMBinding for Ruby {
4848
type VMActivePlan = active_plan::VMActivePlan;
4949
type VMReferenceGlue = reference_glue::VMReferenceGlue;
5050

51-
type VMEdge = RubyEdge;
51+
type VMSlot = RubySlot;
5252
type VMMemorySlice = RubyMemorySlice;
5353
}
5454

mmtk/src/scanning.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
use crate::abi::GCThreadTLS;
22

3-
use crate::{upcalls, Ruby, RubyEdge};
3+
use crate::{upcalls, Ruby, RubySlot};
44
use mmtk::scheduler::GCWorker;
55
use mmtk::util::{ObjectReference, VMWorkerThread};
6-
use mmtk::vm::{EdgeVisitor, ObjectTracer, RootsWorkFactory, Scanning};
6+
use mmtk::vm::{ObjectTracer, RootsWorkFactory, Scanning, SlotVisitor};
77
use mmtk::{Mutator, MutatorContext};
88

99
pub struct VMScanning {}
1010

1111
impl Scanning<Ruby> for VMScanning {
12-
fn support_edge_enqueuing(_tls: VMWorkerThread, _object: ObjectReference) -> bool {
12+
fn support_slot_enqueuing(_tls: VMWorkerThread, _object: ObjectReference) -> bool {
1313
false
1414
}
1515

16-
fn scan_object<EV: EdgeVisitor<RubyEdge>>(
16+
fn scan_object<EV: SlotVisitor<RubySlot>>(
1717
_tls: VMWorkerThread,
1818
_object: ObjectReference,
19-
_edge_visitor: &mut EV,
19+
_slot_visitor: &mut EV,
2020
) {
21-
unreachable!("We have not enabled edge enqueuing for any types, yet.");
21+
unreachable!("We have not enabled slot enqueuing for any types, yet.");
2222
}
2323

2424
fn scan_object_and_trace_edges<OT: ObjectTracer>(
@@ -66,15 +66,15 @@ impl Scanning<Ruby> for VMScanning {
6666
fn scan_roots_in_mutator_thread(
6767
tls: VMWorkerThread,
6868
mutator: &'static mut Mutator<Ruby>,
69-
mut factory: impl RootsWorkFactory<RubyEdge>,
69+
mut factory: impl RootsWorkFactory<RubySlot>,
7070
) {
7171
let gc_tls = unsafe { GCThreadTLS::from_vwt_check(tls) };
7272
Self::collect_object_roots_in("scan_thread_root", gc_tls, &mut factory, || {
7373
(upcalls().scan_roots_in_mutator_thread)(mutator.get_tls(), tls);
7474
});
7575
}
7676

77-
fn scan_vm_specific_roots(tls: VMWorkerThread, mut factory: impl RootsWorkFactory<RubyEdge>) {
77+
fn scan_vm_specific_roots(tls: VMWorkerThread, mut factory: impl RootsWorkFactory<RubySlot>) {
7878
let gc_tls = unsafe { GCThreadTLS::from_vwt_check(tls) };
7979
Self::collect_object_roots_in("scan_vm_specific_roots", gc_tls, &mut factory, || {
8080
(upcalls().scan_vm_specific_roots)();
@@ -114,7 +114,7 @@ impl VMScanning {
114114
fn collect_object_roots_in<F: FnMut()>(
115115
root_scan_kind: &str,
116116
gc_tls: &mut GCThreadTLS,
117-
factory: &mut impl RootsWorkFactory<RubyEdge>,
117+
factory: &mut impl RootsWorkFactory<RubySlot>,
118118
callback: F,
119119
) {
120120
let mut buffer: Vec<ObjectReference> = Vec::new();

0 commit comments

Comments
 (0)