Reviewers: Toon Verwaest,

Description:
Make PrototypeTransitionClearing work with GC interval.

[email protected]
TEST=cctest/test-heap/PrototypeTransitionClearing


Please review this at https://codereview.chromium.org/11411031/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M test/cctest/test-heap.cc


Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index 5f26098624eb078348c3da1c28738a024786c782..8dee692d15c7c7fa6f05aab7ae6ffb8a9d9b13b7 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<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.


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to