| 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/assembler-inl.h" | 7 #include "src/assembler-inl.h" |
| 8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
| 9 #include "src/disasm.h" | 9 #include "src/disasm.h" |
| 10 #include "src/disassembler.h" | 10 #include "src/disassembler.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 case JS_FAST_HOLEY_SMI_ARRAY_VALUE_ITERATOR_TYPE: | 193 case JS_FAST_HOLEY_SMI_ARRAY_VALUE_ITERATOR_TYPE: |
| 194 case JS_FAST_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE: | 194 case JS_FAST_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE: |
| 195 case JS_FAST_HOLEY_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE: | 195 case JS_FAST_HOLEY_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE: |
| 196 case JS_GENERIC_ARRAY_VALUE_ITERATOR_TYPE: | 196 case JS_GENERIC_ARRAY_VALUE_ITERATOR_TYPE: |
| 197 JSArrayIterator::cast(this)->JSArrayIteratorVerify(); | 197 JSArrayIterator::cast(this)->JSArrayIteratorVerify(); |
| 198 break; | 198 break; |
| 199 | 199 |
| 200 case JS_STRING_ITERATOR_TYPE: | 200 case JS_STRING_ITERATOR_TYPE: |
| 201 JSStringIterator::cast(this)->JSStringIteratorVerify(); | 201 JSStringIterator::cast(this)->JSStringIteratorVerify(); |
| 202 break; | 202 break; |
| 203 case JS_ASYNC_FROM_SYNC_ITERATOR_TYPE: |
| 204 JSAsyncFromSyncIterator::cast(this)->JSAsyncFromSyncIteratorVerify(); |
| 205 break; |
| 203 case JS_WEAK_MAP_TYPE: | 206 case JS_WEAK_MAP_TYPE: |
| 204 JSWeakMap::cast(this)->JSWeakMapVerify(); | 207 JSWeakMap::cast(this)->JSWeakMapVerify(); |
| 205 break; | 208 break; |
| 206 case JS_WEAK_SET_TYPE: | 209 case JS_WEAK_SET_TYPE: |
| 207 JSWeakSet::cast(this)->JSWeakSetVerify(); | 210 JSWeakSet::cast(this)->JSWeakSetVerify(); |
| 208 break; | 211 break; |
| 209 case JS_PROMISE_CAPABILITY_TYPE: | 212 case JS_PROMISE_CAPABILITY_TYPE: |
| 210 JSPromiseCapability::cast(this)->JSPromiseCapabilityVerify(); | 213 JSPromiseCapability::cast(this)->JSPromiseCapabilityVerify(); |
| 211 break; | 214 break; |
| 212 case JS_PROMISE_TYPE: | 215 case JS_PROMISE_TYPE: |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 | 886 |
| 884 void JSStringIterator::JSStringIteratorVerify() { | 887 void JSStringIterator::JSStringIteratorVerify() { |
| 885 CHECK(IsJSStringIterator()); | 888 CHECK(IsJSStringIterator()); |
| 886 JSObjectVerify(); | 889 JSObjectVerify(); |
| 887 CHECK(string()->IsString()); | 890 CHECK(string()->IsString()); |
| 888 | 891 |
| 889 CHECK_GE(index(), 0); | 892 CHECK_GE(index(), 0); |
| 890 CHECK_LE(index(), String::kMaxLength); | 893 CHECK_LE(index(), String::kMaxLength); |
| 891 } | 894 } |
| 892 | 895 |
| 896 void JSAsyncFromSyncIterator::JSAsyncFromSyncIteratorVerify() { |
| 897 CHECK(IsJSAsyncFromSyncIterator()); |
| 898 JSObjectVerify(); |
| 899 VerifyHeapPointer(sync_iterator()); |
| 900 } |
| 901 |
| 893 void JSWeakSet::JSWeakSetVerify() { | 902 void JSWeakSet::JSWeakSetVerify() { |
| 894 CHECK(IsJSWeakSet()); | 903 CHECK(IsJSWeakSet()); |
| 895 JSObjectVerify(); | 904 JSObjectVerify(); |
| 896 VerifyHeapPointer(table()); | 905 VerifyHeapPointer(table()); |
| 897 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); | 906 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); |
| 898 } | 907 } |
| 899 | 908 |
| 900 void JSPromiseCapability::JSPromiseCapabilityVerify() { | 909 void JSPromiseCapability::JSPromiseCapabilityVerify() { |
| 901 CHECK(IsJSPromiseCapability()); | 910 CHECK(IsJSPromiseCapability()); |
| 902 JSObjectVerify(); | 911 JSObjectVerify(); |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1558 | 1567 |
| 1559 // Both are done at the same time. | 1568 // Both are done at the same time. |
| 1560 CHECK_EQ(new_it.done(), old_it.done()); | 1569 CHECK_EQ(new_it.done(), old_it.done()); |
| 1561 } | 1570 } |
| 1562 | 1571 |
| 1563 | 1572 |
| 1564 #endif // DEBUG | 1573 #endif // DEBUG |
| 1565 | 1574 |
| 1566 } // namespace internal | 1575 } // namespace internal |
| 1567 } // namespace v8 | 1576 } // namespace v8 |
| OLD | NEW |