summaryrefslogtreecommitdiff
path: root/deps/v8/src/objects/js-promise.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/objects/js-promise.h')
-rw-r--r--deps/v8/src/objects/js-promise.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/deps/v8/src/objects/js-promise.h b/deps/v8/src/objects/js-promise.h
index bbe6f724d1..06569a3fcd 100644
--- a/deps/v8/src/objects/js-promise.h
+++ b/deps/v8/src/objects/js-promise.h
@@ -24,12 +24,8 @@ namespace internal {
// We also overlay the result and reactions fields on the JSPromise, since
// the reactions are only necessary for pending promises, whereas the result
// is only meaningful for settled promises.
-class JSPromise : public JSObject {
+class JSPromise : public TorqueGeneratedJSPromise<JSPromise, JSObject> {
public:
- // [reactions_or_result]: Smi 0 terminated list of PromiseReaction objects
- // in case the JSPromise was not settled yet, otherwise the result.
- DECL_ACCESSORS(reactions_or_result, Object)
-
// [result]: Checks that the promise is settled and returns the result.
inline Object result() const;
@@ -62,15 +58,10 @@ class JSPromise : public JSObject {
V8_WARN_UNUSED_RESULT static MaybeHandle<Object> Resolve(
Handle<JSPromise> promise, Handle<Object> resolution);
- DECL_CAST(JSPromise)
-
// Dispatched behavior.
DECL_PRINTER(JSPromise)
DECL_VERIFIER(JSPromise)
- DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
- TORQUE_GENERATED_JSPROMISE_FIELDS)
-
static const int kSizeWithEmbedderFields =
kSize + v8::Promise::kEmbedderFieldCount * kEmbedderDataSlotSize;
@@ -79,7 +70,7 @@ class JSPromise : public JSObject {
static const int kStatusBits = 2;
static const int kHasHandlerBit = 2;
static const int kHandledHintBit = 3;
- class AsyncTaskIdField : public BitField<int, kHandledHintBit + 1, 22> {};
+ using AsyncTaskIdField = BitField<int, kHandledHintBit + 1, 22>;
static const int kStatusShift = 0;
static const int kStatusMask = 0x3;
@@ -94,7 +85,7 @@ class JSPromise : public JSObject {
Handle<Object> argument,
PromiseReaction::Type type);
- OBJECT_CONSTRUCTORS(JSPromise, JSObject);
+ TQ_OBJECT_CONSTRUCTORS(JSPromise)
};
} // namespace internal