From 1b5848c210897523036caab24e36e5a6dcc65948 Mon Sep 17 00:00:00 2001 From: "rmcilroy@chromium.org" Date: Thu, 17 Jul 2014 10:03:30 +0000 Subject: [PATCH] Some fixes to avoid breakages when enabling out-of-line constant pools. Three fixes which are required to pass all the tests when out-of-line constant pools are enabled for Arm: - Invalidate embedded objects in optimized code when it is deoptimized such that the weak pointers in the constant pool array are cleared. This prevents a CHECK(heap_->mark_compact_collector()->IsMarked(object)) error when a verifying weak pointers in a deoptimized code object's constant pool. - Modify LargeObjectSpace::Verify to allow constant pool arrays in the large object space. - Increase the 32bit stack size limit, since the constant pool pointer is now on every stack frame, causing the size of each stack frame to increase by one word, and causing deep-recursion-test to fail. R=hpayer@chromium.org Review URL: https://codereview.chromium.org/385163005 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/flag-definitions.h | 4 ++-- src/objects.cc | 1 + src/spaces.cc | 8 +++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/flag-definitions.h b/src/flag-definitions.h index f4e7116..30464ef 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h @@ -456,9 +456,9 @@ DEFINE_BOOL(enable_liveedit, true, "enable liveedit experimental feature") DEFINE_BOOL(hard_abort, true, "abort by crashing") // execution.cc -// Slightly less than 1MB on 64-bit, since Windows' default stack size for +// Slightly less than 1MB, since Windows' default stack size for // the main execution thread is 1MB for both 32 and 64-bit. -DEFINE_INT(stack_size, kPointerSize * 123, +DEFINE_INT(stack_size, 984, "default size of stack region v8 is allowed to use (in kBytes)") // frames.cc diff --git a/src/objects.cc b/src/objects.cc index cead2dd..43288ad 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -10652,6 +10652,7 @@ void ObjectVisitor::VisitExternalReference(RelocInfo* rinfo) { void Code::InvalidateRelocation() { + InvalidateEmbeddedObjects(); set_relocation_info(GetHeap()->empty_byte_array()); } diff --git a/src/spaces.cc b/src/spaces.cc index 86572d7..a397603 100644 --- a/src/spaces.cc +++ b/src/spaces.cc @@ -3063,10 +3063,12 @@ void LargeObjectSpace::Verify() { // We have only code, sequential strings, external strings // (sequential strings that have been morphed into external - // strings), fixed arrays, and byte arrays in large object space. + // strings), fixed arrays, byte arrays, and constant pool arrays in the + // large object space. CHECK(object->IsCode() || object->IsSeqString() || - object->IsExternalString() || object->IsFixedArray() || - object->IsFixedDoubleArray() || object->IsByteArray()); + object->IsExternalString() || object->IsFixedArray() || + object->IsFixedDoubleArray() || object->IsByteArray() || + object->IsConstantPoolArray()); // The object itself should look OK. object->ObjectVerify(); -- 2.7.4