public final class JSPromise extends JSNonProxy implements JSConstructorFactory.WithFunctionsAndSpecies, PrototypeSupplier
usesOrdinaryGetOwnPropertyJSConstructorFactory.Default, JSConstructorFactory.WithFunctions, JSConstructorFactory.WithFunctionsAndSpecies| Modifier and Type | Field and Description |
|---|---|
static com.oracle.truffle.api.strings.TruffleString |
CLASS_NAME |
static int |
FULFILLED |
static JSPromise |
INSTANCE |
static int |
PENDING |
static com.oracle.truffle.api.object.HiddenKey |
PROMISE_FINALLY_CONSTRUCTOR |
static com.oracle.truffle.api.object.HiddenKey |
PROMISE_ON_FINALLY |
static com.oracle.truffle.api.strings.TruffleString |
PROTOTYPE_NAME |
static int |
REJECTED |
static int |
REJECTION_TRACKER_OPERATION_HANDLE |
static int |
REJECTION_TRACKER_OPERATION_REJECT |
static int |
REJECTION_TRACKER_OPERATION_REJECT_AFTER_RESOLVED |
static int |
REJECTION_TRACKER_OPERATION_RESOLVE_AFTER_RESOLVED |
static com.oracle.truffle.api.strings.TruffleString |
RESOLVE |
static com.oracle.truffle.api.strings.TruffleString |
THEN |
GET_SYMBOL_SPECIES_NAME| Modifier and Type | Method and Description |
|---|---|
static JSPromiseObject |
create(JSContext context,
JSRealm realm) |
static JSPromiseObject |
create(JSContext context,
JSRealm realm,
JSDynamicObject proto) |
static JSPromiseObject |
create(JSContext context,
com.oracle.truffle.api.object.Shape shape,
JSDynamicObject proto) |
static JSConstructor |
createConstructor(JSRealm realm) |
JSDynamicObject |
createPrototype(JSRealm realm,
JSFunctionObject constructor) |
static JSPromiseObject |
createWithoutPrototype(JSContext context,
JSDynamicObject proto) |
com.oracle.truffle.api.strings.TruffleString |
getClassName() |
com.oracle.truffle.api.strings.TruffleString |
getClassName(JSDynamicObject object)
The [[Class]] internal property.
|
JSDynamicObject |
getIntrinsicDefaultProto(JSRealm realm)
Allows invokevirtual of this method instead of invokeinterface.
|
static Object |
getPromiseResult(JSPromiseObject obj) |
static int |
getPromiseState(JSPromiseObject promise) |
static boolean |
isFulfilled(JSPromiseObject promise) |
static boolean |
isJSPromise(Object obj) |
static boolean |
isPending(JSPromiseObject promise) |
static boolean |
isRejected(JSPromiseObject promise) |
com.oracle.truffle.api.object.Shape |
makeInitialShape(JSContext context,
JSDynamicObject prototype) |
static void |
setPromiseState(JSPromiseObject promise,
int promiseState) |
com.oracle.truffle.api.strings.TruffleString |
toDisplayStringImpl(JSDynamicObject obj,
boolean allowSideEffects,
ToDisplayStringFormat format,
int depth)
A more informative toString variant, mainly used for error messages.
|
checkProtoCycle, createSymbolSpeciesGetterFunction, defineOwnProperty, delete, delete, deletePropertyDefault, getBuiltinToStringTag, getHelper, getHelper, getMethodHelper, getOwnHelper, getOwnHelper, getOwnProperty, getOwnPropertyKeys, getPrototypeOf, hasOnlyShapeProperties, hasOwnProperty, hasOwnProperty, hasProperty, hasProperty, invokeAccessorPropertySetter, isExtensible, ordinaryGetOwnProperty, ordinaryGetOwnPropertyIntl, ordinaryIsExtensible, ordinaryOwnPropertyKeys, ordinaryOwnPropertyKeys, ordinaryOwnPropertyKeysSlow, ordinarySet, ordinarySetIndex, ordinarySetWithReceiver, performOrdinarySetWithOwnDescriptor, preventExtensions, preventExtensionsImpl, putConstructorSpeciesGetter, set, set, setIntegrityLevel, setIntegrityLevelFast, setPropertySlow, setPrototypeOf, testIntegrityLevel, testIntegrityLevelFast, toString, usesOrdinaryGetOwnProperty, usesOrdinaryIsExtensibledefaultToString, filterOwnPropertyKeys, formatToString, get, get, getToStringTag, isInstance, isInstance, isInstance, isInstance, ownPropertyKeys, testIntegrityLevelDefaultclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitfillConstructorcreateConstructorAndPrototypecreateConstructorObjectpublic static final com.oracle.truffle.api.strings.TruffleString CLASS_NAME
public static final com.oracle.truffle.api.strings.TruffleString PROTOTYPE_NAME
public static final JSPromise INSTANCE
public static final com.oracle.truffle.api.strings.TruffleString RESOLVE
public static final com.oracle.truffle.api.strings.TruffleString THEN
public static final com.oracle.truffle.api.object.HiddenKey PROMISE_ON_FINALLY
public static final com.oracle.truffle.api.object.HiddenKey PROMISE_FINALLY_CONSTRUCTOR
public static final int PENDING
public static final int FULFILLED
public static final int REJECTED
public static final int REJECTION_TRACKER_OPERATION_REJECT
public static final int REJECTION_TRACKER_OPERATION_HANDLE
public static final int REJECTION_TRACKER_OPERATION_REJECT_AFTER_RESOLVED
public static final int REJECTION_TRACKER_OPERATION_RESOLVE_AFTER_RESOLVED
public static JSPromiseObject create(JSContext context, JSRealm realm)
public static JSPromiseObject create(JSContext context, JSRealm realm, JSDynamicObject proto)
public static JSPromiseObject create(JSContext context, com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto)
public static JSPromiseObject createWithoutPrototype(JSContext context, JSDynamicObject proto)
public com.oracle.truffle.api.strings.TruffleString getClassName(JSDynamicObject object)
JSClassgetClassName in class JSClassobject - object to be usedpublic com.oracle.truffle.api.object.Shape makeInitialShape(JSContext context, JSDynamicObject prototype)
makeInitialShape in class JSClasspublic static boolean isJSPromise(Object obj)
public static boolean isRejected(JSPromiseObject promise)
public static boolean isPending(JSPromiseObject promise)
public static boolean isFulfilled(JSPromiseObject promise)
public static int getPromiseState(JSPromiseObject promise)
public static void setPromiseState(JSPromiseObject promise, int promiseState)
public com.oracle.truffle.api.strings.TruffleString toDisplayStringImpl(JSDynamicObject obj, boolean allowSideEffects, ToDisplayStringFormat format, int depth)
JSClasstoDisplayStringImpl in class JSNonProxyformat - formatting parametersdepth - current nesting depthpublic static Object getPromiseResult(JSPromiseObject obj)
public com.oracle.truffle.api.strings.TruffleString getClassName()
getClassName in interface JSConstructorFactorypublic JSDynamicObject createPrototype(JSRealm realm, JSFunctionObject constructor)
createPrototype in interface JSConstructorFactorypublic static JSConstructor createConstructor(JSRealm realm)
public JSDynamicObject getIntrinsicDefaultProto(JSRealm realm)
JSClassPrototypeSupplier.getIntrinsicDefaultProto in interface PrototypeSuppliergetIntrinsicDefaultProto in class JSClassPrototypeSupplier.getIntrinsicDefaultProto(com.oracle.truffle.js.runtime.JSRealm)