Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index d20eba58fc91117e4bac2bd39898905b1c25cd3c..4bc2009d0a372c3b229ef8b27fe8414eba69cfb7 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -6264,10 +6264,14 @@ class JSGeneratorObject: public JSObject { |
// [function]: The function corresponding to this generator object. |
DECL_ACCESSORS(function, JSFunction) |
- // [context]: The context of the suspended computation, or undefined. |
- DECL_ACCESSORS(context, Object) |
+ // [context]: The context of the suspended computation. |
+ DECL_ACCESSORS(context, Context) |
// [continuation]: Offset into code of continuation. |
+ // |
+ // A positive offset indicates a suspended generator. The special |
+ // kGeneratorExecuting and kGeneratorClosed values indicate that a generator |
+ // cannot be resumed. |
inline int continuation(); |
inline void set_continuation(int continuation); |
@@ -6281,6 +6285,10 @@ class JSGeneratorObject: public JSObject { |
DECLARE_PRINTER(JSGeneratorObject) |
DECLARE_VERIFIER(JSGeneratorObject) |
+ // Magic sentinel values for the continuation. |
+ static const int kGeneratorExecuting = -1; |
+ static const int kGeneratorClosed = 0; |
+ |
// Layout description. |
static const int kFunctionOffset = JSObject::kHeaderSize; |
static const int kContextOffset = kFunctionOffset + kPointerSize; |