Class JSProperty
java.lang.Object
com.oracle.truffle.js.runtime.objects.JSProperty
Property objects represent the mapping between low-level stores and high-level data. The simplest
Property could be nothing more than a map of one index to one property's value, but abstracting
the interface allows for getter/setter methods, type-checked properties, and other such
specialized and language-specific behavior.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intJS accessor property (implies not a data property).static final intUsed for global scope const bindings.static final intModule namespace object export binding (special data property).static final intSpecial JS data property using internalPropertyProxyaccessor. -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringgetAttributeString(com.oracle.truffle.api.object.Property property, boolean positive) static PropertyProxygetConstantProxy(com.oracle.truffle.api.object.Property proxyProperty) static ObjectgetValue(com.oracle.truffle.api.object.Property property, JSDynamicObject store, Object thisObj, com.oracle.truffle.api.nodes.Node encapsulatingNode) Get the value assigned to this property in the given object and store.static booleanisAccessor(int flags) static booleanisAccessor(com.oracle.truffle.api.object.Property property) static booleanisConfigurable(int flags) static booleanisConfigurable(com.oracle.truffle.api.object.Property property) static booleanisConst(int flags) static booleanisConst(com.oracle.truffle.api.object.Property property) static booleanisData(int flags) static booleanisData(com.oracle.truffle.api.object.Property property) static booleanisDataSpecial(int flags) static booleanisDataSpecial(com.oracle.truffle.api.object.Property property) static booleanisEnumerable(int flags) static booleanisEnumerable(com.oracle.truffle.api.object.Property property) static booleanisModuleNamespaceExport(int flags) static booleanisModuleNamespaceExport(com.oracle.truffle.api.object.Property property) static booleanisProxy(int flags) static booleanisProxy(com.oracle.truffle.api.object.Property property) static booleanisWritable(int flags) static booleanisWritable(com.oracle.truffle.api.object.Property property) static booleansetValue(com.oracle.truffle.api.object.Property property, JSDynamicObject store, Object thisObj, Object value, boolean isStrict, com.oracle.truffle.api.nodes.Node encapsulatingNode) Set the value assigned to this property in the given object and store.static StringtoString(com.oracle.truffle.api.object.Property property)
-
Field Details
-
ACCESSOR
public static final int ACCESSORJS accessor property (implies not a data property).- See Also:
-
PROXY
public static final int PROXYSpecial JS data property using internalPropertyProxyaccessor.- See Also:
-
CONST
public static final int CONSTUsed for global scope const bindings.- See Also:
-
MODULE_NAMESPACE_EXPORT
public static final int MODULE_NAMESPACE_EXPORTModule namespace object export binding (special data property).- See Also:
-
-
Method Details
-
toString
-
getAttributeString
protected static String getAttributeString(com.oracle.truffle.api.object.Property property, boolean positive) -
getValue
public static Object getValue(com.oracle.truffle.api.object.Property property, JSDynamicObject store, Object thisObj, com.oracle.truffle.api.nodes.Node encapsulatingNode) Get the value assigned to this property in the given object and store.- Parameters:
store- the store that this property's value resides inthisObj- the object that this property was found in- Returns:
- the value assigned to this property
-
setValue
public static boolean setValue(com.oracle.truffle.api.object.Property property, JSDynamicObject store, Object thisObj, Object value, boolean isStrict, com.oracle.truffle.api.nodes.Node encapsulatingNode) Set the value assigned to this property in the given object and store.- Parameters:
store- the store that this property's value resides inthisObj- the object that this property was found invalue- the value to assign to this propertyisStrict- whether the set is in a strict mode function
-
isConfigurable
public static boolean isConfigurable(com.oracle.truffle.api.object.Property property) -
isEnumerable
public static boolean isEnumerable(com.oracle.truffle.api.object.Property property) -
isWritable
public static boolean isWritable(com.oracle.truffle.api.object.Property property) -
isProxy
public static boolean isProxy(com.oracle.truffle.api.object.Property property) -
isAccessor
public static boolean isAccessor(com.oracle.truffle.api.object.Property property) -
isData
public static boolean isData(com.oracle.truffle.api.object.Property property) -
isConst
public static boolean isConst(com.oracle.truffle.api.object.Property property) -
isModuleNamespaceExport
public static boolean isModuleNamespaceExport(com.oracle.truffle.api.object.Property property) -
isDataSpecial
public static boolean isDataSpecial(com.oracle.truffle.api.object.Property property) -
isConfigurable
public static boolean isConfigurable(int flags) -
isEnumerable
public static boolean isEnumerable(int flags) -
isWritable
public static boolean isWritable(int flags) -
isProxy
public static boolean isProxy(int flags) -
isAccessor
public static boolean isAccessor(int flags) -
isData
public static boolean isData(int flags) -
isConst
public static boolean isConst(int flags) -
isModuleNamespaceExport
public static boolean isModuleNamespaceExport(int flags) -
isDataSpecial
public static boolean isDataSpecial(int flags) -
getConstantProxy
-