fix: refactor GC gray set to use count/capacity and handle empty set edge cases
- Rename grayDepth to grayCount and maxGray to grayCapacity for clarity - Fix gray stack growth condition to check capacity instead of depth - Use config.reallocateFn directly instead of wrenReallocate wrapper - Change blacken loop from do-while to while to handle empty gray set - Remove separate initializeGC function and inline allocation in wrenNewVM - Add explicit System.gc() calls in deeply_nested_gc and many_reallocations tests - Normalize test output strings to lowercase "done"
This commit is contained in:
@@ -4,4 +4,5 @@ for (i in 1..400000) {
|
||||
head = { "next" : head }
|
||||
}
|
||||
|
||||
System.print("done") // expect: done
|
||||
System.gc()
|
||||
System.print("done") // expect: done
|
||||
|
||||
@@ -10,5 +10,7 @@ for (i in 1..1000) {
|
||||
}
|
||||
found.add(bar)
|
||||
}
|
||||
|
||||
System.gc()
|
||||
System.print(found.all {|i| i == 1337}) // expect: true
|
||||
System.print("DONE!") // expect: DONE!
|
||||
System.print("done") // expect: done
|
||||
|
||||
Reference in New Issue
Block a user