| 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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 } | 775 } |
| 773 | 776 |
| 774 | 777 |
| 775 void JSWeakMap::JSWeakMapVerify() { | 778 void JSWeakMap::JSWeakMapVerify() { |
| 776 CHECK(IsJSWeakMap()); | 779 CHECK(IsJSWeakMap()); |
| 777 JSObjectVerify(); | 780 JSObjectVerify(); |
| 778 VerifyHeapPointer(table()); | 781 VerifyHeapPointer(table()); |
| 779 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); | 782 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); |
| 780 } | 783 } |
| 781 | 784 |
| 785 void JSStringIterator::JSStringIteratorVerify() { |
| 786 CHECK(IsJSStringIterator()); |
| 787 JSObjectVerify(); |
| 788 CHECK(string()->IsString()); |
| 789 CHECK_GE(index(), 0); |
| 790 CHECK_LE(index(), String::kMaxLength); |
| 791 } |
| 782 | 792 |
| 783 void JSWeakSet::JSWeakSetVerify() { | 793 void JSWeakSet::JSWeakSetVerify() { |
| 784 CHECK(IsJSWeakSet()); | 794 CHECK(IsJSWeakSet()); |
| 785 JSObjectVerify(); | 795 JSObjectVerify(); |
| 786 VerifyHeapPointer(table()); | 796 VerifyHeapPointer(table()); |
| 787 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); | 797 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); |
| 788 } | 798 } |
| 789 | 799 |
| 790 | 800 |
| 791 void JSRegExp::JSRegExpVerify() { | 801 void JSRegExp::JSRegExpVerify() { |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1351 | 1361 |
| 1352 // Both are done at the same time. | 1362 // Both are done at the same time. |
| 1353 CHECK_EQ(new_it.done(), old_it.done()); | 1363 CHECK_EQ(new_it.done(), old_it.done()); |
| 1354 } | 1364 } |
| 1355 | 1365 |
| 1356 | 1366 |
| 1357 #endif // DEBUG | 1367 #endif // DEBUG |
| 1358 | 1368 |
| 1359 } // namespace internal | 1369 } // namespace internal |
| 1360 } // namespace v8 | 1370 } // namespace v8 |
| OLD | NEW |