public final class JSPromise extends JSNonProxy implements JSConstructorFactory.WithFunctionsAndSpecies, PrototypeSupplier
usesOrdinaryGetOwnProperty
JSConstructorFactory.Default, JSConstructorFactory.WithFunctions, JSConstructorFactory.WithFunctionsAndSpecies
Modifier and Type | Field and Description |
---|---|
static String |
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_FULFILL_REACTIONS |
static com.oracle.truffle.api.object.HiddenKey |
PROMISE_IS_HANDLED |
static com.oracle.truffle.api.object.HiddenKey |
PROMISE_ON_FINALLY |
static com.oracle.truffle.api.object.HiddenKey |
PROMISE_REJECT_REACTIONS |
static com.oracle.truffle.api.object.HiddenKey |
PROMISE_RESULT |
static String |
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 String |
RESOLVE |
static String |
THEN |
EMPTY_STRING_ARRAY
Modifier and Type | Method and Description |
---|---|
static com.oracle.truffle.api.object.DynamicObject |
create(JSContext context) |
static com.oracle.truffle.api.object.DynamicObject |
create(JSContext context,
com.oracle.truffle.api.object.Shape shape) |
static JSConstructor |
createConstructor(JSRealm realm) |
com.oracle.truffle.api.object.DynamicObject |
createPrototype(JSRealm realm,
com.oracle.truffle.api.object.DynamicObject constructor) |
static com.oracle.truffle.api.object.DynamicObject |
createWithoutPrototype(JSContext context) |
String |
getClassName() |
String |
getClassName(com.oracle.truffle.api.object.DynamicObject object)
The [[Class]] internal property.
|
com.oracle.truffle.api.object.DynamicObject |
getIntrinsicDefaultProto(JSRealm realm) |
static int |
getPromiseState(com.oracle.truffle.api.object.DynamicObject promise) |
static boolean |
isFulfilled(com.oracle.truffle.api.object.DynamicObject promise) |
static boolean |
isJSPromise(Object obj) |
static boolean |
isPending(com.oracle.truffle.api.object.DynamicObject promise) |
static boolean |
isRejected(com.oracle.truffle.api.object.DynamicObject promise) |
com.oracle.truffle.api.object.Shape |
makeInitialShape(JSContext context,
com.oracle.truffle.api.object.DynamicObject prototype) |
static void |
setPromiseState(com.oracle.truffle.api.object.DynamicObject promise,
int promiseState) |
String |
toDisplayStringImpl(com.oracle.truffle.api.object.DynamicObject obj,
int depth,
boolean allowSideEffects,
JSContext context)
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, ordinaryOwnPropertyKeys, ordinaryOwnPropertyKeys, ordinaryOwnPropertyKeysSlow, ordinarySet, ordinarySetIndex, ordinarySetWithReceiver, performOrdinarySetWithOwnDescriptor, preventExtensions, preventExtensionsImpl, putConstructorSpeciesGetter, set, set, setIntegrityLevel, setIntegrityLevelFast, setPropertySlow, setPrototypeOf, testIntegrityLevel, testIntegrityLevelFast, toString, usesOrdinaryGetOwnProperty, usesOrdinaryIsExtensible
defaultToString, filterOwnPropertyKeys, formatToString, get, get, getToStringTag, isInstance, isInstance, isInstance, isInstance, ownPropertyKeys, testIntegrityLevelDefault
dispatch, equals, hashCode, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fillConstructor
createConstructorAndPrototype
createConstructorObject
public static final String CLASS_NAME
public static final String PROTOTYPE_NAME
public static final JSPromise INSTANCE
public static final String RESOLVE
public static final String THEN
public static final com.oracle.truffle.api.object.HiddenKey PROMISE_RESULT
public static final com.oracle.truffle.api.object.HiddenKey PROMISE_IS_HANDLED
public static final com.oracle.truffle.api.object.HiddenKey PROMISE_FULFILL_REACTIONS
public static final com.oracle.truffle.api.object.HiddenKey PROMISE_REJECT_REACTIONS
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 com.oracle.truffle.api.object.DynamicObject create(JSContext context)
public static com.oracle.truffle.api.object.DynamicObject create(JSContext context, com.oracle.truffle.api.object.Shape shape)
public static com.oracle.truffle.api.object.DynamicObject createWithoutPrototype(JSContext context)
public String getClassName(com.oracle.truffle.api.object.DynamicObject object)
JSClass
getClassName
in class JSClass
object
- object to be usedpublic com.oracle.truffle.api.object.Shape makeInitialShape(JSContext context, com.oracle.truffle.api.object.DynamicObject prototype)
makeInitialShape
in class JSClass
public static boolean isJSPromise(Object obj)
public static boolean isRejected(com.oracle.truffle.api.object.DynamicObject promise)
public static boolean isPending(com.oracle.truffle.api.object.DynamicObject promise)
public static boolean isFulfilled(com.oracle.truffle.api.object.DynamicObject promise)
public static int getPromiseState(com.oracle.truffle.api.object.DynamicObject promise)
public static void setPromiseState(com.oracle.truffle.api.object.DynamicObject promise, int promiseState)
public String toDisplayStringImpl(com.oracle.truffle.api.object.DynamicObject obj, int depth, boolean allowSideEffects, JSContext context)
JSClass
toDisplayStringImpl
in class JSNonProxy
depth
- allowed nesting depthcontext
- the current language contextpublic String getClassName()
getClassName
in interface JSConstructorFactory
public com.oracle.truffle.api.object.DynamicObject createPrototype(JSRealm realm, com.oracle.truffle.api.object.DynamicObject constructor)
createPrototype
in interface JSConstructorFactory
public static JSConstructor createConstructor(JSRealm realm)
public com.oracle.truffle.api.object.DynamicObject getIntrinsicDefaultProto(JSRealm realm)
getIntrinsicDefaultProto
in interface PrototypeSupplier