|
1 | 1 | use crate::abi::GCThreadTLS; |
2 | 2 |
|
3 | | -use crate::{upcalls, Ruby, RubyEdge}; |
| 3 | +use crate::{upcalls, Ruby, RubySlot}; |
4 | 4 | use mmtk::scheduler::GCWorker; |
5 | 5 | use mmtk::util::{ObjectReference, VMWorkerThread}; |
6 | | -use mmtk::vm::{EdgeVisitor, ObjectTracer, RootsWorkFactory, Scanning}; |
| 6 | +use mmtk::vm::{ObjectTracer, RootsWorkFactory, Scanning, SlotVisitor}; |
7 | 7 | use mmtk::{Mutator, MutatorContext}; |
8 | 8 |
|
9 | 9 | pub struct VMScanning {} |
10 | 10 |
|
11 | 11 | 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 { |
13 | 13 | false |
14 | 14 | } |
15 | 15 |
|
16 | | - fn scan_object<EV: EdgeVisitor<RubyEdge>>( |
| 16 | + fn scan_object<EV: SlotVisitor<RubySlot>>( |
17 | 17 | _tls: VMWorkerThread, |
18 | 18 | _object: ObjectReference, |
19 | | - _edge_visitor: &mut EV, |
| 19 | + _slot_visitor: &mut EV, |
20 | 20 | ) { |
21 | | - unreachable!("We have not enabled edge enqueuing for any types, yet."); |
| 21 | + unreachable!("We have not enabled slot enqueuing for any types, yet."); |
22 | 22 | } |
23 | 23 |
|
24 | 24 | fn scan_object_and_trace_edges<OT: ObjectTracer>( |
@@ -66,15 +66,15 @@ impl Scanning<Ruby> for VMScanning { |
66 | 66 | fn scan_roots_in_mutator_thread( |
67 | 67 | tls: VMWorkerThread, |
68 | 68 | mutator: &'static mut Mutator<Ruby>, |
69 | | - mut factory: impl RootsWorkFactory<RubyEdge>, |
| 69 | + mut factory: impl RootsWorkFactory<RubySlot>, |
70 | 70 | ) { |
71 | 71 | let gc_tls = unsafe { GCThreadTLS::from_vwt_check(tls) }; |
72 | 72 | Self::collect_object_roots_in("scan_thread_root", gc_tls, &mut factory, || { |
73 | 73 | (upcalls().scan_roots_in_mutator_thread)(mutator.get_tls(), tls); |
74 | 74 | }); |
75 | 75 | } |
76 | 76 |
|
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>) { |
78 | 78 | let gc_tls = unsafe { GCThreadTLS::from_vwt_check(tls) }; |
79 | 79 | Self::collect_object_roots_in("scan_vm_specific_roots", gc_tls, &mut factory, || { |
80 | 80 | (upcalls().scan_vm_specific_roots)(); |
@@ -114,7 +114,7 @@ impl VMScanning { |
114 | 114 | fn collect_object_roots_in<F: FnMut()>( |
115 | 115 | root_scan_kind: &str, |
116 | 116 | gc_tls: &mut GCThreadTLS, |
117 | | - factory: &mut impl RootsWorkFactory<RubyEdge>, |
| 117 | + factory: &mut impl RootsWorkFactory<RubySlot>, |
118 | 118 | callback: F, |
119 | 119 | ) { |
120 | 120 | let mut buffer: Vec<ObjectReference> = Vec::new(); |
|
0 commit comments