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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
145 break; | 145 break; |
146 case JS_MAP_TYPE: | 146 case JS_MAP_TYPE: |
147 JSMap::cast(this)->JSMapVerify(); | 147 JSMap::cast(this)->JSMapVerify(); |
148 break; | 148 break; |
149 case JS_SET_ITERATOR_TYPE: | 149 case JS_SET_ITERATOR_TYPE: |
150 JSSetIterator::cast(this)->JSSetIteratorVerify(); | 150 JSSetIterator::cast(this)->JSSetIteratorVerify(); |
151 break; | 151 break; |
152 case JS_MAP_ITERATOR_TYPE: | 152 case JS_MAP_ITERATOR_TYPE: |
153 JSMapIterator::cast(this)->JSMapIteratorVerify(); | 153 JSMapIterator::cast(this)->JSMapIteratorVerify(); |
154 break; | 154 break; |
155 case JS_STRING_ITERATOR_TYPE: | |
156 JSStringIterator::cast(this)->JSStringIteratorVerify(); | |
157 break; | |
155 case JS_WEAK_MAP_TYPE: | 158 case JS_WEAK_MAP_TYPE: |
156 JSWeakMap::cast(this)->JSWeakMapVerify(); | 159 JSWeakMap::cast(this)->JSWeakMapVerify(); |
157 break; | 160 break; |
158 case JS_WEAK_SET_TYPE: | 161 case JS_WEAK_SET_TYPE: |
159 JSWeakSet::cast(this)->JSWeakSetVerify(); | 162 JSWeakSet::cast(this)->JSWeakSetVerify(); |
160 break; | 163 break; |
161 case JS_REGEXP_TYPE: | 164 case JS_REGEXP_TYPE: |
162 JSRegExp::cast(this)->JSRegExpVerify(); | 165 JSRegExp::cast(this)->JSRegExpVerify(); |
163 break; | 166 break; |
164 case FILLER_TYPE: | 167 case FILLER_TYPE: |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
774 } | 777 } |
775 | 778 |
776 | 779 |
777 void JSWeakMap::JSWeakMapVerify() { | 780 void JSWeakMap::JSWeakMapVerify() { |
778 CHECK(IsJSWeakMap()); | 781 CHECK(IsJSWeakMap()); |
779 JSObjectVerify(); | 782 JSObjectVerify(); |
780 VerifyHeapPointer(table()); | 783 VerifyHeapPointer(table()); |
781 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); | 784 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); |
782 } | 785 } |
783 | 786 |
787 void JSStringIterator::JSStringIteratorVerify() { | |
788 CHECK(IsJSStringIterator()); | |
789 JSObjectVerify(); | |
790 CHECK(string()->IsString()); | |
791 CHECK(index_object()->IsSmi()); | |
Benedikt Meurer
2016/09/19 04:05:18
Replace this with:
CHECK_LE(0, index());
CHECK_LE
caitp
2016/09/19 16:03:05
Done.
| |
792 } | |
784 | 793 |
785 void JSWeakSet::JSWeakSetVerify() { | 794 void JSWeakSet::JSWeakSetVerify() { |
786 CHECK(IsJSWeakSet()); | 795 CHECK(IsJSWeakSet()); |
787 JSObjectVerify(); | 796 JSObjectVerify(); |
788 VerifyHeapPointer(table()); | 797 VerifyHeapPointer(table()); |
789 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); | 798 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); |
790 } | 799 } |
791 | 800 |
792 | 801 |
793 void JSRegExp::JSRegExpVerify() { | 802 void JSRegExp::JSRegExpVerify() { |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1336 | 1345 |
1337 // Both are done at the same time. | 1346 // Both are done at the same time. |
1338 CHECK_EQ(new_it.done(), old_it.done()); | 1347 CHECK_EQ(new_it.done(), old_it.done()); |
1339 } | 1348 } |
1340 | 1349 |
1341 | 1350 |
1342 #endif // DEBUG | 1351 #endif // DEBUG |
1343 | 1352 |
1344 } // namespace internal | 1353 } // namespace internal |
1345 } // namespace v8 | 1354 } // namespace v8 |
OLD | NEW |