Files
wren/test/language/many_reallocations.wren
T
Bob Nystrom 8afa5c3d68 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"
2015-10-29 14:38:09 +00:00

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