Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename associated types in GCWorkContext #1116

Merged
merged 4 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/userguide/src/tutorial/code/mygc_semispace/gc_work.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ pub struct MyGCWorkContext<VM: VMBinding>(std::marker::PhantomData<VM>);
impl<VM: VMBinding> crate::scheduler::GCWorkContext for MyGCWorkContext<VM> {
type VM = VM;
type PlanType = MyGC<VM>;
type ProcessEdgesWorkType = SFTProcessEdges<Self::VM>;
type TPProcessEdges = UnsupportedProcessEdges<Self::VM>;
type NormalProcessEdges = SFTProcessEdges<Self::VM>;
type PinningProcessEdges = UnsupportedProcessEdges<Self::VM>;
}
// ANCHOR_END: workcontext_sft

Expand All @@ -22,8 +22,8 @@ pub struct MyGCWorkContext2<VM: VMBinding>(std::marker::PhantomData<VM>);
impl<VM: VMBinding> crate::scheduler::GCWorkContext for MyGCWorkContext2<VM> {
type VM = VM;
type PlanType = MyGC<VM>;
type ProcessEdgesWorkType = PlanProcessEdges<Self::VM, MyGC<VM>, DEFAULT_TRACE>;
type TPProcessEdges = UnsupportedProcessEdges<Self::VM>;
type NormalProcessEdges = PlanProcessEdges<Self::VM, MyGC<VM>, DEFAULT_TRACE>;
type PinningProcessEdges = UnsupportedProcessEdges<Self::VM>;
}
// ANCHOR_END: workcontext_plan

