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

Unified Diff: src/objects-debug.cc

Issue 13542002: Calling a generator function returns a generator object (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Rebased to apply to bleeding_edge Created 7 years, 8 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
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 44cab53cc7ae90696e7c34929084e0e6e1e318bd..c7f3d28b4286a67030ad9a1b4de0de73e7e6ef72 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -139,6 +139,9 @@ void HeapObject::HeapObjectVerify() {
case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
JSObject::cast(this)->JSObjectVerify();
break;
+ case JS_GENERATOR_OBJECT_TYPE:
+ JSGeneratorObject::cast(this)->JSGeneratorObjectVerify();
+ break;
case JS_MODULE_TYPE:
JSModule::cast(this)->JSModuleVerify();
break;
@@ -404,6 +407,17 @@ void FixedDoubleArray::FixedDoubleArrayVerify() {
}
+void JSGeneratorObject::JSGeneratorObjectVerify() {
+ VerifyObjectField(kFunctionOffset);
+ VerifyObjectField(kContextOffset);
+ CHECK(context() == Smi::FromInt(0) || context()->IsContext());
+ VerifySmiField(kContinuationOffset);
+ CHECK_GE(continuation(), 0);
+ VerifyObjectField(kOperandStackOffset);
+ CHECK(operand_stack() == Smi::FromInt(0) || operand_stack()->IsFixedArray());
+}
+
+
void JSModule::JSModuleVerify() {
VerifyObjectField(kContextOffset);
VerifyObjectField(kScopeInfoOffset);

Powered by Google App Engine
This is Rietveld 408576698