- 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"
17 lines
301 B
Plaintext
17 lines
301 B
Plaintext
var found = []
|
|
for (i in 1..1000) {
|
|
var foo = 1337
|
|
for (i in 1..1000) {
|
|
foo = { "a" : foo, "b": foo }
|
|
}
|
|
var bar = foo
|
|
for (i in 1..1000) {
|
|
bar = bar["a"]
|
|
}
|
|
found.add(bar)
|
|
}
|
|
|
|
System.gc()
|
|
System.print(found.all {|i| i == 1337}) // expect: true
|
|
System.print("done") // expect: done
|