From 30c82d59c863bef5a5edb5de637ee8261e98ef15 Mon Sep 17 00:00:00 2001 From: "mstarzinger@chromium.org" Date: Fri, 16 Nov 2012 11:39:32 +0000 Subject: [PATCH] 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 --- test/cctest/test-heap.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc index 5f26098..8dee692 100644 --- a/test/cctest/test-heap.cc +++ b/test/cctest/test-heap.cc @@ -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 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. -- 2.7.4