public final class JSRuntime extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
arrayIndexLengthInRange(String index) |
static int |
booleanToNumber(boolean value) |
static String |
booleanToString(boolean value) |
static Object |
boxIndex(long longIndex,
com.oracle.truffle.api.profiles.ConditionProfile indexInIntRangeConditionProfile) |
static Object |
call(Object fnObj,
Object holder,
Object[] arguments)
ES2015 7.3.12 Call(F, V, arguments).
|
static Object |
call(Object fnObj,
Object holder,
Object[] arguments,
com.oracle.truffle.api.nodes.Node encapsulatingNode) |
static Object |
canonicalNumericIndexString(String s)
ES2015, 7.1.16 CanonicalNumericIndexString().
|
static long |
castArrayIndex(double doubleValue) |
static long |
castArrayIndex(long longValue) |
static char |
charAt(CharSequence cs,
int index) |
static String |
collectionToConsoleString(com.oracle.truffle.api.object.DynamicObject obj,
String name,
JSHashMap map,
int depth,
boolean allowSideEffects) |
static int |
comparePropertyKeys(Object key1,
Object key2)
Compare property keys such that a stable sort using it would maintain the following order.
|
static Object |
construct(Object fnObj,
Object[] arguments) |
static com.oracle.truffle.api.object.DynamicObject |
createArrayFromList(JSContext context,
List<? extends Object> list)
ES2016 7.3.16 CreateArrayFromList(elements).
|
static boolean |
createDataProperty(com.oracle.truffle.api.object.DynamicObject o,
Object p,
Object v)
ES2015, 7.3.4 CreateDataProperty(O, P, V).
|
static boolean |
createDataProperty(com.oracle.truffle.api.object.DynamicObject o,
Object p,
Object v,
boolean doThrow) |
static boolean |
createDataPropertyOrThrow(com.oracle.truffle.api.object.DynamicObject o,
Object p,
Object v)
ES2015, 7.3.6 CreateDataPropertyOrThrow(O, P, V).
|
static List<Object> |
createListFromArrayLikeAllowSymbolString(Object obj) |
static void |
definePropertyOrThrow(com.oracle.truffle.api.object.DynamicObject o,
Object key,
PropertyDescriptor desc)
ES2016, 7.3.7 DefinePropertyOrThrow(O, P, desc).
|
static boolean |
doubleIsRepresentableAsInt(double d) |
static boolean |
doubleIsRepresentableAsInt(double d,
boolean ignoreNegativeZero) |
static boolean |
doubleIsRepresentableAsLong(double d) |
static boolean |
doubleIsRepresentableAsUnsignedInt(double d,
boolean ignoreNegativeZero) |
static Number |
doubleToNarrowestNumber(double d) |
static String |
doubleToString(double d)
9.8.1 ToString Applied to the Number Type.
|
static String |
doubleToString(double d,
int radix) |
static double |
doubleValue(Number number) |
static double |
doubleValue(Number number,
com.oracle.truffle.api.profiles.BranchProfile profile) |
static double |
doubleValueVirtual(Number number) |
static boolean |
equal(Object a,
Object b) |
static com.oracle.truffle.api.object.DynamicObject |
expectJSObject(Object to,
com.oracle.truffle.api.profiles.BranchProfile errorBranch) |
static Object |
exportValue(Object value)
Convert the value to a type valid in Truffle Interop.
|
static Object[] |
exportValueArray(Object[] arr) |
static int |
firstExpIndexInString(String str)
Returns the first index of a String that contains either 'e' or 'E'.
|
static int |
firstNonWhitespaceIndex(String string,
boolean useLineTerminators) |
static float |
floatValue(Number n) |
static float |
floatValueVirtual(Number n) |
static String |
formatDtoA(double value) |
static String |
formatDtoA(double d,
int radix) |
static String |
formatDtoAExponential(double d) |
static String |
formatDtoAExponential(double d,
int digits) |
static String |
formatDtoAFixed(double value,
int digits) |
static String |
formatDtoAPrecision(double value,
int precision) |
static com.oracle.truffle.api.object.DynamicObject |
fromPropertyDescriptor(PropertyDescriptor desc,
JSContext context) |
static Object |
getArg(Object[] args,
int i,
Object defaultValue) |
static Object |
getArgOrUndefined(Object[] args,
int i) |
static String |
getConstructorName(com.oracle.truffle.api.object.DynamicObject receiver)
Carefully try getting the constructor name, must not throw.
|
static Object |
getDataProperty(com.oracle.truffle.api.object.DynamicObject thisObj,
Object key) |
static GraalJSException |
getException(Object errorObject) |
static JSRealm |
getFunctionRealm(Object obj,
JSContext context) |
static JSRealm |
getFunctionRealm(Object obj,
JSRealm currentRealm) |
static int |
getOffset(int start,
int length,
com.oracle.truffle.api.profiles.ConditionProfile profile) |
static long |
getOffset(long start,
long length,
com.oracle.truffle.api.profiles.ConditionProfile profile) |
static boolean |
identical(Object a,
Object b) |
static double |
identifyInfinity(String str,
char firstChar) |
static Object |
importValue(Object value)
Convert the value to a type valid in Graal.js, from something received via TruffleInterop.
|
static boolean |
intIsRepresentableAsFloat(int value) |
static int |
intValue(Number number) |
static int |
intValueVirtual(Number number) |
static boolean |
isArray(Object obj)
ES2015 7.2.2 IsArray(argument).
|
static boolean |
isArrayIndex(double doubleValue) |
static boolean |
isArrayIndex(int intValue) |
static boolean |
isArrayIndex(long longValue) |
static boolean |
isArrayIndex(Object property) |
static boolean |
isArrayIndex(String property) |
static boolean |
isAsciiDigit(char c) |
static boolean |
isBigInt(Object value) |
static boolean |
isCallable(Object value)
ES2015 7.2.3 IsCallable(argument).
|
static boolean |
isCallableForeign(Object value) |
static boolean |
isCallableIsJSObject(com.oracle.truffle.api.object.DynamicObject value) |
static boolean |
isCallableProxy(com.oracle.truffle.api.object.DynamicObject proxy) |
static boolean |
isConstructor(Object constrObj)
ES2016 7.2.4 IsConstructor().
|
static boolean |
isConstructorForeign(Object value) |
static boolean |
isConstructorProxy(com.oracle.truffle.api.object.DynamicObject constrObj) |
static boolean |
isForeignObject(Object value) |
static boolean |
isForeignObject(com.oracle.truffle.api.interop.TruffleObject value) |
static boolean |
isGenerator(Object genObj) |
static boolean |
isGeneratorProxy(com.oracle.truffle.api.object.DynamicObject genObj) |
static boolean |
isHex(char c) |
static boolean |
isInteger(Object obj)
ES2015, 7.2.6 IsInteger.
|
static boolean |
isIntegerIndex(long longValue) |
static boolean |
isJavaNumber(Object value) |
static boolean |
isJavaPrimitive(Object value) |
static boolean |
isJSFunctionRootNode(com.oracle.truffle.api.nodes.RootNode rootNode) |
static boolean |
isJSNative(Object value)
Is value a native JavaScript object or primitive?
|
static boolean |
isJSPrimitive(Object value) |
static boolean |
isJSRootNode(com.oracle.truffle.api.nodes.RootNode rootNode) |
static boolean |
isLazyString(Object value)
Is value is a
CharSequence that lazily evaluates to a String). |
static boolean |
isNaN(Object value) |
static boolean |
isNegativeZero(double d) |
static boolean |
isNullish(Object value)
Returns whether
value is JS null or undefined or a foreign null. |
static boolean |
isNullOrUndefined(Object value)
Returns whether
value is JS null or undefined. |
static boolean |
isNumber(Object value) |
static boolean |
isObject(Object vo)
Returns whether object is a DynamicObject.
|
static boolean |
isPositiveInfinity(double d) |
static boolean |
isPropertyKey(Object key) |
static boolean |
isPrototypeOf(com.oracle.truffle.api.object.DynamicObject object,
com.oracle.truffle.api.object.DynamicObject prototype) |
static boolean |
isProxyAnArray(com.oracle.truffle.api.object.DynamicObject proxy) |
static boolean |
isRepresentableAsUnsignedInt(long value) |
static boolean |
isRevokedCallableProxy(com.oracle.truffle.api.object.DynamicObject revokedProxy) |
static boolean |
isSafeInteger(double value) |
static boolean |
isSafeInteger(long value) |
static boolean |
isSameValue(Object x,
Object y)
9.12 SameValue Algorithm.
|
static boolean |
isString(Object value)
Is value a native JavaScript string.
|
static boolean |
isStringClass(Class<?> clazz) |
static boolean |
isTypedArrayBigIntFactory(TypedArrayFactory factory) |
static boolean |
isValidArrayLength(double doubleValue) |
static boolean |
isValidArrayLength(int intValue) |
static boolean |
isValidArrayLength(long longValue)
Checks whether a long value is within the valid range of array lengths.
|
static boolean |
isWhiteSpace(char cp) |
static String |
javaArrayToString(Object array) |
static String |
javaToString(Object obj) |
static Object |
jsObjectToJavaObject(Object obj) |
static int |
lastNonWhitespaceIndex(String string,
boolean useLineTerminators) |
static int |
length(CharSequence cs) |
static int |
length(CharSequence cs,
com.oracle.truffle.api.profiles.ConditionProfile stringProfile,
com.oracle.truffle.api.profiles.ConditionProfile lazyStringProfile) |
static boolean |
longIsRepresentableAsInt(long value) |
static Number |
longToIntOrDouble(long value) |
static long |
longValue(Number n) |
static double |
mathCeil(double d) |
static double |
mathFloor(double d) |
static double |
mathRint(double d) |
static Object |
nullToUndefined(Object value) |
static String |
numberToString(Number number) |
static String |
objectToConsoleString(com.oracle.truffle.api.object.DynamicObject obj,
String name,
int depth,
boolean allowSideEffects) |
static String |
objectToConsoleString(com.oracle.truffle.api.object.DynamicObject obj,
String name,
int depth,
String[] internalKeys,
Object[] internalValues,
boolean allowSideEffects) |
static long |
parseArrayIndexRaw(String string)
NB: does not check whether the result fits into the uint32 range.
|
static double |
parseDoubleOrNaN(String input)
|
static double |
parseRawDontFitLong(String string,
int radix,
int startPos,
int endPos,
boolean negate) |
static Number |
parseRawFitsLong(String string,
int radix,
int startPos,
int endPos,
boolean negate) |
static long |
parseSafeInteger(String s) |
static long |
parseSafeInteger(String s,
int beginIndex,
int endIndex,
int radix) |
static Object |
positiveLongToIntOrDouble(long value) |
static boolean |
propertyKeyEquals(Object a,
Object b) |
static long |
propertyKeyToArrayIndex(Object propertyKey) |
static long |
propertyKeyToIntegerIndex(Object propertyKey) |
static long |
propertyNameToArrayIndex(String propertyName) |
static long |
propertyNameToIntegerIndex(String propertyName) |
static String |
quote(String value) |
static <T> T |
requireObjectCoercible(T argument,
JSContext context)
Implementation of the abstract operation RequireObjectCoercible.
|
static <E extends Throwable> |
rethrow(Throwable ex) |
static String |
safeToString(Object value) |
static String |
stringConcat(String first,
String second)
Concatenate two strings, preallocating the buffer with the exact length of the result.
|
static BigInt |
stringToBigInt(String s) |
static Number |
stringToNumber(String string)
Implementation of ECMA 9.3.1 "ToNumber Applied to the String Type".
|
static BigInt |
toBigInt(Object value) |
static boolean |
toBoolean(Number number) |
static boolean |
toBoolean(Object value)
Implementation of ECMA 9.2 "ToBoolean".
|
static String |
toDisplayString(Object value,
boolean allowSideEffects) |
static String |
toDisplayString(Object value,
int currentDepth,
Object parent,
boolean allowSideEffects) |
static String |
toDisplayString(Object value,
int currentDepth,
Object parent,
boolean quoteString,
boolean allowSideEffects) |
static double |
toDouble(Number value)
ToDouble for Numbers.
|
static double |
toDouble(Object value)
Non-standard "ToDouble" utility function.
|
static int |
toInt16(long number) |
static int |
toInt16(Number number) |
static int |
toInt16(Object value)
Implementation of ECMA 7.1.7 "ToInt16".
|
static int |
toInt32(double value) |
static int |
toInt32(Number number)
Convert JS number to int32.
|
static int |
toInt32(Object value)
Implementation of ECMA 9.5 "ToInt32".
|
static int |
toInt32NoTruncate(double value) |
static int |
toInt8(long number) |
static int |
toInt8(Number number) |
static int |
toInt8(Object value)
Implementation of ECMA 7.1.9 "ToInt8".
|
static long |
toInteger(Number number) |
static long |
toInteger(Object value)
Implementation of ECMA 9.4 "ToInteger".
|
static Object |
toJavaNull(Object value) |
static Object |
toJSNull(Object value) |
static double |
toLength(double d) |
static int |
toLength(int value) |
static long |
toLength(long l) |
static long |
toLength(Object value)
Implementation of ECMAScript6 7.1.15 "ToLength".
|
static long |
toLong(Number value)
Convert JS number to long.
|
static Number |
toNumber(Object value)
Implementation of ECMA 9.3 "ToNumber".
|
static Number |
toNumberFromPrimitive(Object value) |
static Object |
toNumeric(Object value) |
static com.oracle.truffle.api.interop.TruffleObject |
toObject(JSContext ctx,
Object value)
Implementation of ECMA 9.9 "ToObject".
|
static com.oracle.truffle.api.interop.TruffleObject |
toObjectFromPrimitive(JSContext ctx,
Object value,
boolean useJavaWrapper) |
static Object |
toPrimitive(Object value)
Implementation of ECMA 7.1.1 "ToPrimitive", with NO hint given.
|
static Object |
toPrimitive(Object value,
String hint)
Implementation of ECMA 7.1.1 "ToPrimitive".
|
static Object |
toPrimitiveFromForeign(Object tObj,
String hint)
Converts a foreign object to a primitive value.
|
static PropertyDescriptor |
toPropertyDescriptor(Object property)
Implementation of the ToPropertyDescriptor function as defined in ECMA 8.10.5.
|
static Object |
toPropertyKey(Object arg)
ES2015 7.1.14 ToPropertyKey(argument).
|
static String |
toString(com.oracle.truffle.api.object.DynamicObject value) |
static String |
toString(Object value)
The abstract operation ToString.
|
static String |
toStringIsString(Object value) |
static JSException |
toStringTypeError(Object value) |
static int |
toUInt16(long number) |
static int |
toUInt16(Number number) |
static int |
toUInt16(Object value)
Implementation of ECMA 9.7 "ToUInt16".
|
static long |
toUInt32(double value) |
static long |
toUInt32(long value) |
static long |
toUInt32(Number number) |
static long |
toUInt32(Object value)
Implementation of ECMA 9.6 "ToUInt32".
|
static long |
toUInt32NoTruncate(double value) |
static int |
toUInt8(long number) |
static int |
toUInt8(Number number) |
static int |
toUInt8(Object value)
Implementation of ECMA 7.1.10 "ToUInt8".
|
static String |
trimJSWhiteSpace(String string) |
static String |
trimJSWhiteSpace(String string,
boolean useLineTerminators) |
static double |
truncateDouble(double value) |
static double |
truncateDouble2(double thing) |
static String |
typeof(Object value) |
static Object |
undefinedToNull(Object value) |
static int |
valueInHex(char c) |
static int |
valueInRadix(char c,
int radix) |
static int |
valueInRadix10(char c) |
public static final String INFINITY_STRING
public static final String NEGATIVE_INFINITY_STRING
public static final String POSITIVE_INFINITY_STRING
public static final String NAN_STRING
public static final double TWO32
public static final char LINE_SEPARATOR
public static final long INVALID_ARRAY_INDEX
public static final long MAX_ARRAY_LENGTH
public static final int MAX_UINT32_DIGITS
public static final double MAX_SAFE_INTEGER
public static final double MIN_SAFE_INTEGER
public static final long MAX_SAFE_INTEGER_LONG
public static final long MIN_SAFE_INTEGER_LONG
public static final long INVALID_INTEGER_INDEX
public static final int MAX_INTEGER_INDEX_DIGITS
public static final int MAX_SAFE_INTEGER_DIGITS
public static final int MAX_SAFE_INTEGER_IN_FLOAT
public static final int MIN_SAFE_INTEGER_IN_FLOAT
public static final long MAX_BIG_INT_EXPONENT
public static final long INVALID_SAFE_INTEGER
public static final String TO_STRING
public static final String VALUE_OF
public static final String VALUE
public static final String DONE
public static final String NEXT
public static final String HINT_STRING
public static final String HINT_NUMBER
public static final String HINT_DEFAULT
public static final String PRIMITIVE_VALUE
public static final com.oracle.truffle.api.object.HiddenKey ITERATED_OBJECT_ID
public static final com.oracle.truffle.api.object.HiddenKey ITERATOR_NEXT_INDEX
public static final com.oracle.truffle.api.object.HiddenKey ENUMERATE_ITERATOR_ID
public static final com.oracle.truffle.api.object.HiddenKey FOR_IN_ITERATOR_ID
public static final com.oracle.truffle.api.object.HiddenKey FINALIZATION_GROUP_CLEANUP_ITERATOR_ID
public static final int ITERATION_KIND_KEY
public static final int ITERATION_KIND_VALUE
public static final int ITERATION_KIND_KEY_PLUS_VALUE
public static final int TO_STRING_MAX_DEPTH
public static boolean doubleIsRepresentableAsInt(double d)
public static boolean doubleIsRepresentableAsInt(double d,
boolean ignoreNegativeZero)
public static boolean doubleIsRepresentableAsUnsignedInt(double d,
boolean ignoreNegativeZero)
public static boolean isNegativeZero(double d)
public static boolean isPositiveInfinity(double d)
public static Number doubleToNarrowestNumber(double d)
public static boolean longIsRepresentableAsInt(long value)
public static boolean isRepresentableAsUnsignedInt(long value)
public static boolean doubleIsRepresentableAsLong(double d)
public static Object positiveLongToIntOrDouble(long value)
public static Number longToIntOrDouble(long value)
public static boolean isNaN(Object value)
public static boolean isObject(Object vo)
public static boolean isNullOrUndefined(Object value)
value is JS null or undefined.public static boolean isNullish(Object value)
value is JS null or undefined or a foreign null.public static Object toPrimitive(Object value)
value - an Object to be converted to a primitive valuepublic static Object toPrimitive(Object value, String hint)
value - an Object to be converted to a primitive valuehint - the preferred type of primitive to return ("number", "string" or "default")public static Object toPrimitiveFromForeign(Object tObj, String hint)
public static boolean toBoolean(Object value)
value - an Object to be converted to a Booleanpublic static boolean toBoolean(Number number)
public static Number toNumber(Object value)
value - an Object to be converted to a Numberpublic static int booleanToNumber(boolean value)
public static boolean isNumber(Object value)
public static boolean isBigInt(Object value)
public static boolean isJavaNumber(Object value)
public static Number stringToNumber(String string)
string - public static double parseDoubleOrNaN(String input)
Double.NaN if not parsable.public static int firstExpIndexInString(String str)
public static double identifyInfinity(String str, char firstChar)
public static long toInteger(Object value)
value - an Object to be converted to an Integerpublic static long toInteger(Number number)
public static long toLength(Object value)
public static double toLength(double d)
public static long toLength(long l)
public static int toLength(int value)
public static int toUInt8(Object value)
value - an Object to be converted to a UInt8public static int toUInt8(Number number)
public static int toUInt8(long number)
public static int toInt8(Object value)
value - an Object to be converted to a Int8public static int toInt8(Number number)
public static int toInt8(long number)
public static int toUInt16(Object value)
value - an Object to be converted to a UInt16public static int toUInt16(Number number)
public static int toUInt16(long number)
public static int toInt16(Object value)
value - an Object to be converted to a Int16public static int toInt16(Number number)
public static int toInt16(long number)
public static long toUInt32(Object value)
value - an Object to be converted to a UInt32public static long toUInt32(Number number)
public static long toUInt32(long value)
public static long toUInt32(double value)
public static long toUInt32NoTruncate(double value)
public static double truncateDouble(double value)
public static double truncateDouble2(double thing)
public static int toInt32(Object value)
value - an Object to be converted to a Int32public static int toInt32(Number number)
public static int toInt32(double value)
public static int toInt32NoTruncate(double value)
public static double toDouble(Object value)
public static double toDouble(Number value)
public static String toString(Object value)
public static String toDisplayString(Object value, int currentDepth, Object parent, boolean allowSideEffects)
public static String toDisplayString(Object value, int currentDepth, Object parent, boolean quoteString, boolean allowSideEffects)
public static String objectToConsoleString(com.oracle.truffle.api.object.DynamicObject obj, String name, int depth, boolean allowSideEffects)
public static String objectToConsoleString(com.oracle.truffle.api.object.DynamicObject obj, String name, int depth, String[] internalKeys, Object[] internalValues, boolean allowSideEffects)
public static String collectionToConsoleString(com.oracle.truffle.api.object.DynamicObject obj, String name, JSHashMap map, int depth, boolean allowSideEffects)
public static JSException toStringTypeError(Object value)
public static String booleanToString(boolean value)
public static String toString(com.oracle.truffle.api.object.DynamicObject value)
public static int length(CharSequence cs)
public static int length(CharSequence cs, com.oracle.truffle.api.profiles.ConditionProfile stringProfile, com.oracle.truffle.api.profiles.ConditionProfile lazyStringProfile)
public static char charAt(CharSequence cs, int index)
public static String doubleToString(double d, int radix)
public static String doubleToString(double d)
public static String formatDtoA(double value)
public static String formatDtoAPrecision(double value, int precision)
public static String formatDtoAExponential(double d, int digits)
public static String formatDtoAExponential(double d)
public static String formatDtoAFixed(double value, int digits)
public static String formatDtoA(double d, int radix)
public static com.oracle.truffle.api.interop.TruffleObject toObject(JSContext ctx, Object value)
value - an Object to be converted to an Objectpublic static com.oracle.truffle.api.interop.TruffleObject toObjectFromPrimitive(JSContext ctx, Object value, boolean useJavaWrapper)
public static boolean isForeignObject(Object value)
public static boolean isForeignObject(com.oracle.truffle.api.interop.TruffleObject value)
public static <T> T requireObjectCoercible(T argument,
JSContext context)
public static PropertyDescriptor toPropertyDescriptor(Object property)
public static int valueInRadix10(char c)
public static int valueInRadix(char c,
int radix)
public static int valueInHex(char c)
public static boolean isHex(char c)
public static long parseArrayIndexRaw(String string)
JSRuntime.isArrayIndex(long)public static int firstNonWhitespaceIndex(String string, boolean useLineTerminators)
public static int lastNonWhitespaceIndex(String string, boolean useLineTerminators)
public static boolean isWhiteSpace(char cp)
public static boolean isValidArrayLength(long longValue)
public static boolean isValidArrayLength(double doubleValue)
public static boolean isValidArrayLength(int intValue)
public static boolean isIntegerIndex(long longValue)
public static boolean isArrayIndex(int intValue)
public static boolean isArrayIndex(long longValue)
public static boolean isArrayIndex(double doubleValue)
public static boolean isArrayIndex(String property)
public static boolean isArrayIndex(Object property)
public static long castArrayIndex(double doubleValue)
public static long castArrayIndex(long longValue)
public static boolean isAsciiDigit(char c)
public static long propertyNameToArrayIndex(String propertyName)
public static boolean arrayIndexLengthInRange(String index)
public static long propertyKeyToArrayIndex(Object propertyKey)
public static long propertyNameToIntegerIndex(String propertyName)
public static long propertyKeyToIntegerIndex(Object propertyKey)
public static boolean isJSNative(Object value)
public static boolean isJSPrimitive(Object value)
public static boolean isString(Object value)
public static boolean isLazyString(Object value)
CharSequence that lazily evaluates to a String).public static boolean isStringClass(Class<?> clazz)
public static boolean isPropertyKey(Object key)
public static Object boxIndex(long longIndex, com.oracle.truffle.api.profiles.ConditionProfile indexInIntRangeConditionProfile)
public static int intValue(Number number)
Number.intValue()public static int intValueVirtual(Number number)
public static double doubleValue(Number number)
Number.doubleValue()public static double doubleValue(Number number, com.oracle.truffle.api.profiles.BranchProfile profile)
public static double doubleValueVirtual(Number number)
public static float floatValue(Number n)
Number.floatValue()public static float floatValueVirtual(Number n)
public static long longValue(Number n)
Number.longValue()public static long toLong(Number value)
public static String stringConcat(String first, String second)
public static com.oracle.truffle.api.object.DynamicObject fromPropertyDescriptor(PropertyDescriptor desc, JSContext context)
public static long getOffset(long start,
long length,
com.oracle.truffle.api.profiles.ConditionProfile profile)
public static int getOffset(int start,
int length,
com.oracle.truffle.api.profiles.ConditionProfile profile)
public static long parseSafeInteger(String s)
public static long parseSafeInteger(String s, int beginIndex, int endIndex, int radix)
public static Number parseRawFitsLong(String string, int radix, int startPos, int endPos, boolean negate)
public static double parseRawDontFitLong(String string, int radix, int startPos, int endPos, boolean negate)
public static boolean createDataProperty(com.oracle.truffle.api.object.DynamicObject o,
Object p,
Object v)
public static boolean createDataProperty(com.oracle.truffle.api.object.DynamicObject o,
Object p,
Object v,
boolean doThrow)
public static boolean createDataPropertyOrThrow(com.oracle.truffle.api.object.DynamicObject o,
Object p,
Object v)
public static void definePropertyOrThrow(com.oracle.truffle.api.object.DynamicObject o,
Object key,
PropertyDescriptor desc)
public static boolean isPrototypeOf(com.oracle.truffle.api.object.DynamicObject object,
com.oracle.truffle.api.object.DynamicObject prototype)
public static com.oracle.truffle.api.object.DynamicObject createArrayFromList(JSContext context, List<? extends Object> list)
public static boolean isCallable(Object value)
public static boolean isCallableIsJSObject(com.oracle.truffle.api.object.DynamicObject value)
public static boolean isCallableForeign(Object value)
public static boolean isCallableProxy(com.oracle.truffle.api.object.DynamicObject proxy)
public static boolean isRevokedCallableProxy(com.oracle.truffle.api.object.DynamicObject revokedProxy)
public static boolean isArray(Object obj)
public static boolean isProxyAnArray(com.oracle.truffle.api.object.DynamicObject proxy)
public static Object call(Object fnObj, Object holder, Object[] arguments)
public static Object call(Object fnObj, Object holder, Object[] arguments, com.oracle.truffle.api.nodes.Node encapsulatingNode)
public static Object canonicalNumericIndexString(String s)
public static boolean isInteger(Object obj)
public static double mathFloor(double d)
public static double mathCeil(double d)
public static double mathRint(double d)
public static int comparePropertyKeys(Object key1, Object key2)
public static String getConstructorName(com.oracle.truffle.api.object.DynamicObject receiver)
public static Object getDataProperty(com.oracle.truffle.api.object.DynamicObject thisObj, Object key)
public static boolean isJSRootNode(com.oracle.truffle.api.nodes.RootNode rootNode)
public static boolean isJSFunctionRootNode(com.oracle.truffle.api.nodes.RootNode rootNode)
public static boolean isSafeInteger(double value)
public static boolean isSafeInteger(long value)
public static boolean isConstructor(Object constrObj)
public static boolean isConstructorForeign(Object value)
public static boolean isConstructorProxy(com.oracle.truffle.api.object.DynamicObject constrObj)
public static boolean isGenerator(Object genObj)
public static boolean isGeneratorProxy(com.oracle.truffle.api.object.DynamicObject genObj)
public static List<Object> createListFromArrayLikeAllowSymbolString(Object obj)
public static com.oracle.truffle.api.object.DynamicObject expectJSObject(Object to, com.oracle.truffle.api.profiles.BranchProfile errorBranch)
public static Object exportValue(Object value)
public static Object importValue(Object value)
public static boolean intIsRepresentableAsFloat(int value)
public static boolean isJavaPrimitive(Object value)
public static <E extends Throwable> RuntimeException rethrow(Throwable ex) throws E extends Throwable
E extends Throwablepublic static boolean isTypedArrayBigIntFactory(TypedArrayFactory factory)
public static GraalJSException getException(Object errorObject)