| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index fae20831746354eda611664a88b04013497a7224..d20eba58fc91117e4bac2bd39898905b1c25cd3c 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -62,6 +62,7 @@
|
| // - JSWeakMap
|
| // - JSRegExp
|
| // - JSFunction
|
| +// - JSGeneratorObject
|
| // - JSModule
|
| // - GlobalObject
|
| // - JSGlobalObject
|
| @@ -395,6 +396,7 @@ const int kStubMinorKeyBits = kBitsPerInt - kSmiTagSize - kStubMajorKeyBits;
|
| V(JS_DATE_TYPE) \
|
| V(JS_OBJECT_TYPE) \
|
| V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \
|
| + V(JS_GENERATOR_OBJECT_TYPE) \
|
| V(JS_MODULE_TYPE) \
|
| V(JS_GLOBAL_OBJECT_TYPE) \
|
| V(JS_BUILTINS_OBJECT_TYPE) \
|
| @@ -726,6 +728,7 @@ enum InstanceType {
|
| JS_DATE_TYPE,
|
| JS_OBJECT_TYPE,
|
| JS_CONTEXT_EXTENSION_OBJECT_TYPE,
|
| + JS_GENERATOR_OBJECT_TYPE,
|
| JS_MODULE_TYPE,
|
| JS_GLOBAL_OBJECT_TYPE,
|
| JS_BUILTINS_OBJECT_TYPE,
|
| @@ -953,13 +956,14 @@ class MaybeObject BASE_EMBEDDED {
|
| V(JSReceiver) \
|
| V(JSObject) \
|
| V(JSContextExtensionObject) \
|
| + V(JSGeneratorObject) \
|
| V(JSModule) \
|
| V(Map) \
|
| V(DescriptorArray) \
|
| V(TransitionArray) \
|
| V(DeoptimizationInputData) \
|
| V(DeoptimizationOutputData) \
|
| - V(DependentCode) \
|
| + V(DependentCode) \
|
| V(TypeFeedbackCells) \
|
| V(FixedArray) \
|
| V(FixedDoubleArray) \
|
| @@ -6255,6 +6259,40 @@ class SharedFunctionInfo: public HeapObject {
|
| };
|
|
|
|
|
| +class JSGeneratorObject: public JSObject {
|
| + public:
|
| + // [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)
|
| +
|
| + // [continuation]: Offset into code of continuation.
|
| + inline int continuation();
|
| + inline void set_continuation(int continuation);
|
| +
|
| + // [operands]: Saved operand stack.
|
| + DECL_ACCESSORS(operand_stack, FixedArray)
|
| +
|
| + // Casting.
|
| + static inline JSGeneratorObject* cast(Object* obj);
|
| +
|
| + // Dispatched behavior.
|
| + DECLARE_PRINTER(JSGeneratorObject)
|
| + DECLARE_VERIFIER(JSGeneratorObject)
|
| +
|
| + // Layout description.
|
| + static const int kFunctionOffset = JSObject::kHeaderSize;
|
| + static const int kContextOffset = kFunctionOffset + kPointerSize;
|
| + static const int kContinuationOffset = kContextOffset + kPointerSize;
|
| + static const int kOperandStackOffset = kContinuationOffset + kPointerSize;
|
| + static const int kSize = kOperandStackOffset + kPointerSize;
|
| +
|
| + private:
|
| + DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject);
|
| +};
|
| +
|
| +
|
| // Representation for module instance objects.
|
| class JSModule: public JSObject {
|
| public:
|
|
|