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

Unified Diff: src/objects-debug.cc

Issue 2622833002: WIP [esnext] implement async iteration proposal (Closed)
Patch Set: simplify AsyncIteratorValueUnwrap 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-body-descriptors-inl.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index f770533a1b8f5e09da39d87776bc23d914a09414..d213d7b051e78bce173957babca472ac56e1b675 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -109,6 +109,9 @@ void HeapObject::HeapObjectVerify() {
case JS_GENERATOR_OBJECT_TYPE:
JSGeneratorObject::cast(this)->JSGeneratorObjectVerify();
break;
+ case JS_ASYNC_GENERATOR_OBJECT_TYPE:
+ JSAsyncGeneratorObject::cast(this)->JSAsyncGeneratorObjectVerify();
+ break;
case JS_VALUE_TYPE:
JSValue::cast(this)->JSValueVerify();
break;
@@ -233,6 +236,9 @@ void HeapObject::HeapObjectVerify() {
case JS_DATA_VIEW_TYPE:
JSDataView::cast(this)->JSDataViewVerify();
break;
+ case JS_ASYNC_FROM_SYNC_ITERATOR_TYPE:
+ JSAsyncFromSyncIterator::cast(this)->JSAsyncFromSyncIteratorVerify();
+ break;
#define MAKE_STRUCT_CASE(NAME, Name, name) \
case NAME##_TYPE: \
@@ -477,6 +483,12 @@ void JSGeneratorObject::JSGeneratorObjectVerify() {
VerifyObjectField(kContinuationOffset);
}
+void JSAsyncGeneratorObject::JSAsyncGeneratorObjectVerify() {
+ // Check inherited fields
+ JSGeneratorObjectVerify();
+ VerifyObjectField(kQueueOffset);
+ queue()->HeapObjectVerify();
+}
void JSValue::JSValueVerify() {
Object* v = value();
@@ -1064,6 +1076,17 @@ void PromiseReactionJobInfo::PromiseReactionJobInfoVerify() {
CHECK(context()->IsContext());
}
+void AsyncGeneratorRequest::AsyncGeneratorRequestVerify() {
+ CHECK(IsAsyncGeneratorRequest());
+ VerifySmiField(kResumeModeOffset);
+ CHECK_GE(resume_mode(), JSGeneratorObject::kNext);
+ CHECK_LE(resume_mode(), JSGeneratorObject::kThrow);
+ CHECK(promise()->IsJSPromise());
+ VerifyPointer(value());
+ VerifyPointer(next());
+ next()->ObjectVerify();
+}
+
void JSModuleNamespace::JSModuleNamespaceVerify() {
CHECK(IsJSModuleNamespace());
VerifyPointer(module());
@@ -1273,6 +1296,12 @@ void BreakPointInfo::BreakPointInfoVerify() {
CHECK(IsBreakPointInfo());
VerifyPointer(break_point_objects());
}
+
+void JSAsyncFromSyncIterator::JSAsyncFromSyncIteratorVerify() {
+ CHECK(IsJSAsyncFromSyncIterator());
+ VerifyHeapPointer(sync_iterator());
+ sync_iterator()->HeapObjectVerify();
+}
#endif // VERIFY_HEAP
#ifdef DEBUG
« no previous file with comments | « src/objects-body-descriptors-inl.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698