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

Unified Diff: src/objects.h

Issue 13870007: Generators return boxed values (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Rebase; add needed write barrier 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.h
diff --git a/src/objects.h b/src/objects.h
index 4b5b51d9d90e2363c3542c877a5489f8ddb7203d..ca7c6a97145c25291eda93bf88ed0ae234f317cc 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -6421,6 +6421,12 @@ class JSGeneratorObject: public JSObject {
// Resume mode, for use by runtime functions.
enum ResumeMode { SEND, THROW };
+ // Yielding from a generator returns an object with the following inobject
+ // properties. See Context::iterator_result_map() for the map.
+ static const int kResultValuePropertyIndex = 0;
+ static const int kResultDonePropertyIndex = 1;
+ static const int kResultPropertyCount = 2;
+
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject);
};

Powered by Google App Engine
This is Rietveld 408576698