}
+// Implemented in the test-alloc.cc test suite.
+void SimulateFullSpace(PagedSpace* space);
+
+
TEST(PrototypeTransitionClearing) {
InitializeVM();
v8::HandleScope scope;
// 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.
}
-// 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.