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

Unified Diff: src/objects.h

Issue 1867263002: [generators] Store the resume mode in the generator object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Other platforms Created 4 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
« no previous file with comments | « src/mips64/builtins-mips64.cc ('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.h
diff --git a/src/objects.h b/src/objects.h
index cccbbe2896b1f6de3aa77e491735b77c200c439c..e3cb08bbc47689508f96185e4729dd83531b2ab7 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -7313,6 +7313,10 @@ class JSGeneratorObject: public JSObject {
// [input]: The most recent input value.
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.
//
// A positive offset indicates a suspended generator. The special
@@ -7342,13 +7346,11 @@ class JSGeneratorObject: public JSObject {
static const int kContextOffset = kFunctionOffset + kPointerSize;
static const int kReceiverOffset = kContextOffset + kPointerSize;
static const int kInputOffset = kReceiverOffset + kPointerSize;
- static const int kContinuationOffset = kInputOffset + kPointerSize;
+ static const int kResumeModeOffset = kInputOffset + kPointerSize;
+ static const int kContinuationOffset = kResumeModeOffset + kPointerSize;
static const int kOperandStackOffset = kContinuationOffset + kPointerSize;
static const int kSize = kOperandStackOffset + kPointerSize;
- // Resume mode, for use by runtime functions.
- enum ResumeMode { kNext, kReturn, kThrow };
-
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject);
};
« no previous file with comments | « src/mips64/builtins-mips64.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698