public final class JSString extends JSPrimitive implements JSConstructorFactory.WithFunctions
| Type | Property and Description |
|---|---|
boolean |
usesOrdinaryGetOwn |
| Modifier and Type | Class and Description |
|---|---|
static class |
JSString.StringLengthProxyProperty |
JSConstructorFactory.Default, JSConstructorFactory.WithFunctions, JSConstructorFactory.WithFunctionsAndSpecies| Modifier and Type | Field and Description |
|---|---|
static com.oracle.truffle.api.strings.TruffleString |
CLASS_NAME |
static com.oracle.truffle.api.strings.TruffleString |
CLASS_NAME_EXTENSIONS |
static JSString |
INSTANCE |
static com.oracle.truffle.api.strings.TruffleString |
LENGTH |
static com.oracle.truffle.api.strings.TruffleString |
PROTOTYPE_NAME |
static com.oracle.truffle.api.strings.TruffleString |
REGEXP_ITERATOR_CLASS_NAME |
static com.oracle.truffle.api.object.HiddenKey |
REGEXP_ITERATOR_DONE_ID |
static com.oracle.truffle.api.object.HiddenKey |
REGEXP_ITERATOR_GLOBAL_ID |
static com.oracle.truffle.api.object.HiddenKey |
REGEXP_ITERATOR_ITERATED_STRING_ID |
static com.oracle.truffle.api.object.HiddenKey |
REGEXP_ITERATOR_ITERATING_REGEXP_ID |
static com.oracle.truffle.api.strings.TruffleString |
REGEXP_ITERATOR_PROTOTYPE_NAME |
static com.oracle.truffle.api.object.HiddenKey |
REGEXP_ITERATOR_UNICODE_ID |
static com.oracle.truffle.api.strings.TruffleString |
TRIM_END |
static com.oracle.truffle.api.strings.TruffleString |
TRIM_LEFT |
static com.oracle.truffle.api.strings.TruffleString |
TRIM_RIGHT |
static com.oracle.truffle.api.strings.TruffleString |
TRIM_START |
static com.oracle.truffle.api.strings.TruffleString |
TYPE_NAME |
GET_SYMBOL_SPECIES_NAME| Modifier and Type | Method and Description |
|---|---|
static JSStringObject |
create(JSContext context,
JSRealm realm,
JSDynamicObject proto,
com.oracle.truffle.api.strings.TruffleString value) |
static JSStringObject |
create(JSContext context,
JSRealm realm,
com.oracle.truffle.api.strings.TruffleString value) |
static JSConstructor |
createConstructor(JSRealm realm) |
JSDynamicObject |
createPrototype(JSRealm realm,
JSFunctionObject ctor) |
boolean |
defineOwnProperty(JSDynamicObject thisObj,
Object key,
PropertyDescriptor desc,
boolean doThrow)
9.1.6 [[DefineOwnProperty]] (P, Desc).
|
boolean |
delete(JSDynamicObject thisObj,
Object key,
boolean isStrict)
9.1.10 [[Delete]] (P).
|
com.oracle.truffle.api.strings.TruffleString |
getBuiltinToStringTag(JSDynamicObject object)
Returns builtinTag from step 14 of ES6+ 19.1.3.6.
|
com.oracle.truffle.api.strings.TruffleString |
getClassName() |
com.oracle.truffle.api.strings.TruffleString |
getClassName(JSDynamicObject object)
The [[Class]] internal property.
|
JSDynamicObject |
getIntrinsicDefaultProto(JSRealm realm)
Allows invokevirtual of this method instead of invokeinterface.
|
Object |
getOwnHelper(JSDynamicObject store,
Object thisObj,
long index,
com.oracle.truffle.api.nodes.Node encapsulatingNode)
Like getOwnProperty, but returns
null if value is not present instead of undefined. |
Object |
getOwnHelper(JSDynamicObject store,
Object thisObj,
Object key,
com.oracle.truffle.api.nodes.Node encapsulatingNode)
Like getOwnProperty, but returns
null if value is not present instead of undefined. |
PropertyDescriptor |
getOwnProperty(JSDynamicObject thisObj,
Object key)
9.1.5 [[GetOwnProperty]] (P).
|
List<Object> |
getOwnPropertyKeys(JSDynamicObject thisObj,
boolean strings,
boolean symbols)
GetOwnPropertyKeys (O, type).
|
static com.oracle.truffle.api.strings.TruffleString |
getString(JSDynamicObject obj) |
static int |
getStringLength(JSDynamicObject obj) |
boolean |
hasOwnProperty(JSDynamicObject thisObj,
long index) |
boolean |
hasOwnProperty(JSDynamicObject thisObj,
Object key) |
static boolean |
isJSString(Object obj) |
com.oracle.truffle.api.object.Shape |
makeInitialShape(JSContext context,
JSDynamicObject prototype) |
boolean |
set(JSDynamicObject thisObj,
long index,
Object value,
Object receiver,
boolean isStrict,
com.oracle.truffle.api.nodes.Node encapsulatingNode) |
boolean |
set(JSDynamicObject thisObj,
Object key,
Object value,
Object receiver,
boolean isStrict,
com.oracle.truffle.api.nodes.Node encapsulatingNode)
9.1.9 [[Set]] (P, V, Receiver).
|
static PropertyDescriptor |
stringGetIndexProperty(JSDynamicObject thisObj,
Object key)
ES6, 9.4.3.1.1 StringGetIndexProperty (S, P).
|
com.oracle.truffle.api.strings.TruffleString |
toDisplayStringImpl(JSDynamicObject obj,
boolean allowSideEffects,
ToDisplayStringFormat format,
int depth)
A more informative toString variant, mainly used for error messages.
|
boolean |
usesOrdinaryGetOwnProperty() |
getHelper, getMethodHelpercheckProtoCycle, createSymbolSpeciesGetterFunction, delete, deletePropertyDefault, getHelper, getPrototypeOf, hasOnlyShapeProperties, hasProperty, hasProperty, invokeAccessorPropertySetter, isExtensible, ordinaryGetOwnProperty, ordinaryGetOwnPropertyIntl, ordinaryIsExtensible, ordinaryOwnPropertyKeys, ordinaryOwnPropertyKeys, ordinaryOwnPropertyKeysSlow, ordinarySet, ordinarySetIndex, ordinarySetWithReceiver, performOrdinarySetWithOwnDescriptor, preventExtensions, preventExtensionsImpl, putConstructorSpeciesGetter, setIntegrityLevel, setIntegrityLevelFast, setPropertySlow, setPrototypeOf, testIntegrityLevel, testIntegrityLevelFast, toString, usesOrdinaryIsExtensibledefaultToString, filterOwnPropertyKeys, formatToString, get, get, getToStringTag, isInstance, isInstance, isInstance, isInstance, ownPropertyKeys, testIntegrityLevelDefaultclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateConstructorAndPrototypecreateConstructorObject, fillConstructorpublic boolean usesOrdinaryGetOwnProperty
usesOrdinaryGetOwnProperty in class JSNonProxypublic static final JSString INSTANCE
public static final com.oracle.truffle.api.strings.TruffleString TYPE_NAME
public static final com.oracle.truffle.api.strings.TruffleString CLASS_NAME
public static final com.oracle.truffle.api.strings.TruffleString PROTOTYPE_NAME
public static final com.oracle.truffle.api.strings.TruffleString CLASS_NAME_EXTENSIONS
public static final com.oracle.truffle.api.strings.TruffleString LENGTH
public static final com.oracle.truffle.api.strings.TruffleString REGEXP_ITERATOR_CLASS_NAME
public static final com.oracle.truffle.api.strings.TruffleString REGEXP_ITERATOR_PROTOTYPE_NAME
public static final com.oracle.truffle.api.object.HiddenKey REGEXP_ITERATOR_ITERATING_REGEXP_ID
public static final com.oracle.truffle.api.object.HiddenKey REGEXP_ITERATOR_ITERATED_STRING_ID
public static final com.oracle.truffle.api.object.HiddenKey REGEXP_ITERATOR_GLOBAL_ID
public static final com.oracle.truffle.api.object.HiddenKey REGEXP_ITERATOR_UNICODE_ID
public static final com.oracle.truffle.api.object.HiddenKey REGEXP_ITERATOR_DONE_ID
public static final com.oracle.truffle.api.strings.TruffleString TRIM_START
public static final com.oracle.truffle.api.strings.TruffleString TRIM_END
public static final com.oracle.truffle.api.strings.TruffleString TRIM_LEFT
public static final com.oracle.truffle.api.strings.TruffleString TRIM_RIGHT
public static JSStringObject create(JSContext context, JSRealm realm, com.oracle.truffle.api.strings.TruffleString value)
public static JSStringObject create(JSContext context, JSRealm realm, JSDynamicObject proto, com.oracle.truffle.api.strings.TruffleString value)
public boolean hasOwnProperty(JSDynamicObject thisObj, Object key)
hasOwnProperty in class JSNonProxypublic static com.oracle.truffle.api.strings.TruffleString getString(JSDynamicObject obj)
public static int getStringLength(JSDynamicObject obj)
public boolean hasOwnProperty(JSDynamicObject thisObj, long index)
hasOwnProperty in class JSNonProxypublic Object getOwnHelper(JSDynamicObject store, Object thisObj, Object key, com.oracle.truffle.api.nodes.Node encapsulatingNode)
JSNonProxynull if value is not present instead of undefined.getOwnHelper in class JSNonProxypublic Object getOwnHelper(JSDynamicObject store, Object thisObj, long index, com.oracle.truffle.api.nodes.Node encapsulatingNode)
JSNonProxynull if value is not present instead of undefined.getOwnHelper in class JSNonProxypublic boolean set(JSDynamicObject thisObj, Object key, Object value, Object receiver, boolean isStrict, com.oracle.truffle.api.nodes.Node encapsulatingNode)
JSClassset in class JSNonProxypublic boolean set(JSDynamicObject thisObj, long index, Object value, Object receiver, boolean isStrict, com.oracle.truffle.api.nodes.Node encapsulatingNode)
set in class JSNonProxypublic List<Object> getOwnPropertyKeys(JSDynamicObject thisObj, boolean strings, boolean symbols)
JSClassgetOwnPropertyKeys in class JSNonProxypublic boolean delete(JSDynamicObject thisObj, Object key, boolean isStrict)
JSClassdelete in class JSNonProxypublic JSDynamicObject createPrototype(JSRealm realm, JSFunctionObject ctor)
createPrototype in interface JSConstructorFactorypublic com.oracle.truffle.api.object.Shape makeInitialShape(JSContext context, JSDynamicObject prototype)
makeInitialShape in class JSClasspublic static JSConstructor createConstructor(JSRealm realm)
public com.oracle.truffle.api.strings.TruffleString getClassName()
getClassName in interface JSConstructorFactorypublic com.oracle.truffle.api.strings.TruffleString getClassName(JSDynamicObject object)
JSClassgetClassName in class JSClassobject - object to be usedpublic com.oracle.truffle.api.strings.TruffleString getBuiltinToStringTag(JSDynamicObject object)
JSClassgetBuiltinToStringTag in class JSNonProxyobject - object to be usedJSClass.defaultToString(JSDynamicObject)public com.oracle.truffle.api.strings.TruffleString toDisplayStringImpl(JSDynamicObject obj, boolean allowSideEffects, ToDisplayStringFormat format, int depth)
JSClasstoDisplayStringImpl in class JSNonProxyformat - formatting parametersdepth - current nesting depthpublic static boolean isJSString(Object obj)
public PropertyDescriptor getOwnProperty(JSDynamicObject thisObj, Object key)
JSClassgetOwnProperty in class JSNonProxypublic boolean usesOrdinaryGetOwnProperty()
usesOrdinaryGetOwnProperty in class JSNonProxypublic boolean defineOwnProperty(JSDynamicObject thisObj, Object key, PropertyDescriptor desc, boolean doThrow)
JSClassdefineOwnProperty in class JSNonProxypublic static PropertyDescriptor stringGetIndexProperty(JSDynamicObject thisObj, Object key)
public JSDynamicObject getIntrinsicDefaultProto(JSRealm realm)
JSClassPrototypeSupplier.getIntrinsicDefaultProto in interface PrototypeSuppliergetIntrinsicDefaultProto in class JSClassPrototypeSupplier.getIntrinsicDefaultProto(com.oracle.truffle.js.runtime.JSRealm)