public abstract class JSObject extends JSDynamicObject
| Modifier and Type | Class and Description |
|---|---|
static class |
JSObject.GetMembers |
JSDynamicObject.IsIdenticalOrUndefined| Modifier and Type | Field and Description |
|---|---|
static com.oracle.truffle.api.strings.TruffleString |
CONSTRUCTOR |
protected static String[] |
EMPTY_STRING_ARRAY |
static com.oracle.truffle.api.object.HiddenKey |
HIDDEN_PROTO |
static com.oracle.truffle.api.strings.TruffleString |
NO_SUCH_METHOD_NAME |
static com.oracle.truffle.api.strings.TruffleString |
NO_SUCH_PROPERTY_NAME |
static com.oracle.truffle.api.strings.TruffleString |
PROTO |
static com.oracle.truffle.api.strings.TruffleString |
PROTOTYPE |
| Modifier | Constructor and Description |
|---|---|
protected |
JSObject(com.oracle.truffle.api.object.Shape shape,
JSDynamicObject proto) |
| Modifier and Type | Method and Description |
|---|---|
protected JSObject |
copyWithoutProperties(com.oracle.truffle.api.object.Shape shape) |
static com.oracle.truffle.api.strings.TruffleString |
defaultToString(JSDynamicObject obj) |
static boolean |
defineOwnProperty(JSDynamicObject obj,
Object key,
PropertyDescriptor desc) |
static boolean |
defineOwnProperty(JSDynamicObject obj,
Object key,
PropertyDescriptor desc,
boolean doThrow) |
static boolean |
delete(JSDynamicObject obj,
long index) |
static boolean |
delete(JSDynamicObject obj,
long index,
boolean isStrict) |
static boolean |
delete(JSDynamicObject obj,
long index,
boolean isStrict,
JSClassProfile classProfile) |
static boolean |
delete(JSDynamicObject obj,
Object key) |
static boolean |
delete(JSDynamicObject obj,
Object key,
boolean isStrict) |
static boolean |
delete(JSDynamicObject obj,
Object key,
boolean isStrict,
JSClassProfile classProfile) |
static List<com.oracle.truffle.api.strings.TruffleString> |
enumerableOwnNames(JSDynamicObject thisObj)
7.3.21 EnumerableOwnNames (O).
|
protected static String[] |
filterEnumerableNames(JSDynamicObject target,
Iterable<Object> ownKeys,
JSClass jsclass) |
static Object |
get(JSDynamicObject obj,
long index) |
static Object |
get(JSDynamicObject obj,
long index,
JSClassProfile jsclassProfile) |
static Object |
get(JSDynamicObject obj,
Object key) |
static Object |
get(JSDynamicObject obj,
Object key,
JSClassProfile jsclassProfile) |
static ScriptArray |
getArray(JSDynamicObject obj) |
static com.oracle.truffle.api.strings.TruffleString |
getClassName(JSDynamicObject obj)
The property [[Class]] of the object.
|
Object |
getIterator(com.oracle.truffle.api.interop.InteropLibrary self,
JSInteropGetIteratorNode getIteratorNode) |
static JSClass |
getJSClass(JSDynamicObject obj) |
static JSContext |
getJSContext(JSDynamicObject obj) |
Class<? extends com.oracle.truffle.api.TruffleLanguage<?>> |
getLanguage() |
static Object |
getMethod(JSDynamicObject obj,
Object name) |
static Object |
getMethod(JSDynamicObject obj,
Object receiver,
Object name) |
static Object |
getOrDefault(JSDynamicObject obj,
long index,
Object receiver,
Object defaultValue) |
static Object |
getOrDefault(JSDynamicObject obj,
long index,
Object receiver,
Object defaultValue,
JSClassProfile jsclassProfile,
com.oracle.truffle.api.nodes.Node encapsulatingNode) |
static Object |
getOrDefault(JSDynamicObject obj,
Object key,
Object receiver,
Object defaultValue) |
static Object |
getOrDefault(JSDynamicObject obj,
Object key,
Object receiver,
Object defaultValue,
JSClassProfile jsclassProfile,
com.oracle.truffle.api.nodes.Node encapsulatingNode) |
static PropertyDescriptor |
getOwnProperty(JSDynamicObject obj,
Object key) |
static PropertyDescriptor |
getOwnProperty(JSDynamicObject obj,
Object key,
JSClassProfile classProfile) |
static JSDynamicObject |
getPrototype(JSDynamicObject obj) |
static JSDynamicObject |
getPrototype(JSDynamicObject obj,
JSClassProfile jsclassProfile) |
static ReadElementNode |
getUncachedRead() |
static WriteElementNode |
getUncachedWrite() |
static Object |
getWithReceiver(JSDynamicObject obj,
Object key,
Object receiver,
com.oracle.truffle.api.nodes.Node encapsulatingNode) |
static boolean |
hasArray(Object obj) |
boolean |
hasIterator(com.oracle.truffle.api.interop.InteropLibrary self,
JSInteropGetIteratorNode getIteratorNode) |
boolean |
hasLanguage() |
boolean |
hasMemberReadSideEffects(String key,
KeyInfoNode keyInfo) |
boolean |
hasMembers() |
boolean |
hasMemberWriteSideEffects(String key,
KeyInfoNode keyInfo) |
static boolean |
hasOwnProperty(JSDynamicObject obj,
long index) |
static boolean |
hasOwnProperty(JSDynamicObject obj,
long index,
JSClassProfile classProfile) |
static boolean |
hasOwnProperty(JSDynamicObject obj,
Object key) |
static boolean |
hasOwnProperty(JSDynamicObject obj,
Object key,
JSClassProfile classProfile) |
static boolean |
hasProperty(JSDynamicObject obj,
long index) |
static boolean |
hasProperty(JSDynamicObject obj,
long index,
JSClassProfile classProfile) |
static boolean |
hasProperty(JSDynamicObject obj,
Object key) |
static boolean |
hasProperty(JSDynamicObject obj,
Object key,
JSClassProfile classProfile) |
Object |
invokeMember(String id,
Object[] args,
com.oracle.truffle.api.interop.InteropLibrary self,
JSInteropInvokeNode callNode,
com.oracle.truffle.api.strings.TruffleString.FromJavaStringNode fromJavaString,
ExportValueNode exportNode) |
static boolean |
isExtensible(JSDynamicObject obj) |
static boolean |
isExtensible(JSDynamicObject obj,
JSClassProfile classProfile) |
static boolean |
isFrozen(JSDynamicObject obj) |
static boolean |
isJSObject(Object object)
Returns whether object is a proper JavaScript Object.
|
boolean |
isMemberInsertable(String key,
KeyInfoNode keyInfo) |
boolean |
isMemberInvocable(String key,
KeyInfoNode keyInfo) |
boolean |
isMemberModifiable(String key,
KeyInfoNode keyInfo) |
boolean |
isMemberReadable(String key,
KeyInfoNode keyInfo) |
boolean |
isMemberRemovable(String key,
KeyInfoNode keyInfo) |
static boolean |
isSealed(JSDynamicObject obj) |
static JavaScriptLanguage |
language(com.oracle.truffle.api.interop.InteropLibrary node) |
static Object |
ordinaryToPrimitive(JSDynamicObject obj,
JSToPrimitiveNode.Hint hint)
ES2018 7.1.1.1 OrdinaryToPrimitive.
|
static List<Object> |
ownPropertyKeys(JSDynamicObject obj)
[[OwnPropertyKeys]].
|
static List<Object> |
ownPropertyKeys(JSDynamicObject obj,
JSClassProfile classProfile) |
static boolean |
preventExtensions(JSDynamicObject obj) |
static boolean |
preventExtensions(JSDynamicObject obj,
boolean doThrow) |
Object |
readMember(String key,
com.oracle.truffle.api.interop.InteropLibrary self,
ReadElementNode readNode,
boolean bindMemberFunctions,
com.oracle.truffle.api.strings.TruffleString.FromJavaStringNode fromJavaString,
ExportValueNode exportNode) |
void |
removeMember(String key,
com.oracle.truffle.api.strings.TruffleString.FromJavaStringNode fromJavaString) |
static boolean |
set(JSDynamicObject obj,
long index,
Object value) |
static boolean |
set(JSDynamicObject obj,
long index,
Object value,
boolean isStrict,
com.oracle.truffle.api.nodes.Node encapsulatingNode) |
static boolean |
set(JSDynamicObject obj,
Object key,
Object value) |
static boolean |
set(JSDynamicObject obj,
Object key,
Object value,
boolean isStrict,
com.oracle.truffle.api.nodes.Node encapsulatingNode) |
static void |
setArray(JSDynamicObject obj,
ScriptArray array) |
static boolean |
setIntegrityLevel(JSDynamicObject obj,
boolean freeze) |
static boolean |
setIntegrityLevel(JSDynamicObject obj,
boolean freeze,
boolean doThrow) |
static boolean |
setPrototype(JSDynamicObject obj,
JSDynamicObject newPrototype) |
static boolean |
setPrototype(JSDynamicObject obj,
JSDynamicObject newPrototype,
JSClassProfile jsclassProfile) |
static boolean |
setWithReceiver(JSDynamicObject obj,
long index,
Object value,
Object receiver,
boolean isStrict,
JSClassProfile classProfile,
com.oracle.truffle.api.nodes.Node encapsulatingNode) |
static boolean |
setWithReceiver(JSDynamicObject obj,
Object key,
Object value,
Object receiver,
boolean isStrict,
JSClassProfile classProfile,
com.oracle.truffle.api.nodes.Node encapsulatingNode)
[[Set]] with a receiver different than the default.
|
static boolean |
testIntegrityLevel(JSDynamicObject obj,
boolean frozen) |
Object |
toDisplayString(boolean allowSideEffects) |
static Object |
toPrimitive(JSDynamicObject obj) |
static Object |
toPrimitive(JSDynamicObject obj,
JSToPrimitiveNode.Hint hint)
ES2015 7.1.1 ToPrimitive in case an Object is passed.
|
void |
writeMember(String key,
Object value,
KeyInfoNode keyInfo,
ImportValueNode castValueNode,
WriteElementNode writeNode,
com.oracle.truffle.api.strings.TruffleString.FromJavaStringNode fromJavaString) |
defaultToString, defineOwnProperty, delete, delete, getBuiltinToStringTag, getClassName, getDynamicType, getHelper, getHelper, getIntOrDefault, getJSClass, getJSContext, getJSSharedData, getKeyArray, getMethodHelper, getObjectFlags, getOrDefault, getOrNull, getOwnHelper, getOwnHelper, getOwnProperty, getOwnPropertyKeys, getProperty, getPropertyArray, getPropertyFlags, getPrototypeOf, getValue, getValue, hasOnlyShapeProperties, hasOwnProperty, hasOwnProperty, hasProperty, hasProperty, identityHashCode, isExtensible, isJSDynamicObject, ownPropertyKeys, preventExtensions, removeKey, set, set, setIntegrityLevel, setJSClass, setObjectFlags, setPropertyFlags, setPrototypeOf, testIntegrityLevel, testProperties, toDisplayStringImpl, updatePropertyFlagspublic static final com.oracle.truffle.api.strings.TruffleString CONSTRUCTOR
public static final com.oracle.truffle.api.strings.TruffleString PROTOTYPE
public static final com.oracle.truffle.api.strings.TruffleString PROTO
public static final com.oracle.truffle.api.object.HiddenKey HIDDEN_PROTO
public static final com.oracle.truffle.api.strings.TruffleString NO_SUCH_PROPERTY_NAME
public static final com.oracle.truffle.api.strings.TruffleString NO_SUCH_METHOD_NAME
protected static final String[] EMPTY_STRING_ARRAY
protected JSObject(com.oracle.truffle.api.object.Shape shape,
JSDynamicObject proto)
protected JSObject copyWithoutProperties(com.oracle.truffle.api.object.Shape shape)
public static boolean isJSObject(Object object)
public final boolean hasMembers()
protected static String[] filterEnumerableNames(JSDynamicObject target, Iterable<Object> ownKeys, JSClass jsclass)
public static JavaScriptLanguage language(com.oracle.truffle.api.interop.InteropLibrary node)
public final Object readMember(String key, com.oracle.truffle.api.interop.InteropLibrary self, ReadElementNode readNode, boolean bindMemberFunctions, com.oracle.truffle.api.strings.TruffleString.FromJavaStringNode fromJavaString, ExportValueNode exportNode) throws com.oracle.truffle.api.interop.UnknownIdentifierException
com.oracle.truffle.api.interop.UnknownIdentifierExceptionpublic final boolean isMemberReadable(String key, KeyInfoNode keyInfo)
public final void writeMember(String key, Object value, KeyInfoNode keyInfo, ImportValueNode castValueNode, WriteElementNode writeNode, com.oracle.truffle.api.strings.TruffleString.FromJavaStringNode fromJavaString) throws com.oracle.truffle.api.interop.UnknownIdentifierException, com.oracle.truffle.api.interop.UnsupportedMessageException
com.oracle.truffle.api.interop.UnknownIdentifierExceptioncom.oracle.truffle.api.interop.UnsupportedMessageExceptionpublic final boolean isMemberModifiable(String key, KeyInfoNode keyInfo)
public final boolean isMemberInsertable(String key, KeyInfoNode keyInfo)
public final void removeMember(String key, com.oracle.truffle.api.strings.TruffleString.FromJavaStringNode fromJavaString) throws com.oracle.truffle.api.interop.UnsupportedMessageException
com.oracle.truffle.api.interop.UnsupportedMessageExceptionpublic final boolean isMemberRemovable(String key, KeyInfoNode keyInfo)
public final Object invokeMember(String id, Object[] args, com.oracle.truffle.api.interop.InteropLibrary self, JSInteropInvokeNode callNode, com.oracle.truffle.api.strings.TruffleString.FromJavaStringNode fromJavaString, ExportValueNode exportNode) throws com.oracle.truffle.api.interop.UnsupportedMessageException, com.oracle.truffle.api.interop.UnknownIdentifierException
com.oracle.truffle.api.interop.UnsupportedMessageExceptioncom.oracle.truffle.api.interop.UnknownIdentifierExceptionpublic final boolean isMemberInvocable(String key, KeyInfoNode keyInfo)
public final boolean hasMemberReadSideEffects(String key, KeyInfoNode keyInfo)
public final boolean hasMemberWriteSideEffects(String key, KeyInfoNode keyInfo)
public boolean hasIterator(com.oracle.truffle.api.interop.InteropLibrary self,
JSInteropGetIteratorNode getIteratorNode)
public Object getIterator(com.oracle.truffle.api.interop.InteropLibrary self, JSInteropGetIteratorNode getIteratorNode) throws com.oracle.truffle.api.interop.UnsupportedMessageException
com.oracle.truffle.api.interop.UnsupportedMessageExceptionpublic final boolean hasLanguage()
public final Class<? extends com.oracle.truffle.api.TruffleLanguage<?>> getLanguage()
public final Object toDisplayString(boolean allowSideEffects)
public static ReadElementNode getUncachedRead()
public static WriteElementNode getUncachedWrite()
public static JSClass getJSClass(JSDynamicObject obj)
public static JSDynamicObject getPrototype(JSDynamicObject obj)
public static JSDynamicObject getPrototype(JSDynamicObject obj, JSClassProfile jsclassProfile)
public static boolean setPrototype(JSDynamicObject obj, JSDynamicObject newPrototype)
public static boolean setPrototype(JSDynamicObject obj, JSDynamicObject newPrototype, JSClassProfile jsclassProfile)
public static Object get(JSDynamicObject obj, long index)
public static Object get(JSDynamicObject obj, Object key)
public static Object getMethod(JSDynamicObject obj, Object name)
public static Object getMethod(JSDynamicObject obj, Object receiver, Object name)
public static boolean set(JSDynamicObject obj, long index, Object value)
public static boolean set(JSDynamicObject obj, Object key, Object value)
public static boolean set(JSDynamicObject obj, long index, Object value, boolean isStrict, com.oracle.truffle.api.nodes.Node encapsulatingNode)
public static boolean set(JSDynamicObject obj, Object key, Object value, boolean isStrict, com.oracle.truffle.api.nodes.Node encapsulatingNode)
public static boolean setWithReceiver(JSDynamicObject obj, Object key, Object value, Object receiver, boolean isStrict, JSClassProfile classProfile, com.oracle.truffle.api.nodes.Node encapsulatingNode)
public static boolean setWithReceiver(JSDynamicObject obj, long index, Object value, Object receiver, boolean isStrict, JSClassProfile classProfile, com.oracle.truffle.api.nodes.Node encapsulatingNode)
public static boolean delete(JSDynamicObject obj, long index)
public static boolean delete(JSDynamicObject obj, long index, boolean isStrict)
public static boolean delete(JSDynamicObject obj, long index, boolean isStrict, JSClassProfile classProfile)
public static boolean delete(JSDynamicObject obj, Object key)
public static boolean delete(JSDynamicObject obj, Object key, boolean isStrict)
public static boolean delete(JSDynamicObject obj, Object key, boolean isStrict, JSClassProfile classProfile)
public static boolean hasOwnProperty(JSDynamicObject obj, long index)
public static boolean hasOwnProperty(JSDynamicObject obj, long index, JSClassProfile classProfile)
public static boolean hasOwnProperty(JSDynamicObject obj, Object key)
public static boolean hasOwnProperty(JSDynamicObject obj, Object key, JSClassProfile classProfile)
public static boolean hasProperty(JSDynamicObject obj, long index)
public static boolean hasProperty(JSDynamicObject obj, long index, JSClassProfile classProfile)
public static boolean hasProperty(JSDynamicObject obj, Object key)
public static boolean hasProperty(JSDynamicObject obj, Object key, JSClassProfile classProfile)
public static PropertyDescriptor getOwnProperty(JSDynamicObject obj, Object key)
public static PropertyDescriptor getOwnProperty(JSDynamicObject obj, Object key, JSClassProfile classProfile)
public static List<Object> ownPropertyKeys(JSDynamicObject obj)
public static List<Object> ownPropertyKeys(JSDynamicObject obj, JSClassProfile classProfile)
public static List<com.oracle.truffle.api.strings.TruffleString> enumerableOwnNames(JSDynamicObject thisObj)
public static boolean defineOwnProperty(JSDynamicObject obj, Object key, PropertyDescriptor desc)
public static boolean defineOwnProperty(JSDynamicObject obj, Object key, PropertyDescriptor desc, boolean doThrow)
public static Object get(JSDynamicObject obj, Object key, JSClassProfile jsclassProfile)
public static Object get(JSDynamicObject obj, long index, JSClassProfile jsclassProfile)
public static Object getOrDefault(JSDynamicObject obj, Object key, Object receiver, Object defaultValue, JSClassProfile jsclassProfile, com.oracle.truffle.api.nodes.Node encapsulatingNode)
public static Object getOrDefault(JSDynamicObject obj, long index, Object receiver, Object defaultValue, JSClassProfile jsclassProfile, com.oracle.truffle.api.nodes.Node encapsulatingNode)
public static Object getOrDefault(JSDynamicObject obj, Object key, Object receiver, Object defaultValue)
public static Object getOrDefault(JSDynamicObject obj, long index, Object receiver, Object defaultValue)
public static Object getWithReceiver(JSDynamicObject obj, Object key, Object receiver, com.oracle.truffle.api.nodes.Node encapsulatingNode)
public static com.oracle.truffle.api.strings.TruffleString defaultToString(JSDynamicObject obj)
public static Object toPrimitive(JSDynamicObject obj, JSToPrimitiveNode.Hint hint)
public static Object toPrimitive(JSDynamicObject obj)
public static Object ordinaryToPrimitive(JSDynamicObject obj, JSToPrimitiveNode.Hint hint)
public static boolean preventExtensions(JSDynamicObject obj)
public static boolean preventExtensions(JSDynamicObject obj, boolean doThrow)
public static boolean isExtensible(JSDynamicObject obj)
public static boolean isExtensible(JSDynamicObject obj, JSClassProfile classProfile)
public static com.oracle.truffle.api.strings.TruffleString getClassName(JSDynamicObject obj)
public static boolean isFrozen(JSDynamicObject obj)
public static boolean isSealed(JSDynamicObject obj)
public static ScriptArray getArray(JSDynamicObject obj)
public static void setArray(JSDynamicObject obj, ScriptArray array)
public static boolean hasArray(Object obj)
public static JSContext getJSContext(JSDynamicObject obj)
public static boolean testIntegrityLevel(JSDynamicObject obj, boolean frozen)
public static boolean setIntegrityLevel(JSDynamicObject obj, boolean freeze)
public static boolean setIntegrityLevel(JSDynamicObject obj, boolean freeze, boolean doThrow)