| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 break; | 133 break; |
| 134 case PROPERTY_CELL_TYPE: | 134 case PROPERTY_CELL_TYPE: |
| 135 PropertyCell::cast(this)->PropertyCellVerify(); | 135 PropertyCell::cast(this)->PropertyCellVerify(); |
| 136 break; | 136 break; |
| 137 case WEAK_CELL_TYPE: | 137 case WEAK_CELL_TYPE: |
| 138 WeakCell::cast(this)->WeakCellVerify(); | 138 WeakCell::cast(this)->WeakCellVerify(); |
| 139 break; | 139 break; |
| 140 case JS_ARRAY_TYPE: | 140 case JS_ARRAY_TYPE: |
| 141 JSArray::cast(this)->JSArrayVerify(); | 141 JSArray::cast(this)->JSArrayVerify(); |
| 142 break; | 142 break; |
| 143 case JS_MODULE_NAMESPACE_TYPE: |
| 144 JSModuleNamespace::cast(this)->JSModuleNamespaceVerify(); |
| 145 break; |
| 143 case JS_SET_TYPE: | 146 case JS_SET_TYPE: |
| 144 JSSet::cast(this)->JSSetVerify(); | 147 JSSet::cast(this)->JSSetVerify(); |
| 145 break; | 148 break; |
| 146 case JS_MAP_TYPE: | 149 case JS_MAP_TYPE: |
| 147 JSMap::cast(this)->JSMapVerify(); | 150 JSMap::cast(this)->JSMapVerify(); |
| 148 break; | 151 break; |
| 149 case JS_SET_ITERATOR_TYPE: | 152 case JS_SET_ITERATOR_TYPE: |
| 150 JSSetIterator::cast(this)->JSSetIteratorVerify(); | 153 JSSetIterator::cast(this)->JSSetIteratorVerify(); |
| 151 break; | 154 break; |
| 152 case JS_MAP_ITERATOR_TYPE: | 155 case JS_MAP_ITERATOR_TYPE: |
| (...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 void PromiseContainer::PromiseContainerVerify() { | 915 void PromiseContainer::PromiseContainerVerify() { |
| 913 CHECK(IsPromiseContainer()); | 916 CHECK(IsPromiseContainer()); |
| 914 thenable()->ObjectVerify(); | 917 thenable()->ObjectVerify(); |
| 915 then()->ObjectVerify(); | 918 then()->ObjectVerify(); |
| 916 resolve()->ObjectVerify(); | 919 resolve()->ObjectVerify(); |
| 917 reject()->ObjectVerify(); | 920 reject()->ObjectVerify(); |
| 918 before_debug_event()->ObjectVerify(); | 921 before_debug_event()->ObjectVerify(); |
| 919 after_debug_event()->ObjectVerify(); | 922 after_debug_event()->ObjectVerify(); |
| 920 } | 923 } |
| 921 | 924 |
| 925 void JSModuleNamespace::JSModuleNamespaceVerify() { |
| 926 CHECK(IsJSModuleNamespace()); |
| 927 module()->ObjectVerify(); |
| 928 } |
| 929 |
| 922 void Module::ModuleVerify() { | 930 void Module::ModuleVerify() { |
| 931 Isolate* isolate = GetIsolate(); |
| 923 CHECK(IsModule()); | 932 CHECK(IsModule()); |
| 924 CHECK(code()->IsSharedFunctionInfo() || code()->IsJSFunction()); | 933 CHECK(code()->IsSharedFunctionInfo() || code()->IsJSFunction()); |
| 925 code()->ObjectVerify(); | 934 code()->ObjectVerify(); |
| 926 exports()->ObjectVerify(); | 935 exports()->ObjectVerify(); |
| 927 requested_modules()->ObjectVerify(); | 936 requested_modules()->ObjectVerify(); |
| 928 VerifySmiField(kFlagsOffset); | 937 VerifySmiField(kFlagsOffset); |
| 929 embedder_data()->ObjectVerify(); | 938 embedder_data()->ObjectVerify(); |
| 930 CHECK(shared()->name()->IsSymbol()); | 939 CHECK(shared()->name()->IsSymbol()); |
| 940 CHECK(module_namespace()->IsUndefined(isolate) || |
| 941 module_namespace()->IsJSModuleNamespace()); |
| 931 // TODO(neis): Check more. | 942 // TODO(neis): Check more. |
| 932 } | 943 } |
| 933 | 944 |
| 934 void PrototypeInfo::PrototypeInfoVerify() { | 945 void PrototypeInfo::PrototypeInfoVerify() { |
| 935 CHECK(IsPrototypeInfo()); | 946 CHECK(IsPrototypeInfo()); |
| 936 if (prototype_users()->IsWeakFixedArray()) { | 947 if (prototype_users()->IsWeakFixedArray()) { |
| 937 WeakFixedArray::cast(prototype_users())->FixedArrayVerify(); | 948 WeakFixedArray::cast(prototype_users())->FixedArrayVerify(); |
| 938 } else { | 949 } else { |
| 939 CHECK(prototype_users()->IsSmi()); | 950 CHECK(prototype_users()->IsSmi()); |
| 940 } | 951 } |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1362 | 1373 |
| 1363 // Both are done at the same time. | 1374 // Both are done at the same time. |
| 1364 CHECK_EQ(new_it.done(), old_it.done()); | 1375 CHECK_EQ(new_it.done(), old_it.done()); |
| 1365 } | 1376 } |
| 1366 | 1377 |
| 1367 | 1378 |
| 1368 #endif // DEBUG | 1379 #endif // DEBUG |
| 1369 | 1380 |
| 1370 } // namespace internal | 1381 } // namespace internal |
| 1371 } // namespace v8 | 1382 } // namespace v8 |
| OLD | NEW |