| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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: | 143 case JS_MODULE_NAMESPACE_TYPE: |
| 144 JSModuleNamespace::cast(this)->JSModuleNamespaceVerify(); | 144 JSModuleNamespace::cast(this)->JSModuleNamespaceVerify(); |
| 145 break; | 145 break; |
| 146 case JS_FIXED_ARRAY_ITERATOR_TYPE: |
| 147 JSFixedArrayIterator::cast(this)->JSFixedArrayIteratorVerify(); |
| 148 break; |
| 146 case JS_SET_TYPE: | 149 case JS_SET_TYPE: |
| 147 JSSet::cast(this)->JSSetVerify(); | 150 JSSet::cast(this)->JSSetVerify(); |
| 148 break; | 151 break; |
| 149 case JS_MAP_TYPE: | 152 case JS_MAP_TYPE: |
| 150 JSMap::cast(this)->JSMapVerify(); | 153 JSMap::cast(this)->JSMapVerify(); |
| 151 break; | 154 break; |
| 152 case JS_SET_ITERATOR_TYPE: | 155 case JS_SET_ITERATOR_TYPE: |
| 153 JSSetIterator::cast(this)->JSSetIteratorVerify(); | 156 JSSetIterator::cast(this)->JSSetIteratorVerify(); |
| 154 break; | 157 break; |
| 155 case JS_MAP_ITERATOR_TYPE: | 158 case JS_MAP_ITERATOR_TYPE: |
| (...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 CHECK(after_debug_event()->IsJSObject() || | 939 CHECK(after_debug_event()->IsJSObject() || |
| 937 after_debug_event()->IsUndefined(isolate)); | 940 after_debug_event()->IsUndefined(isolate)); |
| 938 CHECK(context()->IsContext()); | 941 CHECK(context()->IsContext()); |
| 939 } | 942 } |
| 940 | 943 |
| 941 void JSModuleNamespace::JSModuleNamespaceVerify() { | 944 void JSModuleNamespace::JSModuleNamespaceVerify() { |
| 942 CHECK(IsJSModuleNamespace()); | 945 CHECK(IsJSModuleNamespace()); |
| 943 module()->ObjectVerify(); | 946 module()->ObjectVerify(); |
| 944 } | 947 } |
| 945 | 948 |
| 949 void JSFixedArrayIterator::JSFixedArrayIteratorVerify() { |
| 950 CHECK(IsJSFixedArrayIterator()); |
| 951 |
| 952 CHECK(array()->IsFixedArray()); |
| 953 VerifySmiField(kIndexOffset); |
| 954 CHECK(initial_next()->IsJSFunction()); |
| 955 |
| 956 CHECK_LE(index(), array()->length()); |
| 957 } |
| 958 |
| 946 void Module::ModuleVerify() { | 959 void Module::ModuleVerify() { |
| 947 Isolate* isolate = GetIsolate(); | 960 Isolate* isolate = GetIsolate(); |
| 948 CHECK(IsModule()); | 961 CHECK(IsModule()); |
| 949 CHECK(code()->IsSharedFunctionInfo() || code()->IsJSFunction()); | 962 CHECK(code()->IsSharedFunctionInfo() || code()->IsJSFunction()); |
| 950 code()->ObjectVerify(); | 963 code()->ObjectVerify(); |
| 951 exports()->ObjectVerify(); | 964 exports()->ObjectVerify(); |
| 952 requested_modules()->ObjectVerify(); | 965 requested_modules()->ObjectVerify(); |
| 953 VerifySmiField(kFlagsOffset); | 966 VerifySmiField(kFlagsOffset); |
| 954 VerifySmiField(kHashOffset); | 967 VerifySmiField(kHashOffset); |
| 955 CHECK(module_namespace()->IsUndefined(isolate) || | 968 CHECK(module_namespace()->IsUndefined(isolate) || |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1388 | 1401 |
| 1389 // Both are done at the same time. | 1402 // Both are done at the same time. |
| 1390 CHECK_EQ(new_it.done(), old_it.done()); | 1403 CHECK_EQ(new_it.done(), old_it.done()); |
| 1391 } | 1404 } |
| 1392 | 1405 |
| 1393 | 1406 |
| 1394 #endif // DEBUG | 1407 #endif // DEBUG |
| 1395 | 1408 |
| 1396 } // namespace internal | 1409 } // namespace internal |
| 1397 } // namespace v8 | 1410 } // namespace v8 |
| OLD | NEW |