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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 break; | 143 break; |
144 case JS_MAP_TYPE: | 144 case JS_MAP_TYPE: |
145 JSMap::cast(this)->JSMapVerify(); | 145 JSMap::cast(this)->JSMapVerify(); |
146 break; | 146 break; |
147 case JS_SET_ITERATOR_TYPE: | 147 case JS_SET_ITERATOR_TYPE: |
148 JSSetIterator::cast(this)->JSSetIteratorVerify(); | 148 JSSetIterator::cast(this)->JSSetIteratorVerify(); |
149 break; | 149 break; |
150 case JS_MAP_ITERATOR_TYPE: | 150 case JS_MAP_ITERATOR_TYPE: |
151 JSMapIterator::cast(this)->JSMapIteratorVerify(); | 151 JSMapIterator::cast(this)->JSMapIteratorVerify(); |
152 break; | 152 break; |
153 case JS_ITERATOR_RESULT_TYPE: | |
154 JSIteratorResult::cast(this)->JSIteratorResultVerify(); | |
155 break; | |
156 case JS_WEAK_MAP_TYPE: | 153 case JS_WEAK_MAP_TYPE: |
157 JSWeakMap::cast(this)->JSWeakMapVerify(); | 154 JSWeakMap::cast(this)->JSWeakMapVerify(); |
158 break; | 155 break; |
159 case JS_WEAK_SET_TYPE: | 156 case JS_WEAK_SET_TYPE: |
160 JSWeakSet::cast(this)->JSWeakSetVerify(); | 157 JSWeakSet::cast(this)->JSWeakSetVerify(); |
161 break; | 158 break; |
162 case JS_REGEXP_TYPE: | 159 case JS_REGEXP_TYPE: |
163 JSRegExp::cast(this)->JSRegExpVerify(); | 160 JSRegExp::cast(this)->JSRegExpVerify(); |
164 break; | 161 break; |
165 case FILLER_TYPE: | 162 case FILLER_TYPE: |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 void JSMapIterator::JSMapIteratorVerify() { | 754 void JSMapIterator::JSMapIteratorVerify() { |
758 CHECK(IsJSMapIterator()); | 755 CHECK(IsJSMapIterator()); |
759 JSObjectVerify(); | 756 JSObjectVerify(); |
760 VerifyHeapPointer(table()); | 757 VerifyHeapPointer(table()); |
761 CHECK(table()->IsOrderedHashTable() || table()->IsUndefined()); | 758 CHECK(table()->IsOrderedHashTable() || table()->IsUndefined()); |
762 CHECK(index()->IsSmi() || index()->IsUndefined()); | 759 CHECK(index()->IsSmi() || index()->IsUndefined()); |
763 CHECK(kind()->IsSmi() || kind()->IsUndefined()); | 760 CHECK(kind()->IsSmi() || kind()->IsUndefined()); |
764 } | 761 } |
765 | 762 |
766 | 763 |
767 void JSIteratorResult::JSIteratorResultVerify() { | |
768 CHECK(IsJSIteratorResult()); | |
769 JSObjectVerify(); | |
770 VerifyPointer(done()); | |
771 VerifyPointer(value()); | |
772 } | |
773 | |
774 | |
775 void JSWeakMap::JSWeakMapVerify() { | 764 void JSWeakMap::JSWeakMapVerify() { |
776 CHECK(IsJSWeakMap()); | 765 CHECK(IsJSWeakMap()); |
777 JSObjectVerify(); | 766 JSObjectVerify(); |
778 VerifyHeapPointer(table()); | 767 VerifyHeapPointer(table()); |
779 CHECK(table()->IsHashTable() || table()->IsUndefined()); | 768 CHECK(table()->IsHashTable() || table()->IsUndefined()); |
780 } | 769 } |
781 | 770 |
782 | 771 |
783 void JSWeakSet::JSWeakSetVerify() { | 772 void JSWeakSet::JSWeakSetVerify() { |
784 CHECK(IsJSWeakSet()); | 773 CHECK(IsJSWeakSet()); |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 | 1319 |
1331 // Both are done at the same time. | 1320 // Both are done at the same time. |
1332 CHECK_EQ(new_it.done(), old_it.done()); | 1321 CHECK_EQ(new_it.done(), old_it.done()); |
1333 } | 1322 } |
1334 | 1323 |
1335 | 1324 |
1336 #endif // DEBUG | 1325 #endif // DEBUG |
1337 | 1326 |
1338 } // namespace internal | 1327 } // namespace internal |
1339 } // namespace v8 | 1328 } // namespace v8 |
OLD | NEW |