Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index a7aabe23e0f856b18734e09f3fe4f40c7b4b508d..0e00d0d1c4c352bf973de60efef21bf7a576ff9b 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -7363,23 +7363,29 @@ class JSGeneratorObject: public JSObject { |
// [receiver]: The receiver of the suspended computation. |
DECL_ACCESSORS(receiver, Object) |
- // [input]: The most recent input value. |
+ // [input]: For active generators: the most recent input value. |
+ // (For suspended new-style generators, we abuse this field to store debug |
+ // information.) |
DECL_ACCESSORS(input, Object) |
// [resume_mode]: The most recent resume mode. |
enum ResumeMode { kNext, kReturn, kThrow }; |
DECL_INT_ACCESSORS(resume_mode) |
- // [continuation]: Offset into code of continuation. |
+ // [continuation] |
// |
- // A positive offset indicates a suspended generator. The special |
+ // A positive value indicates a suspended generator. The special |
// kGeneratorExecuting and kGeneratorClosed values indicate that a generator |
// cannot be resumed. |
inline int continuation() const; |
inline void set_continuation(int continuation); |
- inline bool is_closed(); |
- inline bool is_executing(); |
- inline bool is_suspended(); |
+ inline bool is_closed() const; |
+ inline bool is_executing() const; |
+ inline bool is_suspended() const; |
+ |
+ // For suspended generators: the source position at which the generator |
+ // is suspended. |
+ int source_position() const; |
// [operand_stack]: Saved operand stack. |
DECL_ACCESSORS(operand_stack, FixedArray) |