Commit 416046ed authored by Suraj Sharma's avatar Suraj Sharma Committed by Commit Bot

[torque] convert GeneratorObjects to torque

Converted JSGeneratorObject, JSAsyncFunctionObject , JSAsyncGenerator to torque.

Change-Id: I6eb2463d66c118c60fee472776a471120641344c

Bug: v8:8952
Change-Id: I6eb2463d66c118c60fee472776a471120641344c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1512472
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60347}
parent 07a711a5
......@@ -527,6 +527,25 @@ extern class DataHandler extends Struct {
weak data_3: Object;
}
extern class JSGeneratorObject extends JSObject {
function: JSFunction;
context: Context;
receiver: Object;
input_or_debug_pos: Object;
resume_mode: Smi;
continuation: Smi;
parameters_and_registers: FixedArray;
}
extern class JSAsyncFunctionObject extends JSGeneratorObject {
promise: JSPromise;
}
extern class JSAsyncGeneratorObject extends JSGeneratorObject {
queue: HeapObject;
is_awaiting: Smi;
}
extern class JSPromise extends JSObject {
reactions_or_result: Object;
flags: Smi;
......
......@@ -68,19 +68,8 @@ class JSGeneratorObject : public JSObject {
static const int kGeneratorClosed = -1;
// Layout description.
#define JS_GENERATOR_FIELDS(V) \
V(kFunctionOffset, kTaggedSize) \
V(kContextOffset, kTaggedSize) \
V(kReceiverOffset, kTaggedSize) \
V(kInputOrDebugPosOffset, kTaggedSize) \
V(kResumeModeOffset, kTaggedSize) \
V(kContinuationOffset, kTaggedSize) \
V(kParametersAndRegistersOffset, kTaggedSize) \
/* Header size. */ \
V(kSize, 0)
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, JS_GENERATOR_FIELDS)
#undef JS_GENERATOR_FIELDS
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
TORQUE_GENERATED_JSGENERATOR_OBJECT_FIELDS)
OBJECT_CONSTRUCTORS(JSGeneratorObject, JSObject);
};
......@@ -96,14 +85,8 @@ class JSAsyncFunctionObject : public JSGeneratorObject {
DECL_ACCESSORS(promise, JSPromise)
// Layout description.
#define JS_ASYNC_FUNCTION_FIELDS(V) \
V(kPromiseOffset, kTaggedSize) \
/* Header size. */ \
V(kSize, 0)
DEFINE_FIELD_OFFSET_CONSTANTS(JSGeneratorObject::kSize,
JS_ASYNC_FUNCTION_FIELDS)
#undef JS_ASYNC_FUNCTION_FIELDS
TORQUE_GENERATED_JSASYNC_FUNCTION_OBJECT_FIELDS)
OBJECT_CONSTRUCTORS(JSAsyncFunctionObject, JSGeneratorObject);
};
......@@ -125,14 +108,9 @@ class JSAsyncGeneratorObject : public JSGeneratorObject {
DECL_INT_ACCESSORS(is_awaiting)
// Layout description.
#define JS_ASYNC_GENERATOR_FIELDS(V) \
V(kQueueOffset, kTaggedSize) \
V(kIsAwaitingOffset, kTaggedSize) \
/* Header size. */ \
V(kSize, 0)
DEFINE_FIELD_OFFSET_CONSTANTS(JSGeneratorObject::kSize,
JS_ASYNC_GENERATOR_FIELDS)
DEFINE_FIELD_OFFSET_CONSTANTS(
JSGeneratorObject::kSize,
TORQUE_GENERATED_JSASYNC_GENERATOR_OBJECT_FIELDS)
#undef JS_ASYNC_GENERATOR_FIELDS
OBJECT_CONSTRUCTORS(JSAsyncGeneratorObject, JSGeneratorObject);
......
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