Skip to content
Open
Changes from all 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
16 changes: 6 additions & 10 deletions gc/mmtk/src/weak_proc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,21 +133,17 @@ impl WeakProcessor {
}

fn process_obj_free_candidates(obj_free_candidates: &mut Vec<ObjectReference>) {
// Process obj_free
let mut new_candidates = Vec::new();

for object in obj_free_candidates.iter().copied() {
obj_free_candidates.retain_mut(|object| {
if object.is_reachable() {
// Forward and add back to the candidate list.
let new_object = object.forward();
trace!("Forwarding obj_free candidate: {object} -> {new_object}");
new_candidates.push(new_object);
*object = new_object;
true
} else {
upcalls::call_obj_free(object);
upcalls::call_obj_free(*object);
false
}
}

*obj_free_candidates = new_candidates;
});
}

struct ProcessParallelObjFreeCandidates {
Expand Down
Loading