Class JSAdapter
java.lang.Object
com.oracle.truffle.js.runtime.builtins.JSClass
com.oracle.truffle.js.runtime.builtins.AbstractJSClass
com.oracle.truffle.js.runtime.builtins.JSAdapter
- All Implemented Interfaces:
JSConstructorFactory, JSConstructorFactory.Default, PrototypeSupplier
public final class JSAdapter
extends AbstractJSClass
implements JSConstructorFactory.Default, PrototypeSupplier
-
Nested Class Summary
Nested classes/interfaces inherited from interface JSConstructorFactory
JSConstructorFactory.Default, JSConstructorFactory.WithFunctions, JSConstructorFactory.WithFunctionsAndSpeciesNested classes/interfaces inherited from interface JSConstructorFactory.Default
JSConstructorFactory.Default.WithSpecies -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.oracle.truffle.api.strings.TruffleStringstatic final com.oracle.truffle.api.strings.TruffleStringstatic final com.oracle.truffle.api.strings.TruffleStringstatic final JSAdapterstatic final com.oracle.truffle.api.strings.TruffleString -
Method Summary
Modifier and TypeMethodDescriptionstatic JSObjectcreate(JSContext context, JSRealm realm, JSDynamicObject adaptee, JSDynamicObject overrides, JSDynamicObject protoOpt) static JSConstructorcreateConstructor(JSRealm realm) createPrototype(JSRealm realm, JSFunctionObject ctor) booleandefineOwnProperty(JSDynamicObject thisObj, Object key, PropertyDescriptor desc, boolean doThrow) 9.1.6 [[DefineOwnProperty]] (P, Desc).booleandelete(JSDynamicObject thisObj, long index, boolean isStrict) booleandelete(JSDynamicObject thisObj, Object key, boolean isStrict) 9.1.10 [[Delete]] (P).static JSDynamicObjectcom.oracle.truffle.api.strings.TruffleStringgetIntrinsicDefaultProto(JSRealm realm) Allows invokevirtual of this method instead of invokeinterface.getMethodHelper(JSDynamicObject store, Object thisObj, Object key, com.oracle.truffle.api.nodes.Node encapsulatingNode) static JSDynamicObjectgetOwnHelper(JSDynamicObject store, Object thisObj, long index, com.oracle.truffle.api.nodes.Node encapsulatingNode) getOwnHelper(JSDynamicObject store, Object thisObj, Object key, com.oracle.truffle.api.nodes.Node encapsulatingNode) getOwnProperty(JSDynamicObject thisObj, Object key) 9.1.5 [[GetOwnProperty]] (P).getOwnPropertyKeys(JSDynamicObject thisObj, boolean strings, boolean symbols) GetOwnPropertyKeys (O, type).getPrototypeOf(JSDynamicObject thisObj) 9.1.1 [[GetPrototypeOf]] ().booleanhasOwnProperty(JSDynamicObject thisObj, long index) booleanhasOwnProperty(JSDynamicObject thisObj, Object key) booleanisExtensible(JSDynamicObject thisObj) 9.1.3 [[IsExtensible]] ().static booleanisJSAdapter(Object obj) com.oracle.truffle.api.object.ShapemakeInitialShape(JSContext context, JSDynamicObject prototype) booleanpreventExtensions(JSDynamicObject thisObj, boolean doThrow) 9.1.4 [[PreventExtensions]] ().booleanset(JSDynamicObject thisObj, long index, Object value, Object receiver, boolean isStrict, com.oracle.truffle.api.nodes.Node encapsulatingNode) booleanset(JSDynamicObject thisObj, Object key, Object value, Object receiver, boolean isStrict, com.oracle.truffle.api.nodes.Node encapsulatingNode) 9.1.9 [[Set]] (P, V, Receiver).booleansetPrototypeOf(JSDynamicObject thisObj, JSDynamicObject newPrototype) 9.1.2 [[SetPrototypeOf]] (V).Methods inherited from class AbstractJSClass
getHelper, getHelper, hasOnlyShapeProperties, hasProperty, hasProperty, 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
createConstructorObject, fillConstructorMethods inherited from interface JSConstructorFactory.Default
createConstructorAndPrototype
-
Field Details
-
CLASS_NAME
public static final com.oracle.truffle.api.strings.TruffleString CLASS_NAME -
INSTANCE
-
NEW
public static final com.oracle.truffle.api.strings.TruffleString NEW -
GET_IDS
public static final com.oracle.truffle.api.strings.TruffleString GET_IDS -
GET_VALUES
public static final com.oracle.truffle.api.strings.TruffleString GET_VALUES
-
-
Method Details
-
getClassName
public com.oracle.truffle.api.strings.TruffleString getClassName()- Specified by:
getClassNamein interfaceJSConstructorFactory
-
create
public static JSObject create(JSContext context, JSRealm realm, JSDynamicObject adaptee, JSDynamicObject overrides, JSDynamicObject protoOpt) -
getAdaptee
-
getOverrides
-
isJSAdapter
-
getOwnHelper
public Object getOwnHelper(JSDynamicObject store, Object thisObj, Object key, com.oracle.truffle.api.nodes.Node encapsulatingNode) - Overrides:
getOwnHelperin classAbstractJSClass
-
getOwnHelper
public Object getOwnHelper(JSDynamicObject store, Object thisObj, long index, com.oracle.truffle.api.nodes.Node encapsulatingNode) - Overrides:
getOwnHelperin classAbstractJSClass
-
hasOwnProperty
- Overrides:
hasOwnPropertyin classAbstractJSClass
-
hasOwnProperty
- Overrides:
hasOwnPropertyin classAbstractJSClass
-
set
public boolean set(JSDynamicObject thisObj, long index, Object value, Object receiver, boolean isStrict, com.oracle.truffle.api.nodes.Node encapsulatingNode) - Overrides:
setin classAbstractJSClass
-
set
public boolean set(JSDynamicObject thisObj, Object key, Object value, Object receiver, boolean isStrict, com.oracle.truffle.api.nodes.Node encapsulatingNode) Description copied from class:JSClass9.1.9 [[Set]] (P, V, Receiver).- Overrides:
setin classAbstractJSClass
-
delete
- Overrides:
deletein classAbstractJSClass
-
delete
Description copied from class:JSClass9.1.10 [[Delete]] (P).- Overrides:
deletein classAbstractJSClass
-
defineOwnProperty
public boolean defineOwnProperty(JSDynamicObject thisObj, Object key, PropertyDescriptor desc, boolean doThrow) Description copied from class:JSClass9.1.6 [[DefineOwnProperty]] (P, Desc).- Overrides:
defineOwnPropertyin classAbstractJSClass
-
preventExtensions
Description copied from class:JSClass9.1.4 [[PreventExtensions]] ().- Overrides:
preventExtensionsin classAbstractJSClass
-
isExtensible
Description copied from class:JSClass9.1.3 [[IsExtensible]] ().- Overrides:
isExtensiblein classAbstractJSClass
-
getOwnPropertyKeys
Description copied from class:JSClassGetOwnPropertyKeys (O, type).- Overrides:
getOwnPropertyKeysin classAbstractJSClass- Returns:
- a List of the keys of all own properties of that object with the specified types
-
createPrototype
- Specified by:
createPrototypein interfaceJSConstructorFactory
-
makeInitialShape
public com.oracle.truffle.api.object.Shape makeInitialShape(JSContext context, JSDynamicObject prototype) - Overrides:
makeInitialShapein classJSClass
-
createConstructor
-
getMethodHelper
public Object getMethodHelper(JSDynamicObject store, Object thisObj, Object key, com.oracle.truffle.api.nodes.Node encapsulatingNode) - Overrides:
getMethodHelperin classAbstractJSClass
-
getPrototypeOf
Description copied from class:JSClass9.1.1 [[GetPrototypeOf]] ().- Overrides:
getPrototypeOfin classAbstractJSClass
-
setPrototypeOf
Description copied from class:JSClass9.1.2 [[SetPrototypeOf]] (V).- Overrides:
setPrototypeOfin classAbstractJSClass
-
getOwnProperty
Description copied from class:JSClass9.1.5 [[GetOwnProperty]] (P).- Overrides:
getOwnPropertyin classAbstractJSClass
-
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:
-