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

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

Issue 2645313003: [async-iteration] implement Async-from-Sync Iterator (Closed)
Patch Set: attempt #3 to fix merge conflicts Created 3 years, 11 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 case JS_FAST_HOLEY_SMI_ARRAY_VALUE_ITERATOR_TYPE: 190 case JS_FAST_HOLEY_SMI_ARRAY_VALUE_ITERATOR_TYPE:
191 case JS_FAST_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE: 191 case JS_FAST_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE:
192 case JS_FAST_HOLEY_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE: 192 case JS_FAST_HOLEY_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE:
193 case JS_GENERIC_ARRAY_VALUE_ITERATOR_TYPE: 193 case JS_GENERIC_ARRAY_VALUE_ITERATOR_TYPE:
194 JSArrayIterator::cast(this)->JSArrayIteratorVerify(); 194 JSArrayIterator::cast(this)->JSArrayIteratorVerify();
195 break; 195 break;
196 196
197 case JS_STRING_ITERATOR_TYPE: 197 case JS_STRING_ITERATOR_TYPE:
198 JSStringIterator::cast(this)->JSStringIteratorVerify(); 198 JSStringIterator::cast(this)->JSStringIteratorVerify();
199 break; 199 break;
200 case JS_ASYNC_FROM_SYNC_ITERATOR_TYPE:
201 JSAsyncFromSyncIterator::cast(this)->JSAsyncFromSyncIteratorVerify();
202 break;
200 case JS_WEAK_MAP_TYPE: 203 case JS_WEAK_MAP_TYPE:
201 JSWeakMap::cast(this)->JSWeakMapVerify(); 204 JSWeakMap::cast(this)->JSWeakMapVerify();
202 break; 205 break;
203 case JS_WEAK_SET_TYPE: 206 case JS_WEAK_SET_TYPE:
204 JSWeakSet::cast(this)->JSWeakSetVerify(); 207 JSWeakSet::cast(this)->JSWeakSetVerify();
205 break; 208 break;
206 case JS_PROMISE_CAPABILITY_TYPE: 209 case JS_PROMISE_CAPABILITY_TYPE:
207 JSPromiseCapability::cast(this)->JSPromiseCapabilityVerify(); 210 JSPromiseCapability::cast(this)->JSPromiseCapabilityVerify();
208 break; 211 break;
209 case JS_PROMISE_TYPE: 212 case JS_PROMISE_TYPE:
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 886
884 void JSStringIterator::JSStringIteratorVerify() { 887 void JSStringIterator::JSStringIteratorVerify() {
885 CHECK(IsJSStringIterator()); 888 CHECK(IsJSStringIterator());
886 JSObjectVerify(); 889 JSObjectVerify();
887 CHECK(string()->IsString()); 890 CHECK(string()->IsString());
888 891
889 CHECK_GE(index(), 0); 892 CHECK_GE(index(), 0);
890 CHECK_LE(index(), String::kMaxLength); 893 CHECK_LE(index(), String::kMaxLength);
891 } 894 }
892 895
896 void JSAsyncFromSyncIterator::JSAsyncFromSyncIteratorVerify() {
897 CHECK(IsJSAsyncFromSyncIterator());
898 JSObjectVerify();
899 VerifyHeapPointer(sync_iterator());
900 }
901
893 void JSWeakSet::JSWeakSetVerify() { 902 void JSWeakSet::JSWeakSetVerify() {
894 CHECK(IsJSWeakSet()); 903 CHECK(IsJSWeakSet());
895 JSObjectVerify(); 904 JSObjectVerify();
896 VerifyHeapPointer(table()); 905 VerifyHeapPointer(table());
897 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); 906 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate()));
898 } 907 }
899 908
900 void JSPromiseCapability::JSPromiseCapabilityVerify() { 909 void JSPromiseCapability::JSPromiseCapabilityVerify() {
901 CHECK(IsJSPromiseCapability()); 910 CHECK(IsJSPromiseCapability());
902 JSObjectVerify(); 911 JSObjectVerify();
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 1572
1564 // Both are done at the same time. 1573 // Both are done at the same time.
1565 CHECK_EQ(new_it.done(), old_it.done()); 1574 CHECK_EQ(new_it.done(), old_it.done());
1566 } 1575 }
1567 1576
1568 1577
1569 #endif // DEBUG 1578 #endif // DEBUG
1570 1579
1571 } // namespace internal 1580 } // namespace internal
1572 } // namespace v8 1581 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698