Expand Down Expand Up @@ -104,7 +104,7 @@ pub struct MyGCWorkContext3<VM: VMBinding>(std::marker::PhantomData<VM>);
impl<VM: VMBinding> crate::scheduler::GCWorkContext for MyGCWorkContext3<VM> {
type VM = VM;
type PlanType = MyGC<VM>;
type ProcessEdgesWorkType = MyGCProcessEdges<Self::VM>;
type TPProcessEdges = UnsupportedProcessEdges<Self::VM>;
type NormalProcessEdges = MyGCProcessEdges<Self::VM>;
type PinningProcessEdges = UnsupportedProcessEdges<Self::VM>;
}
// ANCHOR: workcontext_mygc
4 changes: 2 additions & 2 deletions docs/userguide/src/tutorial/mygc/ss/collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ With the derive macro, your `MyGC` struct should look like this:
{{#include ../../code/mygc_semispace/global.rs:plan_def}}
```

Once this is done, you can specify `PlanProcessEdges` as the `ProcessEdgesWorkType` in your GC work context:
Once this is done, you can specify `PlanProcessEdges` as the `NormalProcessEdges` in your GC work context:
```rust
{{#include ../../code/mygc_semispace/gc_work.rs:workcontext_plan}}
```
Expand Down Expand Up @@ -238,7 +238,7 @@ dereferenced as `ProcessEdgesBase`.
{{#include ../../code/mygc_semispace/gc_work.rs:mygc_process_edges_deref}}
```

In the end, use `MyGCProcessEdges` as `ProcessEdgesWorkType` in the `GCWorkContext`:
In the end, use `MyGCProcessEdges` as `NormalProcessEdges` in the `GCWorkContext`:
```rust
{{#include ../../code/mygc_semispace/gc_work.rs:workcontext_mygc}}
```
Expand Down
8 changes: 4 additions & 4 deletions src/plan/generational/copying/gc_work.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ pub struct GenCopyNurseryGCWorkContext<VM: VMBinding>(std::marker::PhantomData<V
impl<VM: VMBinding> crate::scheduler::GCWorkContext for GenCopyNurseryGCWorkContext<VM> {
type VM = VM;
type PlanType = GenCopy<VM>;
type ProcessEdgesWorkType = GenNurseryProcessEdges<Self::VM, Self::PlanType>;
type TPProcessEdges = UnsupportedProcessEdges<VM>;
type NormalProcessEdges = GenNurseryProcessEdges<Self::VM, Self::PlanType>;
type PinningProcessEdges = UnsupportedProcessEdges<VM>;
}

pub struct GenCopyGCWorkContext<VM: VMBinding>(std::marker::PhantomData<VM>);
impl<VM: VMBinding> crate::scheduler::GCWorkContext for GenCopyGCWorkContext<VM> {
type VM = VM;
type PlanType = GenCopy<VM>;
type ProcessEdgesWorkType = PlanProcessEdges<Self::VM, GenCopy<VM>, DEFAULT_TRACE>;
type TPProcessEdges = UnsupportedProcessEdges<VM>;
type NormalProcessEdges = PlanProcessEdges<Self::VM, GenCopy<VM>, DEFAULT_TRACE>;
type PinningProcessEdges = UnsupportedProcessEdges<VM>;
}
8 changes: 4 additions & 4 deletions src/plan/generational/immix/gc_work.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ pub struct GenImmixNurseryGCWorkContext<VM: VMBinding>(std::marker::PhantomData<
impl<VM: VMBinding> crate::scheduler::GCWorkContext for GenImmixNurseryGCWorkContext<VM> {
type VM = VM;
type PlanType = GenImmix<VM>;
type ProcessEdgesWorkType = GenNurseryProcessEdges<VM, Self::PlanType>;
type TPProcessEdges = UnsupportedProcessEdges<VM>;
type NormalProcessEdges = GenNurseryProcessEdges<VM, Self::PlanType>;
type PinningProcessEdges = UnsupportedProcessEdges<VM>;
}

pub(super) struct GenImmixMatureGCWorkContext<VM: VMBinding, const KIND: TraceKind>(
Expand All @@ -21,6 +21,6 @@ impl<VM: VMBinding, const KIND: TraceKind> crate::scheduler::GCWorkContext
{
type VM = VM;
type PlanType = GenImmix<VM>;
type ProcessEdgesWorkType = PlanProcessEdges<VM, GenImmix<VM>, KIND>;
type TPProcessEdges = UnsupportedProcessEdges<VM>;
type NormalProcessEdges = PlanProcessEdges<VM, GenImmix<VM>, KIND>;
type PinningProcessEdges = UnsupportedProcessEdges<VM>;
}
4 changes: 2 additions & 2 deletions src/plan/immix/gc_work.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ impl<VM: VMBinding, const KIND: TraceKind> crate::scheduler::GCWorkContext
{
type VM = VM;
type PlanType = Immix<VM>;
type ProcessEdgesWorkType = PlanProcessEdges<VM, Immix<VM>, KIND>;
type TPProcessEdges = PlanProcessEdges<VM, Immix<VM>, TRACE_KIND_TRANSITIVE_PIN>;
type NormalProcessEdges = PlanProcessEdges<VM, Immix<VM>, KIND>;
type PinningProcessEdges = PlanProcessEdges<VM, Immix<VM>, TRACE_KIND_TRANSITIVE_PIN>;
}
8 changes: 4 additions & 4 deletions src/plan/markcompact/gc_work.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ pub struct MarkCompactGCWorkContext<VM: VMBinding>(std::marker::PhantomData<VM>)
impl<VM: VMBinding> crate::scheduler::GCWorkContext for MarkCompactGCWorkContext<VM> {
type VM = VM;
type PlanType = MarkCompact<VM>;
type ProcessEdgesWorkType = MarkingProcessEdges<VM>;
type TPProcessEdges = UnsupportedProcessEdges<VM>;
type NormalProcessEdges = MarkingProcessEdges<VM>;
type PinningProcessEdges = UnsupportedProcessEdges<VM>;
}

pub struct MarkCompactForwardingGCWorkContext<VM: VMBinding>(std::marker::PhantomData<VM>);
impl<VM: VMBinding> crate::scheduler::GCWorkContext for MarkCompactForwardingGCWorkContext<VM> {
type VM = VM;
type PlanType = MarkCompact<VM>;
type ProcessEdgesWorkType = ForwardingProcessEdges<VM>;
type TPProcessEdges = UnsupportedProcessEdges<VM>;
type NormalProcessEdges = ForwardingProcessEdges<VM>;
type PinningProcessEdges = UnsupportedProcessEdges<VM>;
}
4 changes: 2 additions & 2 deletions src/plan/marksweep/gc_work.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ pub struct MSGCWorkContext<VM: VMBinding>(std::marker::PhantomData<VM>);
impl<VM: VMBinding> crate::scheduler::GCWorkContext for MSGCWorkContext<VM> {
type VM = VM;
type PlanType = MarkSweep<VM>;
type ProcessEdgesWorkType = PlanProcessEdges<Self::VM, MarkSweep<VM>, DEFAULT_TRACE>;
type TPProcessEdges = PlanProcessEdges<Self::VM, MarkSweep<VM>, DEFAULT_TRACE>;
type NormalProcessEdges = PlanProcessEdges<Self::VM, MarkSweep<VM>, DEFAULT_TRACE>;
type PinningProcessEdges = PlanProcessEdges<Self::VM, MarkSweep<VM>, DEFAULT_TRACE>;
}
4 changes: 2 additions & 2 deletions src/plan/pageprotect/gc_work.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ pub struct PPGCWorkContext<VM: VMBinding>(std::marker::PhantomData<VM>);
impl<VM: VMBinding> crate::scheduler::GCWorkContext for PPGCWorkContext<VM> {
type VM = VM;
type PlanType = PageProtect<VM>;
type ProcessEdgesWorkType = PlanProcessEdges<Self::VM, PageProtect<VM>, DEFAULT_TRACE>;
type TPProcessEdges = PlanProcessEdges<Self::VM, PageProtect<VM>, DEFAULT_TRACE>;
type NormalProcessEdges = PlanProcessEdges<Self::VM, PageProtect<VM>, DEFAULT_TRACE>;
type PinningProcessEdges = PlanProcessEdges<Self::VM, PageProtect<VM>, DEFAULT_TRACE>;
}
4 changes: 2 additions & 2 deletions src/plan/semispace/gc_work.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ pub struct SSGCWorkContext<VM: VMBinding>(std::marker::PhantomData<VM>);
impl<VM: VMBinding> crate::scheduler::GCWorkContext for SSGCWorkContext<VM> {
type VM = VM;
type PlanType = SemiSpace<VM>;
type ProcessEdgesWorkType = PlanProcessEdges<Self::VM, SemiSpace<VM>, DEFAULT_TRACE>;
type TPProcessEdges = UnsupportedProcessEdges<VM>;
type NormalProcessEdges = PlanProcessEdges<Self::VM, SemiSpace<VM>, DEFAULT_TRACE>;
type PinningProcessEdges = UnsupportedProcessEdges<VM>;
}
8 changes: 4 additions & 4 deletions src/plan/sticky/immix/gc_work.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ pub struct StickyImmixNurseryGCWorkContext<VM: VMBinding>(std::marker::PhantomDa
impl<VM: VMBinding> crate::scheduler::GCWorkContext for StickyImmixNurseryGCWorkContext<VM> {
type VM = VM;
type PlanType = StickyImmix<VM>;
type ProcessEdgesWorkType = GenNurseryProcessEdges<VM, Self::PlanType>;
type TPProcessEdges = GenNurseryProcessEdges<VM, Self::PlanType>;
type NormalProcessEdges = GenNurseryProcessEdges<VM, Self::PlanType>;
type PinningProcessEdges = GenNurseryProcessEdges<VM, Self::PlanType>;
}

pub struct StickyImmixMatureGCWorkContext<VM: VMBinding, const KIND: TraceKind>(
Expand All @@ -21,6 +21,6 @@ impl<VM: VMBinding, const KIND: TraceKind> crate::scheduler::GCWorkContext
{
type VM = VM;
type PlanType = StickyImmix<VM>;
type ProcessEdgesWorkType = PlanProcessEdges<VM, Self::PlanType, KIND>;
type TPProcessEdges = PlanProcessEdges<VM, Self::PlanType, TRACE_KIND_TRANSITIVE_PIN>;
type NormalProcessEdges = PlanProcessEdges<VM, Self::PlanType, KIND>;
type PinningProcessEdges = PlanProcessEdges<VM, Self::PlanType, TRACE_KIND_TRANSITIVE_PIN>;
}
75 changes: 45 additions & 30 deletions src/scheduler/gc_work.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ impl<C: GCWorkContext> GCWork<C::VM> for ScanMutatorRoots<C> {
let mutators = <C::VM as VMBinding>::VMActivePlan::number_of_mutators();
let factory = ProcessEdgesWorkRootsWorkFactory::<
C::VM,
C::ProcessEdgesWorkType,
C::TPProcessEdges,
C::NormalProcessEdges,
C::PinningProcessEdges,
>::new(mmtk);
<C::VM as VMBinding>::VMScanning::scan_roots_in_mutator_thread(
worker.tls,
Expand Down Expand Up @@ -434,8 +434,8 @@ impl<C: GCWorkContext> GCWork<C::VM> for ScanVMSpecificRoots<C> {
trace!("ScanStaticRoots");
let factory = ProcessEdgesWorkRootsWorkFactory::<
C::VM,
C::ProcessEdgesWorkType,
C::TPProcessEdges,
C::NormalProcessEdges,
C::PinningProcessEdges,
>::new(mmtk);
<C::VM as VMBinding>::VMScanning::scan_vm_specific_roots(worker.tls, factory);
}
Expand Down Expand Up @@ -683,15 +683,15 @@ impl<VM: VMBinding> ProcessEdgesWork for SFTProcessEdges<VM> {
}
pub(crate) struct ProcessEdgesWorkRootsWorkFactory<
VM: VMBinding,
E: ProcessEdgesWork<VM = VM>,
I: ProcessEdgesWork<VM = VM>,
NPE: ProcessEdgesWork<VM = VM>,
PPE: ProcessEdgesWork<VM = VM>,
> {
mmtk: &'static MMTK<VM>,
phantom: PhantomData<(E, I)>,
phantom: PhantomData<(NPE, PPE)>,
}

impl<VM: VMBinding, E: ProcessEdgesWork<VM = VM>, I: ProcessEdgesWork<VM = VM>> Clone
for ProcessEdgesWorkRootsWorkFactory<VM, E, I>
impl<VM: VMBinding, NPE: ProcessEdgesWork<VM = VM>, PPE: ProcessEdgesWork<VM = VM>> Clone
for ProcessEdgesWorkRootsWorkFactory<VM, NPE, PPE>
{
fn clone(&self) -> Self {
Self {
Expand All @@ -701,14 +701,14 @@ impl<VM: VMBinding, E: ProcessEdgesWork<VM = VM>, I: ProcessEdgesWork<VM = VM>>
}
}

impl<VM: VMBinding, E: ProcessEdgesWork<VM = VM>, I: ProcessEdgesWork<VM = VM>>
RootsWorkFactory<EdgeOf<E>> for ProcessEdgesWorkRootsWorkFactory<VM, E, I>
impl<VM: VMBinding, NPE: ProcessEdgesWork<VM = VM>, PPE: ProcessEdgesWork<VM = VM>>
RootsWorkFactory<VM::VMEdge> for ProcessEdgesWorkRootsWorkFactory<VM, NPE, PPE>
{
fn create_process_edge_roots_work(&mut self, edges: Vec<EdgeOf<E>>) {
fn create_process_edge_roots_work(&mut self, edges: Vec<VM::VMEdge>) {
crate::memory_manager::add_work_packet(
self.mmtk,
WorkBucketStage::Closure,
E::new(edges, true, self.mmtk, WorkBucketStage::Closure),
NPE::new(edges, true, self.mmtk, WorkBucketStage::Closure),
);
}

Expand All @@ -718,21 +718,21 @@ impl<VM: VMBinding, E: ProcessEdgesWork<VM = VM>, I: ProcessEdgesWork<VM = VM>>
crate::memory_manager::add_work_packet(
self.mmtk,
WorkBucketStage::PinningRootsTrace,
ProcessRootNode::<VM, I, E>::new(nodes, WorkBucketStage::Closure),
ProcessRootNode::<VM, PPE, NPE>::new(nodes, WorkBucketStage::Closure),
);
}

fn create_process_tpinning_roots_work(&mut self, nodes: Vec<ObjectReference>) {
crate::memory_manager::add_work_packet(
self.mmtk,
WorkBucketStage::TPinningClosure,
ProcessRootNode::<VM, I, I>::new(nodes, WorkBucketStage::TPinningClosure),
ProcessRootNode::<VM, PPE, PPE>::new(nodes, WorkBucketStage::TPinningClosure),
);
}
}

impl<VM: VMBinding, E: ProcessEdgesWork<VM = VM>, I: ProcessEdgesWork<VM = VM>>
ProcessEdgesWorkRootsWorkFactory<VM, E, I>
impl<VM: VMBinding, NPE: ProcessEdgesWork<VM = VM>, PPE: ProcessEdgesWork<VM = VM>>
ProcessEdgesWorkRootsWorkFactory<VM, NPE, PPE>
{
fn new(mmtk: &'static MMTK<VM>) -> Self {
Self {
Expand Down Expand Up @@ -1015,22 +1015,37 @@ impl<E: ProcessEdgesWork, P: Plan<VM = E::VM> + PlanTraceObject<E::VM>> GCWork<E
}
}

/// This creates work for processing pinning roots. In particular it traces the objects in these roots using I,
/// but creates the work to scan these objects using E. This is necessary to guarantee that these objects do not move
/// (`I` should trace them without moving) as we do not have the information about the edges pointing to them.

/// This work packet processes pinning roots.
///
/// The `roots` member holds a list of `ObjectReference` to objects directly pointed by roots.
/// These objects will be traced using `R2OPE` (Root-to-Object Process Edges).
///
/// After that, it will create work packets for tracing their children. Those work packets (and
/// the work packets further created by them) will use `O2OPE` (Object-to-Object Process Edges) as
/// their `ProcessEdgesWork` implementations.
///
/// Because `roots` are pinning roots, `R2OPE` must be a `ProcessEdgesWork` that never moves any
/// object.
///
/// The choice of `O2OPE` determines whether the `roots` are transitively pinning or not.
///
/// - If `O2OPE` is set to a `ProcessEdgesWork` that never moves objects, all descendents of
/// `roots` will not be moved in this GC. That implements transitive pinning roots.
/// - If `O2OPE` may move objects, then this `ProcessRootsNode<VM, R2OPE, O2OPE>` work packet
/// will only pin the objects in `roots` (because `R2OPE` must not move objects anyway), but
/// not their descendents.
pub(crate) struct ProcessRootNode<
VM: VMBinding,
I: ProcessEdgesWork<VM = VM>,
E: ProcessEdgesWork<VM = VM>,
R2OPE: ProcessEdgesWork<VM = VM>,
O2OPE: ProcessEdgesWork<VM = VM>,
> {
phantom: PhantomData<(VM, I, E)>,
phantom: PhantomData<(VM, R2OPE, O2OPE)>,
roots: Vec<ObjectReference>,
bucket: WorkBucketStage,
}

impl<VM: VMBinding, I: ProcessEdgesWork<VM = VM>, E: ProcessEdgesWork<VM = VM>>
ProcessRootNode<VM, I, E>
impl<VM: VMBinding, R2OPE: ProcessEdgesWork<VM = VM>, O2OPE: ProcessEdgesWork<VM = VM>>
ProcessRootNode<VM, R2OPE, O2OPE>
{
pub fn new(nodes: Vec<ObjectReference>, bucket: WorkBucketStage) -> Self {
Self {
Expand All @@ -1041,8 +1056,8 @@ impl<VM: VMBinding, I: ProcessEdgesWork<VM = VM>, E: ProcessEdgesWork<VM = VM>>
}
}

impl<VM: VMBinding, I: ProcessEdgesWork<VM = VM>, E: ProcessEdgesWork<VM = VM>> GCWork<VM>
for ProcessRootNode<VM, I, E>
impl<VM: VMBinding, R2OPE: ProcessEdgesWork<VM = VM>, O2OPE: ProcessEdgesWork<VM = VM>> GCWork<VM>
for ProcessRootNode<VM, R2OPE, O2OPE>
{
fn do_work(&mut self, worker: &mut GCWorker<VM>, mmtk: &'static MMTK<VM>) {
trace!("ProcessRootNode");
Expand All @@ -1069,7 +1084,7 @@ impl<VM: VMBinding, I: ProcessEdgesWork<VM = VM>, E: ProcessEdgesWork<VM = VM>>
let scanned_root_objects = {
// We create an instance of E to use its `trace_object` method and its object queue.
let mut process_edges_work =
I::new(vec![], true, mmtk, WorkBucketStage::PinningRootsTrace);
R2OPE::new(vec![], true, mmtk, WorkBucketStage::PinningRootsTrace);
process_edges_work.set_worker(worker);

for object in self.roots.iter().copied() {
Expand All @@ -1086,7 +1101,7 @@ impl<VM: VMBinding, I: ProcessEdgesWork<VM = VM>, E: ProcessEdgesWork<VM = VM>>
process_edges_work.nodes.take()
};

let process_edges_work = E::new(vec![], false, mmtk, self.bucket);
let process_edges_work = O2OPE::new(vec![], false, mmtk, self.bucket);
let work = process_edges_work.create_scan_work(scanned_root_objects);
crate::memory_manager::add_work_packet(mmtk, self.bucket, work);

Expand Down
16 changes: 8 additions & 8 deletions src/scheduler/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,16 @@ impl<VM: VMBinding> GCWorkScheduler<VM> {
PhantomRefProcessing, SoftRefProcessing, WeakRefProcessing,
};
self.work_buckets[WorkBucketStage::SoftRefClosure]
.add(SoftRefProcessing::<C::ProcessEdgesWorkType>::new());
.add(SoftRefProcessing::<C::NormalProcessEdges>::new());
self.work_buckets[WorkBucketStage::WeakRefClosure]
.add(WeakRefProcessing::<C::ProcessEdgesWorkType>::new());
.add(WeakRefProcessing::<C::NormalProcessEdges>::new());
self.work_buckets[WorkBucketStage::PhantomRefClosure]
.add(PhantomRefProcessing::<C::ProcessEdgesWorkType>::new());
.add(PhantomRefProcessing::<C::NormalProcessEdges>::new());

use crate::util::reference_processor::RefForwarding;
if plan.constraints().needs_forward_after_liveness {
self.work_buckets[WorkBucketStage::RefForwarding]
.add(RefForwarding::<C::ProcessEdgesWorkType>::new());
.add(RefForwarding::<C::NormalProcessEdges>::new());
}

use crate::util::reference_processor::RefEnqueue;
Expand All @@ -192,11 +192,11 @@ impl<VM: VMBinding> GCWorkScheduler<VM> {
use crate::util::finalizable_processor::{Finalization, ForwardFinalization};
// finalization
self.work_buckets[WorkBucketStage::FinalRefClosure]
.add(Finalization::<C::ProcessEdgesWorkType>::new());
.add(Finalization::<C::NormalProcessEdges>::new());
// forward refs
if plan.constraints().needs_forward_after_liveness {
self.work_buckets[WorkBucketStage::FinalizableForwarding]
.add(ForwardFinalization::<C::ProcessEdgesWorkType>::new());
.add(ForwardFinalization::<C::NormalProcessEdges>::new());
}
}

Expand All @@ -222,12 +222,12 @@ impl<VM: VMBinding> GCWorkScheduler<VM> {
// because there are no other packets in the bucket. We set it as sentinel for
// consistency.
self.work_buckets[WorkBucketStage::VMRefClosure]
.set_sentinel(Box::new(VMProcessWeakRefs::<C::ProcessEdgesWorkType>::new()));
.set_sentinel(Box::new(VMProcessWeakRefs::<C::NormalProcessEdges>::new()));

if plan.constraints().needs_forward_after_liveness {
// VM-specific weak ref forwarding
self.work_buckets[WorkBucketStage::VMRefForwarding]
.add(VMForwardWeakRefs::<C::ProcessEdgesWorkType>::new());
.add(VMForwardWeakRefs::<C::NormalProcessEdges>::new());
}

self.work_buckets[WorkBucketStage::Release].add(VMPostForwarding::<VM>::default());
Expand Down
Loading
Loading