| 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/objects.h" | 5 #include "src/objects.h" |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/disasm.h" | 8 #include "src/disasm.h" |
| 9 #include "src/disassembler.h" | 9 #include "src/disassembler.h" |
| 10 #include "src/field-type.h" | 10 #include "src/field-type.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 break; | 135 break; |
| 136 case WEAK_CELL_TYPE: | 136 case WEAK_CELL_TYPE: |
| 137 WeakCell::cast(this)->WeakCellVerify(); | 137 WeakCell::cast(this)->WeakCellVerify(); |
| 138 break; | 138 break; |
| 139 case JS_ARRAY_TYPE: | 139 case JS_ARRAY_TYPE: |
| 140 JSArray::cast(this)->JSArrayVerify(); | 140 JSArray::cast(this)->JSArrayVerify(); |
| 141 break; | 141 break; |
| 142 case JS_MODULE_NAMESPACE_TYPE: | 142 case JS_MODULE_NAMESPACE_TYPE: |
| 143 JSModuleNamespace::cast(this)->JSModuleNamespaceVerify(); | 143 JSModuleNamespace::cast(this)->JSModuleNamespaceVerify(); |
| 144 break; | 144 break; |
| 145 case JS_FIXED_ARRAY_ITERATOR_TYPE: | |
| 146 JSFixedArrayIterator::cast(this)->JSFixedArrayIteratorVerify(); | |
| 147 break; | |
| 148 case JS_SET_TYPE: | 145 case JS_SET_TYPE: |
| 149 JSSet::cast(this)->JSSetVerify(); | 146 JSSet::cast(this)->JSSetVerify(); |
| 150 break; | 147 break; |
| 151 case JS_MAP_TYPE: | 148 case JS_MAP_TYPE: |
| 152 JSMap::cast(this)->JSMapVerify(); | 149 JSMap::cast(this)->JSMapVerify(); |
| 153 break; | 150 break; |
| 154 case JS_SET_ITERATOR_TYPE: | 151 case JS_SET_ITERATOR_TYPE: |
| 155 JSSetIterator::cast(this)->JSSetIteratorVerify(); | 152 JSSetIterator::cast(this)->JSSetIteratorVerify(); |
| 156 break; | 153 break; |
| 157 case JS_MAP_ITERATOR_TYPE: | 154 case JS_MAP_ITERATOR_TYPE: |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1031 CHECK(debug_id()->IsNumber() || debug_id()->IsUndefined(isolate)); | 1028 CHECK(debug_id()->IsNumber() || debug_id()->IsUndefined(isolate)); |
| 1032 CHECK(debug_name()->IsString() || debug_name()->IsUndefined(isolate)); | 1029 CHECK(debug_name()->IsString() || debug_name()->IsUndefined(isolate)); |
| 1033 CHECK(context()->IsContext()); | 1030 CHECK(context()->IsContext()); |
| 1034 } | 1031 } |
| 1035 | 1032 |
| 1036 void JSModuleNamespace::JSModuleNamespaceVerify() { | 1033 void JSModuleNamespace::JSModuleNamespaceVerify() { |
| 1037 CHECK(IsJSModuleNamespace()); | 1034 CHECK(IsJSModuleNamespace()); |
| 1038 VerifyPointer(module()); | 1035 VerifyPointer(module()); |
| 1039 } | 1036 } |
| 1040 | 1037 |
| 1041 void JSFixedArrayIterator::JSFixedArrayIteratorVerify() { | |
| 1042 CHECK(IsJSFixedArrayIterator()); | |
| 1043 | |
| 1044 VerifyPointer(array()); | |
| 1045 VerifyPointer(initial_next()); | |
| 1046 VerifySmiField(kIndexOffset); | |
| 1047 | |
| 1048 CHECK_LE(index(), array()->length()); | |
| 1049 } | |
| 1050 | |
| 1051 void ModuleInfoEntry::ModuleInfoEntryVerify() { | 1038 void ModuleInfoEntry::ModuleInfoEntryVerify() { |
| 1052 Isolate* isolate = GetIsolate(); | 1039 Isolate* isolate = GetIsolate(); |
| 1053 CHECK(IsModuleInfoEntry()); | 1040 CHECK(IsModuleInfoEntry()); |
| 1054 | 1041 |
| 1055 CHECK(export_name()->IsUndefined(isolate) || export_name()->IsString()); | 1042 CHECK(export_name()->IsUndefined(isolate) || export_name()->IsString()); |
| 1056 CHECK(local_name()->IsUndefined(isolate) || local_name()->IsString()); | 1043 CHECK(local_name()->IsUndefined(isolate) || local_name()->IsString()); |
| 1057 CHECK(import_name()->IsUndefined(isolate) || import_name()->IsString()); | 1044 CHECK(import_name()->IsUndefined(isolate) || import_name()->IsString()); |
| 1058 | 1045 |
| 1059 VerifySmiField(kModuleRequestOffset); | 1046 VerifySmiField(kModuleRequestOffset); |
| 1060 VerifySmiField(kCellIndexOffset); | 1047 VerifySmiField(kCellIndexOffset); |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1536 | 1523 |
| 1537 // Both are done at the same time. | 1524 // Both are done at the same time. |
| 1538 CHECK_EQ(new_it.done(), old_it.done()); | 1525 CHECK_EQ(new_it.done(), old_it.done()); |
| 1539 } | 1526 } |
| 1540 | 1527 |
| 1541 | 1528 |
| 1542 #endif // DEBUG | 1529 #endif // DEBUG |
| 1543 | 1530 |
| 1544 } // namespace internal | 1531 } // namespace internal |
| 1545 } // namespace v8 | 1532 } // namespace v8 |
| OLD | NEW |