| Index: src/objects-debug.cc
|
| diff --git a/src/objects-debug.cc b/src/objects-debug.cc
|
| index caf0bafd70c490165637ce89782853d961fe95cf..6ab2ddffe2a9e0ea3772163e20e87bd269f1a7e0 100644
|
| --- a/src/objects-debug.cc
|
| +++ b/src/objects-debug.cc
|
| @@ -95,6 +95,9 @@ void HeapObject::HeapObjectVerify() {
|
| case FIXED_DOUBLE_ARRAY_TYPE:
|
| FixedDoubleArray::cast(this)->FixedDoubleArrayVerify();
|
| break;
|
| + case CONSTANT_POOL_ARRAY_TYPE:
|
| + ConstantPoolArray::cast(this)->ConstantPoolArrayVerify();
|
| + break;
|
| case BYTE_ARRAY_TYPE:
|
| ByteArray::cast(this)->ByteArrayVerify();
|
| break;
|
| @@ -303,6 +306,13 @@ void ExternalDoubleArray::ExternalDoubleArrayVerify() {
|
| }
|
|
|
|
|
| +bool JSObject::ElementsAreSafeToExamine() {
|
| + return (FLAG_use_gvn && FLAG_use_allocation_folding) ||
|
| + reinterpret_cast<Map*>(elements()) !=
|
| + GetHeap()->one_pointer_filler_map();
|
| +}
|
| +
|
| +
|
| void JSObject::JSObjectVerify() {
|
| VerifyHeapPointer(properties());
|
| VerifyHeapPointer(elements());
|
| @@ -332,9 +342,7 @@ void JSObject::JSObjectVerify() {
|
|
|
| // If a GC was caused while constructing this object, the elements
|
| // pointer may point to a one pointer filler map.
|
| - if ((FLAG_use_gvn && FLAG_use_allocation_folding) ||
|
| - (reinterpret_cast<Map*>(elements()) !=
|
| - GetHeap()->one_pointer_filler_map())) {
|
| + if (ElementsAreSafeToExamine()) {
|
| CHECK_EQ((map()->has_fast_smi_or_object_elements() ||
|
| (elements() == GetHeap()->empty_fixed_array())),
|
| (elements()->map() == GetHeap()->fixed_array_map() ||
|
| @@ -439,6 +447,11 @@ void FixedDoubleArray::FixedDoubleArrayVerify() {
|
| }
|
|
|
|
|
| +void ConstantPoolArray::ConstantPoolArrayVerify() {
|
| + CHECK(IsConstantPoolArray());
|
| +}
|
| +
|
| +
|
| void JSGeneratorObject::JSGeneratorObjectVerify() {
|
| // In an expression like "new g()", there can be a point where a generator
|
| // object is allocated but its fields are all undefined, as it hasn't yet been
|
| @@ -690,9 +703,7 @@ void JSArray::JSArrayVerify() {
|
| CHECK(length()->IsNumber() || length()->IsUndefined());
|
| // If a GC was caused while constructing this array, the elements
|
| // pointer may point to a one pointer filler map.
|
| - if ((FLAG_use_gvn && FLAG_use_allocation_folding) ||
|
| - (reinterpret_cast<Map*>(elements()) !=
|
| - GetHeap()->one_pointer_filler_map())) {
|
| + if (ElementsAreSafeToExamine()) {
|
| CHECK(elements()->IsUndefined() ||
|
| elements()->IsFixedArray() ||
|
| elements()->IsFixedDoubleArray());
|
|
|