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/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 break; | 136 break; |
137 case JS_MAP_TYPE: | 137 case JS_MAP_TYPE: |
138 JSMap::cast(this)->JSMapVerify(); | 138 JSMap::cast(this)->JSMapVerify(); |
139 break; | 139 break; |
140 case JS_SET_ITERATOR_TYPE: | 140 case JS_SET_ITERATOR_TYPE: |
141 JSSetIterator::cast(this)->JSSetIteratorVerify(); | 141 JSSetIterator::cast(this)->JSSetIteratorVerify(); |
142 break; | 142 break; |
143 case JS_MAP_ITERATOR_TYPE: | 143 case JS_MAP_ITERATOR_TYPE: |
144 JSMapIterator::cast(this)->JSMapIteratorVerify(); | 144 JSMapIterator::cast(this)->JSMapIteratorVerify(); |
145 break; | 145 break; |
| 146 case JS_ITERATOR_RESULT_TYPE: |
| 147 JSIteratorResult::cast(this)->JSIteratorResultVerify(); |
| 148 break; |
146 case JS_WEAK_MAP_TYPE: | 149 case JS_WEAK_MAP_TYPE: |
147 JSWeakMap::cast(this)->JSWeakMapVerify(); | 150 JSWeakMap::cast(this)->JSWeakMapVerify(); |
148 break; | 151 break; |
149 case JS_WEAK_SET_TYPE: | 152 case JS_WEAK_SET_TYPE: |
150 JSWeakSet::cast(this)->JSWeakSetVerify(); | 153 JSWeakSet::cast(this)->JSWeakSetVerify(); |
151 break; | 154 break; |
152 case JS_REGEXP_TYPE: | 155 case JS_REGEXP_TYPE: |
153 JSRegExp::cast(this)->JSRegExpVerify(); | 156 JSRegExp::cast(this)->JSRegExpVerify(); |
154 break; | 157 break; |
155 case FILLER_TYPE: | 158 case FILLER_TYPE: |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 void JSMapIterator::JSMapIteratorVerify() { | 735 void JSMapIterator::JSMapIteratorVerify() { |
733 CHECK(IsJSMapIterator()); | 736 CHECK(IsJSMapIterator()); |
734 JSObjectVerify(); | 737 JSObjectVerify(); |
735 VerifyHeapPointer(table()); | 738 VerifyHeapPointer(table()); |
736 CHECK(table()->IsOrderedHashTable() || table()->IsUndefined()); | 739 CHECK(table()->IsOrderedHashTable() || table()->IsUndefined()); |
737 CHECK(index()->IsSmi() || index()->IsUndefined()); | 740 CHECK(index()->IsSmi() || index()->IsUndefined()); |
738 CHECK(kind()->IsSmi() || kind()->IsUndefined()); | 741 CHECK(kind()->IsSmi() || kind()->IsUndefined()); |
739 } | 742 } |
740 | 743 |
741 | 744 |
| 745 void JSIteratorResult::JSIteratorResultVerify() { |
| 746 CHECK(IsJSIteratorResult()); |
| 747 JSObjectVerify(); |
| 748 VerifyPointer(done()); |
| 749 VerifyPointer(value()); |
| 750 } |
| 751 |
| 752 |
742 void JSWeakMap::JSWeakMapVerify() { | 753 void JSWeakMap::JSWeakMapVerify() { |
743 CHECK(IsJSWeakMap()); | 754 CHECK(IsJSWeakMap()); |
744 JSObjectVerify(); | 755 JSObjectVerify(); |
745 VerifyHeapPointer(table()); | 756 VerifyHeapPointer(table()); |
746 CHECK(table()->IsHashTable() || table()->IsUndefined()); | 757 CHECK(table()->IsHashTable() || table()->IsUndefined()); |
747 } | 758 } |
748 | 759 |
749 | 760 |
750 void JSWeakSet::JSWeakSetVerify() { | 761 void JSWeakSet::JSWeakSetVerify() { |
751 CHECK(IsJSWeakSet()); | 762 CHECK(IsJSWeakSet()); |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1315 | 1326 |
1316 // Both are done at the same time. | 1327 // Both are done at the same time. |
1317 CHECK_EQ(new_it.done(), old_it.done()); | 1328 CHECK_EQ(new_it.done(), old_it.done()); |
1318 } | 1329 } |
1319 | 1330 |
1320 | 1331 |
1321 #endif // DEBUG | 1332 #endif // DEBUG |
1322 | 1333 |
1323 } // namespace internal | 1334 } // namespace internal |
1324 } // namespace v8 | 1335 } // namespace v8 |
OLD | NEW |