| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/disasm.h" | 7 #include "src/disasm.h" |
| 8 #include "src/disassembler.h" | 8 #include "src/disassembler.h" |
| 9 #include "src/heap/objects-visiting.h" | 9 #include "src/heap/objects-visiting.h" |
| 10 #include "src/jsregexp.h" | 10 #include "src/jsregexp.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 break; | 118 break; |
| 119 case JS_BUILTINS_OBJECT_TYPE: | 119 case JS_BUILTINS_OBJECT_TYPE: |
| 120 JSBuiltinsObject::cast(this)->JSBuiltinsObjectVerify(); | 120 JSBuiltinsObject::cast(this)->JSBuiltinsObjectVerify(); |
| 121 break; | 121 break; |
| 122 case CELL_TYPE: | 122 case CELL_TYPE: |
| 123 Cell::cast(this)->CellVerify(); | 123 Cell::cast(this)->CellVerify(); |
| 124 break; | 124 break; |
| 125 case PROPERTY_CELL_TYPE: | 125 case PROPERTY_CELL_TYPE: |
| 126 PropertyCell::cast(this)->PropertyCellVerify(); | 126 PropertyCell::cast(this)->PropertyCellVerify(); |
| 127 break; | 127 break; |
| 128 case WEAK_CELL_TYPE: |
| 129 WeakCell::cast(this)->WeakCellVerify(); |
| 130 break; |
| 128 case JS_ARRAY_TYPE: | 131 case JS_ARRAY_TYPE: |
| 129 JSArray::cast(this)->JSArrayVerify(); | 132 JSArray::cast(this)->JSArrayVerify(); |
| 130 break; | 133 break; |
| 131 case JS_SET_TYPE: | 134 case JS_SET_TYPE: |
| 132 JSSet::cast(this)->JSSetVerify(); | 135 JSSet::cast(this)->JSSetVerify(); |
| 133 break; | 136 break; |
| 134 case JS_MAP_TYPE: | 137 case JS_MAP_TYPE: |
| 135 JSMap::cast(this)->JSMapVerify(); | 138 JSMap::cast(this)->JSMapVerify(); |
| 136 break; | 139 break; |
| 137 case JS_SET_ITERATOR_TYPE: | 140 case JS_SET_ITERATOR_TYPE: |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 } | 631 } |
| 629 | 632 |
| 630 | 633 |
| 631 void PropertyCell::PropertyCellVerify() { | 634 void PropertyCell::PropertyCellVerify() { |
| 632 CHECK(IsPropertyCell()); | 635 CHECK(IsPropertyCell()); |
| 633 VerifyObjectField(kValueOffset); | 636 VerifyObjectField(kValueOffset); |
| 634 VerifyObjectField(kTypeOffset); | 637 VerifyObjectField(kTypeOffset); |
| 635 } | 638 } |
| 636 | 639 |
| 637 | 640 |
| 641 void WeakCell::WeakCellVerify() { |
| 642 CHECK(IsWeakCell()); |
| 643 VerifyObjectField(kValueOffset); |
| 644 VerifyObjectField(kNextOffset); |
| 645 } |
| 646 |
| 647 |
| 638 void Code::CodeVerify() { | 648 void Code::CodeVerify() { |
| 639 CHECK(IsAligned(reinterpret_cast<intptr_t>(instruction_start()), | 649 CHECK(IsAligned(reinterpret_cast<intptr_t>(instruction_start()), |
| 640 kCodeAlignment)); | 650 kCodeAlignment)); |
| 641 relocation_info()->ObjectVerify(); | 651 relocation_info()->ObjectVerify(); |
| 642 Address last_gc_pc = NULL; | 652 Address last_gc_pc = NULL; |
| 643 Isolate* isolate = GetIsolate(); | 653 Isolate* isolate = GetIsolate(); |
| 644 for (RelocIterator it(this); !it.done(); it.next()) { | 654 for (RelocIterator it(this); !it.done(); it.next()) { |
| 645 it.rinfo()->Verify(isolate); | 655 it.rinfo()->Verify(isolate); |
| 646 // Ensure that GC will not iterate twice over the same pointer. | 656 // Ensure that GC will not iterate twice over the same pointer. |
| 647 if (RelocInfo::IsGCRelocMode(it.rinfo()->rmode())) { | 657 if (RelocInfo::IsGCRelocMode(it.rinfo()->rmode())) { |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1204 for (int i = 0; i < number_of_transitions(); ++i) { | 1214 for (int i = 0; i < number_of_transitions(); ++i) { |
| 1205 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1215 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
| 1206 } | 1216 } |
| 1207 return true; | 1217 return true; |
| 1208 } | 1218 } |
| 1209 | 1219 |
| 1210 | 1220 |
| 1211 #endif // DEBUG | 1221 #endif // DEBUG |
| 1212 | 1222 |
| 1213 } } // namespace v8::internal | 1223 } } // namespace v8::internal |
| OLD | NEW |