Fix check for color of object.

This commit is contained in:
Jesse Brault 2025-10-14 21:21:26 -05:00
parent d09d945323
commit 434a113d97

View File

@ -114,10 +114,8 @@ fn collect_garbage(
for stack_value in stack {
match stack_value {
DvmValue::Object(gc) => {
if gc.color() == GcColor::White {
gray_stack.push(gc.clone());
}
}
_ => {}
}
}
@ -126,8 +124,10 @@ fn collect_garbage(
for field in current.data().borrow().fields() {
match field {
DvmValue::Object(object) => {
if object.color() == GcColor::White {
gray_stack.push(object.clone());
}
}
_ => {}
}
}