Class JSFunctionObject
java.lang.Object
com.oracle.truffle.api.object.DynamicObject
com.oracle.truffle.js.runtime.objects.JSDynamicObject
com.oracle.truffle.js.runtime.objects.JSObject
com.oracle.truffle.js.runtime.objects.JSClassObject
com.oracle.truffle.js.runtime.objects.JSNonProxyObject
com.oracle.truffle.js.runtime.builtins.JSFunctionObject
- All Implemented Interfaces:
com.oracle.truffle.api.interop.TruffleObject
- Direct Known Subclasses:
JSFunctionObject.BoundOrWrapped,JSFunctionObject.Unbound
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBound function exotic object.static classBound or wrapped function exotic object.static final classstatic final classWrapped function exotic object.Nested classes/interfaces inherited from class com.oracle.truffle.js.runtime.objects.JSDynamicObject
JSDynamicObject.IsIdenticalOrUndefinedNested classes/interfaces inherited from class com.oracle.truffle.api.object.DynamicObject
com.oracle.truffle.api.object.DynamicObject.DynamicField -
Field Summary
Fields inherited from class com.oracle.truffle.js.runtime.objects.JSObject
CONSTRUCTOR, EMPTY_STRING_ARRAY, GET_PROTO_NAME, HIDDEN_PROTO, NO_SUCH_METHOD_NAME, NO_SUCH_PROPERTY_NAME, PROTO, PROTOTYPE, SET_PROTO_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJSFunctionObject(com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto, JSFunctionData functionData, com.oracle.truffle.api.frame.MaterializedFrame enclosingFrame, JSRealm realm, Object classPrototype) -
Method Summary
Modifier and TypeMethodDescriptionstatic JSFunctionObjectcreate(com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto, JSFunctionData functionData, com.oracle.truffle.api.frame.MaterializedFrame enclosingFrame, JSRealm realm, Object classPrototype) static JSFunctionObjectcreateBound(com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto, JSFunctionData functionData, JSRealm realm, Object classPrototype, Object boundTargetFunction, Object boundThis, Object[] boundArguments) static JSFunctionObjectcreateWrapped(com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto, JSFunctionData functionData, JSRealm realm, Object boundTargetFunction) final Objectexecute(Object[] args, com.oracle.truffle.api.interop.InteropLibrary self, JSInteropExecuteNode callNode, ExportValueNode exportNode) final com.oracle.truffle.api.strings.TruffleStringReturns builtinTag as per Object.prototype.toString().final com.oracle.truffle.api.strings.TruffleStringThe [[Class]] internal property.final Objectfinal com.oracle.truffle.api.frame.MaterializedFramefinal JSFunctionDatafinal Objectfinal JSRealmgetRealm()final com.oracle.truffle.api.source.SourceSectionfinal booleanfinal Objectinstantiate(Object[] args, com.oracle.truffle.api.interop.InteropLibrary self, JSInteropInstantiateNode callNode, ExportValueNode exportNode) final booleanisExecutable(IsCallableNode isCallable) final booleanfinal booleanisMetaInstance(Object instance) final booleanvoidsetClassPrototype(Object classPrototype) com.oracle.truffle.api.strings.TruffleStringtoDisplayStringImpl(boolean allowSideEffects, ToDisplayStringFormat format, int depth) A more informative toString variant, mainly used for error messages.Methods inherited from class com.oracle.truffle.js.runtime.objects.JSNonProxyObject
getMetaObject, getMetaObjectImpl, hasMetaObject, isExtensible, preventExtensions, setIntegrityLevel, testIntegrityLevelMethods inherited from class com.oracle.truffle.js.runtime.objects.JSClassObject
defineOwnProperty, delete, delete, getHelper, getHelper, getMethodHelper, getOwnHelper, getOwnHelper, getOwnProperty, getOwnPropertyKeys, getPrototypeOf, hasOnlyShapeProperties, hasOwnProperty, hasOwnProperty, hasProperty, hasProperty, set, set, setPrototypeOfMethods inherited from class com.oracle.truffle.js.runtime.objects.JSObject
copyWithoutProperties, defaultToString, defineOwnProperty, defineOwnProperty, delete, delete, delete, delete, delete, delete, enumerableOwnNames, filterEnumerableNames, get, get, get, get, getArray, getClassName, getIterator, getJSClass, getJSContext, getLanguage, getMembers, getMethod, getMethod, getOrDefault, getOrDefault, getOrDefault, getOrDefault, getOwnProperty, getOwnProperty, getPrototype, getPrototype, getUncachedRead, getUncachedWrite, getWithReceiver, hasArray, hasIterator, hasLanguage, hasMemberReadSideEffects, hasMembers, hasMemberWriteSideEffects, hasOwnProperty, hasOwnProperty, hasOwnProperty, hasOwnProperty, hasProperty, hasProperty, hasProperty, hasProperty, invokeMember, isExtensible, isExtensible, isJSObject, isMemberInsertable, isMemberInvocable, isMemberModifiable, isMemberReadable, isMemberRemovable, language, ordinaryToPrimitive, ownPropertyKeys, ownPropertyKeys, readMember, removeMember, set, set, set, set, setArray, setPrototype, setPrototype, setWithReceiver, setWithReceiver, toDisplayString, toPrimitive, toPrimitive, writeMemberMethods inherited from class com.oracle.truffle.js.runtime.objects.JSDynamicObject
defaultToString, getDynamicType, getJSClass, getJSContext, getJSSharedData, getObjectFlags, getOrDefault, getOrNull, getPropertyArray, getPropertyFlags, getValue, getValue, identityHashCode, isJSDynamicObject, ownPropertyKeys, setJSClass, setObjectFlags, setPropertyFlags, testProperties, updatePropertyFlagsMethods inherited from class com.oracle.truffle.api.object.DynamicObject
clone, getShape
-
Constructor Details
-
JSFunctionObject
protected JSFunctionObject(com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto, JSFunctionData functionData, com.oracle.truffle.api.frame.MaterializedFrame enclosingFrame, JSRealm realm, Object classPrototype)
-
-
Method Details
-
getFunctionData
-
getEnclosingFrame
public final com.oracle.truffle.api.frame.MaterializedFrame getEnclosingFrame() -
getRealm
-
getClassPrototype
-
setClassPrototype
-
getLexicalThis
-
getClassName
public final com.oracle.truffle.api.strings.TruffleString getClassName()Description copied from class:JSDynamicObjectThe [[Class]] internal property. For ES5, this is the second part of what Object.prototype.toString.call(myObj) returns, e.g. "[object Array]".- Overrides:
getClassNamein classJSNonProxyObject
-
getBuiltinToStringTag
public final com.oracle.truffle.api.strings.TruffleString getBuiltinToStringTag()Description copied from class:JSObjectReturns builtinTag as per Object.prototype.toString(). By default returns "Object".- Overrides:
getBuiltinToStringTagin classJSObject- Returns:
- built-in toStringTag
-
isExecutable
-
execute
public final Object execute(Object[] args, com.oracle.truffle.api.interop.InteropLibrary self, JSInteropExecuteNode callNode, ExportValueNode exportNode) throws com.oracle.truffle.api.interop.UnsupportedMessageException - Throws:
com.oracle.truffle.api.interop.UnsupportedMessageException
-
isInstantiable
public final boolean isInstantiable() -
instantiate
public final Object instantiate(Object[] args, com.oracle.truffle.api.interop.InteropLibrary self, JSInteropInstantiateNode callNode, ExportValueNode exportNode) throws com.oracle.truffle.api.interop.UnsupportedMessageException - Throws:
com.oracle.truffle.api.interop.UnsupportedMessageException
-
hasSourceLocation
public final boolean hasSourceLocation() -
getSourceLocation
public final com.oracle.truffle.api.source.SourceSection getSourceLocation() throws com.oracle.truffle.api.interop.UnsupportedMessageException- Throws:
com.oracle.truffle.api.interop.UnsupportedMessageException
-
isMetaObject
public final boolean isMetaObject() -
getMetaObjectName
-
isMetaInstance
-
toDisplayStringImpl
public com.oracle.truffle.api.strings.TruffleString toDisplayStringImpl(boolean allowSideEffects, ToDisplayStringFormat format, int depth) Description copied from class:JSDynamicObjectA more informative toString variant, mainly used for error messages.- Overrides:
toDisplayStringImplin classJSNonProxyObject- Parameters:
format- formatting parametersdepth- current nesting depth
-
create
public static JSFunctionObject create(com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto, JSFunctionData functionData, com.oracle.truffle.api.frame.MaterializedFrame enclosingFrame, JSRealm realm, Object classPrototype) -
createBound
public static JSFunctionObject createBound(com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto, JSFunctionData functionData, JSRealm realm, Object classPrototype, Object boundTargetFunction, Object boundThis, Object[] boundArguments) -
createWrapped
public static JSFunctionObject createWrapped(com.oracle.truffle.api.object.Shape shape, JSDynamicObject proto, JSFunctionData functionData, JSRealm realm, Object boundTargetFunction)
-