Skip to content

Commit 8f2ec4f

Browse files
committed
Adding handler check to task roots check and fixing clippy errors
1 parent 83aef6e commit 8f2ec4f

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

mmtk/src/julia_scanning.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ pub unsafe fn scan_julia_object<SV: SlotVisitor<JuliaVMSlot>>(obj: Address, clos
248248

249249
#[cfg(debug_assertions)]
250250
{
251-
if !cfg!(feature = "non_moving") {
251+
let eh = (*ta).eh;
252+
if !cfg!(feature = "non_moving") && !eh.is_null() {
252253
// Panic if task has not been processed as root
253254
use crate::scanning::TASK_ROOTS;
254255
let task_roots = TASK_ROOTS.lock().unwrap();

mmtk/src/scanning.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,12 @@ impl Scanning<JuliaVM> for VMScanning {
203203
// that have been processed before
204204
while !extra_root_tasks.is_empty() {
205205
let root_task = extra_root_tasks.pop();
206-
match root_task {
207-
Some(t) => {
208-
if !TASK_ROOTS.lock().unwrap().contains(&t) {
209-
let task_address = t.to_raw_address();
210-
let task = task_address.to_ptr::<_jl_task_t>();
211-
root_scan_task(task, false, &mut extra_root_tasks);
212-
}
206+
if let Some(t) = root_task {
207+
if !TASK_ROOTS.lock().unwrap().contains(&t) {
208+
let task_address = t.to_raw_address();
209+
let task = task_address.to_ptr::<_jl_task_t>();
210+
root_scan_task(task, false, &mut extra_root_tasks);
213211
}
214-
None => {}
215212
}
216213
}
217214

0 commit comments

Comments
 (0)