Commit 81756480 authored by Marja Hölttä's avatar Marja Hölttä Committed by Commit Bot

[objects.h splitting] Move AsyncGeneratorRequest

BUG=v8:5402,v8:8238

Change-Id: I988b1e0b7a958d06690820632bc533d9e5338535
Reviewed-on: https://chromium-review.googlesource.com/c/1349190Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57776}
parent cfb1da53
...@@ -30,6 +30,7 @@ namespace internal { ...@@ -30,6 +30,7 @@ namespace internal {
// Forward declarations. // Forward declarations.
class AsmWasmData; class AsmWasmData;
class AsyncGeneratorRequest;
class CallInterfaceDescriptor; class CallInterfaceDescriptor;
class Callable; class Callable;
class Factory; class Factory;
......
...@@ -532,7 +532,6 @@ StringSet::StringSet(Address ptr) : HashTable<StringSet, StringSetShape>(ptr) { ...@@ -532,7 +532,6 @@ StringSet::StringSet(Address ptr) : HashTable<StringSet, StringSetShape>(ptr) {
// Cast operations // Cast operations
CAST_ACCESSOR(AccessorPair) CAST_ACCESSOR(AccessorPair)
CAST_ACCESSOR(AsyncGeneratorRequest)
CAST_ACCESSOR(BigInt) CAST_ACCESSOR(BigInt)
CAST_ACCESSOR(ObjectBoilerplateDescription) CAST_ACCESSOR(ObjectBoilerplateDescription)
CAST_ACCESSOR(Cell) CAST_ACCESSOR(Cell)
...@@ -1641,12 +1640,6 @@ int HeapObject::SizeFromMap(Map map) const { ...@@ -1641,12 +1640,6 @@ int HeapObject::SizeFromMap(Map map) const {
EmbedderDataArray::unchecked_cast(this)->length()); EmbedderDataArray::unchecked_cast(this)->length());
} }
ACCESSORS(AsyncGeneratorRequest, next, Object, kNextOffset)
SMI_ACCESSORS(AsyncGeneratorRequest, resume_mode, kResumeModeOffset)
ACCESSORS(AsyncGeneratorRequest, value, Object, kValueOffset)
ACCESSORS(AsyncGeneratorRequest, promise, Object, kPromiseOffset)
ACCESSORS(Tuple2, value1, Object, kValue1Offset) ACCESSORS(Tuple2, value1, Object, kValue1Offset)
ACCESSORS(Tuple2, value2, Object, kValue2Offset) ACCESSORS(Tuple2, value2, Object, kValue2Offset)
ACCESSORS(Tuple3, value3, Object, kValue3Offset) ACCESSORS(Tuple3, value3, Object, kValue3Offset)
......
...@@ -1954,28 +1954,6 @@ class Tuple3 : public Tuple2 { ...@@ -1954,28 +1954,6 @@ class Tuple3 : public Tuple2 {
DISALLOW_IMPLICIT_CONSTRUCTORS(Tuple3); DISALLOW_IMPLICIT_CONSTRUCTORS(Tuple3);
}; };
class AsyncGeneratorRequest : public Struct {
public:
// Holds an AsyncGeneratorRequest, or Undefined.
DECL_ACCESSORS(next, Object)
DECL_INT_ACCESSORS(resume_mode)
DECL_ACCESSORS(value, Object)
DECL_ACCESSORS(promise, Object)
static const int kNextOffset = Struct::kHeaderSize;
static const int kResumeModeOffset = kNextOffset + kPointerSize;
static const int kValueOffset = kResumeModeOffset + kPointerSize;
static const int kPromiseOffset = kValueOffset + kPointerSize;
static const int kSize = kPromiseOffset + kPointerSize;
DECL_CAST(AsyncGeneratorRequest)
DECL_PRINTER(AsyncGeneratorRequest)
DECL_VERIFIER(AsyncGeneratorRequest)
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(AsyncGeneratorRequest);
};
// Utility superclass for stack-allocated objects that must be updated // Utility superclass for stack-allocated objects that must be updated
// on gc. It provides two ways for the gc to update instances, either // on gc. It provides two ways for the gc to update instances, either
// iterating or updating after gc. // iterating or updating after gc.
......
...@@ -19,6 +19,7 @@ namespace internal { ...@@ -19,6 +19,7 @@ namespace internal {
CAST_ACCESSOR(JSAsyncFunctionObject) CAST_ACCESSOR(JSAsyncFunctionObject)
CAST_ACCESSOR(JSAsyncGeneratorObject) CAST_ACCESSOR(JSAsyncGeneratorObject)
CAST_ACCESSOR(JSGeneratorObject) CAST_ACCESSOR(JSGeneratorObject)
CAST_ACCESSOR(AsyncGeneratorRequest)
ACCESSORS(JSGeneratorObject, function, JSFunction, kFunctionOffset) ACCESSORS(JSGeneratorObject, function, JSFunction, kFunctionOffset)
ACCESSORS2(JSGeneratorObject, context, Context, kContextOffset) ACCESSORS2(JSGeneratorObject, context, Context, kContextOffset)
...@@ -29,6 +30,11 @@ SMI_ACCESSORS(JSGeneratorObject, continuation, kContinuationOffset) ...@@ -29,6 +30,11 @@ SMI_ACCESSORS(JSGeneratorObject, continuation, kContinuationOffset)
ACCESSORS(JSGeneratorObject, parameters_and_registers, FixedArray, ACCESSORS(JSGeneratorObject, parameters_and_registers, FixedArray,
kParametersAndRegistersOffset) kParametersAndRegistersOffset)
ACCESSORS(AsyncGeneratorRequest, next, Object, kNextOffset)
SMI_ACCESSORS(AsyncGeneratorRequest, resume_mode, kResumeModeOffset)
ACCESSORS(AsyncGeneratorRequest, value, Object, kValueOffset)
ACCESSORS(AsyncGeneratorRequest, promise, Object, kPromiseOffset)
bool JSGeneratorObject::is_suspended() const { bool JSGeneratorObject::is_suspended() const {
DCHECK_LT(kGeneratorExecuting, 0); DCHECK_LT(kGeneratorExecuting, 0);
DCHECK_LT(kGeneratorClosed, 0); DCHECK_LT(kGeneratorClosed, 0);
......
...@@ -140,6 +140,28 @@ class JSAsyncGeneratorObject : public JSGeneratorObject { ...@@ -140,6 +140,28 @@ class JSAsyncGeneratorObject : public JSGeneratorObject {
DISALLOW_IMPLICIT_CONSTRUCTORS(JSAsyncGeneratorObject); DISALLOW_IMPLICIT_CONSTRUCTORS(JSAsyncGeneratorObject);
}; };
class AsyncGeneratorRequest : public Struct {
public:
// Holds an AsyncGeneratorRequest, or Undefined.
DECL_ACCESSORS(next, Object)
DECL_INT_ACCESSORS(resume_mode)
DECL_ACCESSORS(value, Object)
DECL_ACCESSORS(promise, Object)
static const int kNextOffset = Struct::kHeaderSize;
static const int kResumeModeOffset = kNextOffset + kPointerSize;
static const int kValueOffset = kResumeModeOffset + kPointerSize;
static const int kPromiseOffset = kValueOffset + kPointerSize;
static const int kSize = kPromiseOffset + kPointerSize;
DECL_CAST(AsyncGeneratorRequest)
DECL_PRINTER(AsyncGeneratorRequest)
DECL_VERIFIER(AsyncGeneratorRequest)
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(AsyncGeneratorRequest);
};
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment