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/platform/platform.h" | 7 #include "src/base/platform/platform.h" |
8 #include "src/full-codegen.h" | 8 #include "src/full-codegen.h" |
9 #include "src/macro-assembler.h" | 9 #include "src/macro-assembler.h" |
10 #include "src/mark-compact.h" | 10 #include "src/mark-compact.h" |
(...skipping 3044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3055 CHECK(object->address() == page->area_start()); | 3055 CHECK(object->address() == page->area_start()); |
3056 | 3056 |
3057 // The first word should be a map, and we expect all map pointers to be | 3057 // The first word should be a map, and we expect all map pointers to be |
3058 // in map space. | 3058 // in map space. |
3059 Map* map = object->map(); | 3059 Map* map = object->map(); |
3060 CHECK(map->IsMap()); | 3060 CHECK(map->IsMap()); |
3061 CHECK(heap()->map_space()->Contains(map)); | 3061 CHECK(heap()->map_space()->Contains(map)); |
3062 | 3062 |
3063 // We have only code, sequential strings, external strings | 3063 // We have only code, sequential strings, external strings |
3064 // (sequential strings that have been morphed into external | 3064 // (sequential strings that have been morphed into external |
3065 // strings), fixed arrays, and byte arrays in large object space. | 3065 // strings), fixed arrays, byte arrays, and constant pool arrays in the |
| 3066 // large object space. |
3066 CHECK(object->IsCode() || object->IsSeqString() || | 3067 CHECK(object->IsCode() || object->IsSeqString() || |
3067 object->IsExternalString() || object->IsFixedArray() || | 3068 object->IsExternalString() || object->IsFixedArray() || |
3068 object->IsFixedDoubleArray() || object->IsByteArray()); | 3069 object->IsFixedDoubleArray() || object->IsByteArray() || |
| 3070 object->IsConstantPoolArray()); |
3069 | 3071 |
3070 // The object itself should look OK. | 3072 // The object itself should look OK. |
3071 object->ObjectVerify(); | 3073 object->ObjectVerify(); |
3072 | 3074 |
3073 // Byte arrays and strings don't have interior pointers. | 3075 // Byte arrays and strings don't have interior pointers. |
3074 if (object->IsCode()) { | 3076 if (object->IsCode()) { |
3075 VerifyPointersVisitor code_visitor; | 3077 VerifyPointersVisitor code_visitor; |
3076 object->IterateBody(map->instance_type(), | 3078 object->IterateBody(map->instance_type(), |
3077 object->Size(), | 3079 object->Size(), |
3078 &code_visitor); | 3080 &code_visitor); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3149 object->ShortPrint(); | 3151 object->ShortPrint(); |
3150 PrintF("\n"); | 3152 PrintF("\n"); |
3151 } | 3153 } |
3152 printf(" --------------------------------------\n"); | 3154 printf(" --------------------------------------\n"); |
3153 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3155 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
3154 } | 3156 } |
3155 | 3157 |
3156 #endif // DEBUG | 3158 #endif // DEBUG |
3157 | 3159 |
3158 } } // namespace v8::internal | 3160 } } // namespace v8::internal |
OLD | NEW |