OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/platform/platform.h" | 8 #include "src/base/platform/platform.h" |
9 #include "src/full-codegen.h" | 9 #include "src/full-codegen.h" |
10 #include "src/heap/mark-compact.h" | 10 #include "src/heap/mark-compact.h" |
(...skipping 3019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3030 Map* map = object->map(); | 3030 Map* map = object->map(); |
3031 CHECK(map->IsMap()); | 3031 CHECK(map->IsMap()); |
3032 CHECK(heap()->map_space()->Contains(map)); | 3032 CHECK(heap()->map_space()->Contains(map)); |
3033 | 3033 |
3034 // We have only code, sequential strings, external strings | 3034 // We have only code, sequential strings, external strings |
3035 // (sequential strings that have been morphed into external | 3035 // (sequential strings that have been morphed into external |
3036 // strings), fixed arrays, byte arrays, and constant pool arrays in the | 3036 // strings), fixed arrays, byte arrays, and constant pool arrays in the |
3037 // large object space. | 3037 // large object space. |
3038 CHECK(object->IsCode() || object->IsSeqString() || | 3038 CHECK(object->IsCode() || object->IsSeqString() || |
3039 object->IsExternalString() || object->IsFixedArray() || | 3039 object->IsExternalString() || object->IsFixedArray() || |
3040 object->IsFixedDoubleArray() || object->IsByteArray()); | 3040 object->IsFixedDoubleArray() || object->IsByteArray() || |
| 3041 object->IsConstantPoolArray()); |
3041 | 3042 |
3042 // The object itself should look OK. | 3043 // The object itself should look OK. |
3043 object->ObjectVerify(); | 3044 object->ObjectVerify(); |
3044 | 3045 |
3045 // Byte arrays and strings don't have interior pointers. | 3046 // Byte arrays and strings don't have interior pointers. |
3046 if (object->IsCode()) { | 3047 if (object->IsCode()) { |
3047 VerifyPointersVisitor code_visitor; | 3048 VerifyPointersVisitor code_visitor; |
3048 object->IterateBody(map->instance_type(), object->Size(), &code_visitor); | 3049 object->IterateBody(map->instance_type(), object->Size(), &code_visitor); |
3049 } else if (object->IsFixedArray()) { | 3050 } else if (object->IsFixedArray()) { |
3050 FixedArray* array = FixedArray::cast(object); | 3051 FixedArray* array = FixedArray::cast(object); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3119 object->ShortPrint(); | 3120 object->ShortPrint(); |
3120 PrintF("\n"); | 3121 PrintF("\n"); |
3121 } | 3122 } |
3122 printf(" --------------------------------------\n"); | 3123 printf(" --------------------------------------\n"); |
3123 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3124 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
3124 } | 3125 } |
3125 | 3126 |
3126 #endif // DEBUG | 3127 #endif // DEBUG |
3127 } // namespace internal | 3128 } // namespace internal |
3128 } // namespace v8 | 3129 } // namespace v8 |
OLD | NEW |