Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: src/objects-debug.cc

Issue 2645313003: [async-iteration] implement Async-from-Sync Iterator (Closed)
Patch Set: rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 1566
1558 // Both are done at the same time. 1567 // Both are done at the same time.
1559 CHECK_EQ(new_it.done(), old_it.done()); 1568 CHECK_EQ(new_it.done(), old_it.done());
1560 } 1569 }
1561 1570
1562 1571
1563 #endif // DEBUG 1572 #endif // DEBUG
1564 1573
1565 } // namespace internal 1574 } // namespace internal
1566 } // namespace v8 1575 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698