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 3026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3037 Map* map = object->map(); | 3037 Map* map = object->map(); |
3038 CHECK(map->IsMap()); | 3038 CHECK(map->IsMap()); |
3039 CHECK(heap()->map_space()->Contains(map)); | 3039 CHECK(heap()->map_space()->Contains(map)); |
3040 | 3040 |
3041 // We have only code, sequential strings, external strings | 3041 // We have only code, sequential strings, external strings |
3042 // (sequential strings that have been morphed into external | 3042 // (sequential strings that have been morphed into external |
3043 // strings), fixed arrays, byte arrays, and constant pool arrays in the | 3043 // strings), fixed arrays, byte arrays, and constant pool arrays in the |
3044 // large object space. | 3044 // large object space. |
3045 CHECK(object->IsCode() || object->IsSeqString() || | 3045 CHECK(object->IsCode() || object->IsSeqString() || |
3046 object->IsExternalString() || object->IsFixedArray() || | 3046 object->IsExternalString() || object->IsFixedArray() || |
3047 object->IsFixedDoubleArray() || object->IsByteArray() || | 3047 object->IsFixedDoubleArray() || object->IsByteArray()); |
3048 object->IsConstantPoolArray()); | |
3049 | 3048 |
3050 // The object itself should look OK. | 3049 // The object itself should look OK. |
3051 object->ObjectVerify(); | 3050 object->ObjectVerify(); |
3052 | 3051 |
3053 // Byte arrays and strings don't have interior pointers. | 3052 // Byte arrays and strings don't have interior pointers. |
3054 if (object->IsCode()) { | 3053 if (object->IsCode()) { |
3055 VerifyPointersVisitor code_visitor; | 3054 VerifyPointersVisitor code_visitor; |
3056 object->IterateBody(map->instance_type(), object->Size(), &code_visitor); | 3055 object->IterateBody(map->instance_type(), object->Size(), &code_visitor); |
3057 } else if (object->IsFixedArray()) { | 3056 } else if (object->IsFixedArray()) { |
3058 FixedArray* array = FixedArray::cast(object); | 3057 FixedArray* array = FixedArray::cast(object); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3127 object->ShortPrint(); | 3126 object->ShortPrint(); |
3128 PrintF("\n"); | 3127 PrintF("\n"); |
3129 } | 3128 } |
3130 printf(" --------------------------------------\n"); | 3129 printf(" --------------------------------------\n"); |
3131 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3130 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
3132 } | 3131 } |
3133 | 3132 |
3134 #endif // DEBUG | 3133 #endif // DEBUG |
3135 } | 3134 } |
3136 } // namespace v8::internal | 3135 } // namespace v8::internal |
OLD | NEW |