Make PrototypeTransitionClearing work with GC interval.

R=verwaest@chromium.org
TEST=cctest/test-heap/PrototypeTransitionClearing

Review URL: https://codereview.chromium.org/11411031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 63f109aa
......@@ -1781,6 +1781,10 @@ TEST(InstanceOfStubWriteBarrier) {
}
// Implemented in the test-alloc.cc test suite.
void SimulateFullSpace(PagedSpace* space);
TEST(PrototypeTransitionClearing) {
InitializeVM();
v8::HandleScope scope;
......@@ -1819,10 +1823,11 @@ TEST(PrototypeTransitionClearing) {
// Make sure next prototype is placed on an old-space evacuation candidate.
Handle<JSObject> prototype;
PagedSpace* space = HEAP->old_pointer_space();
do {
{
AlwaysAllocateScope always_allocate;
SimulateFullSpace(space);
prototype = FACTORY->NewJSArray(32 * KB, FAST_HOLEY_ELEMENTS, TENURED);
} while (space->FirstPage() == space->LastPage() ||
!space->LastPage()->Contains(prototype->address()));
}
// Add a prototype on an evacuation candidate and verify that transition
// clearing correctly records slots in prototype transition array.
......@@ -2094,10 +2099,6 @@ TEST(Regress2143b) {
}
// Implemented in the test-alloc.cc test suite.
void SimulateFullSpace(PagedSpace* space);
TEST(ReleaseOverReservedPages) {
i::FLAG_trace_gc = true;
// The optimizer can allocate stuff, messing up the test.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment