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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 case JS_FAST_HOLEY_SMI_ARRAY_VALUE_ITERATOR_TYPE: | 187 case JS_FAST_HOLEY_SMI_ARRAY_VALUE_ITERATOR_TYPE: |
188 case JS_FAST_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE: | 188 case JS_FAST_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE: |
189 case JS_FAST_HOLEY_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE: | 189 case JS_FAST_HOLEY_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE: |
190 case JS_GENERIC_ARRAY_VALUE_ITERATOR_TYPE: | 190 case JS_GENERIC_ARRAY_VALUE_ITERATOR_TYPE: |
191 JSArrayIterator::cast(this)->JSArrayIteratorVerify(); | 191 JSArrayIterator::cast(this)->JSArrayIteratorVerify(); |
192 break; | 192 break; |
193 | 193 |
194 case JS_STRING_ITERATOR_TYPE: | 194 case JS_STRING_ITERATOR_TYPE: |
195 JSStringIterator::cast(this)->JSStringIteratorVerify(); | 195 JSStringIterator::cast(this)->JSStringIteratorVerify(); |
196 break; | 196 break; |
| 197 case JS_ASYNC_FROM_SYNC_ITERATOR_TYPE: |
| 198 JSAsyncFromSyncIterator::cast(this)->JSAsyncFromSyncIteratorVerify(); |
| 199 break; |
197 case JS_WEAK_MAP_TYPE: | 200 case JS_WEAK_MAP_TYPE: |
198 JSWeakMap::cast(this)->JSWeakMapVerify(); | 201 JSWeakMap::cast(this)->JSWeakMapVerify(); |
199 break; | 202 break; |
200 case JS_WEAK_SET_TYPE: | 203 case JS_WEAK_SET_TYPE: |
201 JSWeakSet::cast(this)->JSWeakSetVerify(); | 204 JSWeakSet::cast(this)->JSWeakSetVerify(); |
202 break; | 205 break; |
203 case JS_PROMISE_CAPABILITY_TYPE: | 206 case JS_PROMISE_CAPABILITY_TYPE: |
204 JSPromiseCapability::cast(this)->JSPromiseCapabilityVerify(); | 207 JSPromiseCapability::cast(this)->JSPromiseCapabilityVerify(); |
205 break; | 208 break; |
206 case JS_PROMISE_TYPE: | 209 case JS_PROMISE_TYPE: |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 | 880 |
878 void JSStringIterator::JSStringIteratorVerify() { | 881 void JSStringIterator::JSStringIteratorVerify() { |
879 CHECK(IsJSStringIterator()); | 882 CHECK(IsJSStringIterator()); |
880 JSObjectVerify(); | 883 JSObjectVerify(); |
881 CHECK(string()->IsString()); | 884 CHECK(string()->IsString()); |
882 | 885 |
883 CHECK_GE(index(), 0); | 886 CHECK_GE(index(), 0); |
884 CHECK_LE(index(), String::kMaxLength); | 887 CHECK_LE(index(), String::kMaxLength); |
885 } | 888 } |
886 | 889 |
| 890 void JSAsyncFromSyncIterator::JSAsyncFromSyncIteratorVerify() { |
| 891 CHECK(IsJSAsyncFromSyncIterator()); |
| 892 JSObjectVerify(); |
| 893 VerifyHeapPointer(sync_iterator()); |
| 894 } |
| 895 |
887 void JSWeakSet::JSWeakSetVerify() { | 896 void JSWeakSet::JSWeakSetVerify() { |
888 CHECK(IsJSWeakSet()); | 897 CHECK(IsJSWeakSet()); |
889 JSObjectVerify(); | 898 JSObjectVerify(); |
890 VerifyHeapPointer(table()); | 899 VerifyHeapPointer(table()); |
891 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); | 900 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); |
892 } | 901 } |
893 | 902 |
894 void JSPromiseCapability::JSPromiseCapabilityVerify() { | 903 void JSPromiseCapability::JSPromiseCapabilityVerify() { |
895 CHECK(IsJSPromiseCapability()); | 904 CHECK(IsJSPromiseCapability()); |
896 JSObjectVerify(); | 905 JSObjectVerify(); |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1552 | 1561 |
1553 // Both are done at the same time. | 1562 // Both are done at the same time. |
1554 CHECK_EQ(new_it.done(), old_it.done()); | 1563 CHECK_EQ(new_it.done(), old_it.done()); |
1555 } | 1564 } |
1556 | 1565 |
1557 | 1566 |
1558 #endif // DEBUG | 1567 #endif // DEBUG |
1559 | 1568 |
1560 } // namespace internal | 1569 } // namespace internal |
1561 } // namespace v8 | 1570 } // namespace v8 |
OLD | NEW |