Class JSPromise
java.lang.Object
com.oracle.truffle.js.runtime.builtins.JSClass
com.oracle.truffle.js.runtime.builtins.JSNonProxy
com.oracle.truffle.js.runtime.builtins.JSPromise
- All Implemented Interfaces:
JSConstructorFactory, JSConstructorFactory.WithFunctions, JSConstructorFactory.WithFunctionsAndSpecies, PrototypeSupplier
public final class JSPromise
extends JSNonProxy
implements JSConstructorFactory.WithFunctionsAndSpecies, PrototypeSupplier
-
Nested Class Summary
Nested classes/interfaces inherited from interface JSConstructorFactory
JSConstructorFactory.Default, JSConstructorFactory.WithFunctions, JSConstructorFactory.WithFunctionsAndSpecies -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.oracle.truffle.api.strings.TruffleStringstatic final intstatic final JSPromisestatic final intstatic final com.oracle.truffle.api.object.HiddenKeystatic final com.oracle.truffle.api.object.HiddenKeystatic final com.oracle.truffle.api.strings.TruffleStringstatic final intstatic final intstatic final intstatic final intstatic final intstatic final com.oracle.truffle.api.strings.TruffleStringstatic final com.oracle.truffle.api.strings.TruffleStringFields inherited from class JSNonProxy
GET_SYMBOL_SPECIES_NAME -
Method Summary
Modifier and TypeMethodDescriptionstatic JSPromiseObjectcreate(JSContext context, com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto) static JSPromiseObjectstatic JSPromiseObjectcreate(JSContext context, JSRealm realm, JSDynamicObject proto) static JSConstructorcreateConstructor(JSRealm realm) createPrototype(JSRealm realm, JSFunctionObject constructor) static JSPromiseObjectcreateWithoutPrototype(JSContext context, JSDynamicObject proto) com.oracle.truffle.api.strings.TruffleStringgetIntrinsicDefaultProto(JSRealm realm) Allows invokevirtual of this method instead of invokeinterface.static Objectstatic intgetPromiseState(JSPromiseObject promise) static com.oracle.truffle.api.strings.TruffleStringgetStatus(JSPromiseObject obj) static booleanisFulfilled(JSPromiseObject promise) static booleanisJSPromise(Object obj) static booleanisPending(JSPromiseObject promise) static booleanisRejected(JSPromiseObject promise) com.oracle.truffle.api.object.ShapemakeInitialShape(JSContext context, JSDynamicObject prototype) static voidsetPromiseState(JSPromiseObject promise, int promiseState) static voidthrowIfRejected(JSPromiseObject promise, JSRealm realm) Methods inherited from class JSNonProxy
checkProtoCycle, createSymbolSpeciesGetterFunction, defineOwnProperty, delete, delete, deletePropertyDefault, getHelper, getHelper, getMethodHelper, getOwnHelper, getOwnHelper, getOwnProperty, getOwnPropertyKeys, getPrototypeOf, hasOnlyShapeProperties, hasOwnProperty, hasOwnProperty, hasProperty, hasProperty, invokeAccessorPropertySetter, isExtensible, ordinaryGetOwnProperty, ordinaryGetOwnPropertyIntl, ordinaryIsExtensible, ordinaryOwnPropertyKeys, ordinaryOwnPropertyKeys, ordinaryOwnPropertyKeysSlow, ordinaryPreventExtensions, ordinarySet, ordinarySetIndex, ordinarySetWithReceiver, performOrdinarySetWithOwnDescriptor, preventExtensions, putConstructorSpeciesGetter, set, set, setIntegrityLevelFast, setPropertySlow, setPrototypeOf, testIntegrityLevelFast, usesOrdinaryGetOwnProperty, usesOrdinaryIsExtensibleMethods inherited from class JSClass
filterOwnPropertyKeys, get, get, isInstance, isInstance, isInstance, isInstance, ownPropertyKeys, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface JSConstructorFactory
createConstructorObjectMethods inherited from interface JSConstructorFactory.WithFunctions
createConstructorAndPrototypeMethods inherited from interface JSConstructorFactory.WithFunctionsAndSpecies
fillConstructor
-
Field Details
-
CLASS_NAME
public static final com.oracle.truffle.api.strings.TruffleString CLASS_NAME -
PROTOTYPE_NAME
public static final com.oracle.truffle.api.strings.TruffleString PROTOTYPE_NAME -
INSTANCE
-
RESOLVE
public static final com.oracle.truffle.api.strings.TruffleString RESOLVE -
THEN
public static final com.oracle.truffle.api.strings.TruffleString THEN -
PROMISE_ON_FINALLY
public static final com.oracle.truffle.api.object.HiddenKey PROMISE_ON_FINALLY -
PROMISE_FINALLY_CONSTRUCTOR
public static final com.oracle.truffle.api.object.HiddenKey PROMISE_FINALLY_CONSTRUCTOR -
PENDING
public static final int PENDING- See Also:
-
FULFILLED
public static final int FULFILLED- See Also:
-
REJECTED
public static final int REJECTED- See Also:
-
REJECTION_TRACKER_OPERATION_REJECT
public static final int REJECTION_TRACKER_OPERATION_REJECT- See Also:
-
REJECTION_TRACKER_OPERATION_HANDLE
public static final int REJECTION_TRACKER_OPERATION_HANDLE- See Also:
-
REJECTION_TRACKER_OPERATION_REJECT_AFTER_RESOLVED
public static final int REJECTION_TRACKER_OPERATION_REJECT_AFTER_RESOLVED- See Also:
-
REJECTION_TRACKER_OPERATION_RESOLVE_AFTER_RESOLVED
public static final int REJECTION_TRACKER_OPERATION_RESOLVE_AFTER_RESOLVED- See Also:
-
-
Method Details
-
create
-
create
-
create
public static JSPromiseObject create(JSContext context, com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto) -
createWithoutPrototype
-
makeInitialShape
public com.oracle.truffle.api.object.Shape makeInitialShape(JSContext context, JSDynamicObject prototype) - Overrides:
makeInitialShapein classJSClass
-
isJSPromise
-
isRejected
-
isPending
-
isFulfilled
-
getPromiseState
-
setPromiseState
-
getStatus
-
getPromiseResult
-
throwIfRejected
-
getClassName
public com.oracle.truffle.api.strings.TruffleString getClassName()- Specified by:
getClassNamein interfaceJSConstructorFactory
-
createPrototype
- Specified by:
createPrototypein interfaceJSConstructorFactory
-
createConstructor
-
getIntrinsicDefaultProto
Description copied from class:JSClassAllows invokevirtual of this method instead of invokeinterface. Classes overriding this method should implementPrototypeSupplier.- Specified by:
getIntrinsicDefaultProtoin interfacePrototypeSupplier- Overrides:
getIntrinsicDefaultProtoin classJSClass- See Also:
-