Class JavaScriptCore
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intLike jsc_get_major_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.static final intLike jsc_get_micro_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.static final intLike jsc_get_minor_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.static final StringAllows the DFG JIT to be used iftrue.static final StringAllows the FTL JIT to be used iftrue.static final StringAllows the executable pages to be allocated for JIT and thunks iftrue.static final StringAllows the LLINT to be used iftrue. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intReturns the major version number of the JavaScriptCore library.static intReturns the micro version number of the JavaScriptCore library.static intReturns the minor version number of the JavaScriptCore library.static voidstatic voidoptionsForeach(@Nullable OptionsFunc function) Iterates all available options callingfunctionfor each one.static booleanoptionsGetBoolean(String option, Out<Boolean> value) Getoptionas agbooleanvalue.static booleanoptionsGetDouble(String option, Out<Double> value) Getoptionas agdoublevalue.static booleanoptionsGetInt(String option, Out<Integer> value) Getoptionas agintvalue.static OptionGroupCreate aGOptionGroupto handle JSCOptions as command line arguments.static booleanoptionsGetRangeString(String option, Out<String> value) Getoptionas a range string.static booleanoptionsGetSize(String option, Out<Long> value) Getoptionas agsizevalue.static booleanoptionsGetString(String option, Out<String> value) Getoptionas a string.static booleanoptionsGetUint(String option, Out<Integer> value) Getoptionas aguintvalue.static booleanoptionsSetBoolean(String option, boolean value) Setoptionas agbooleanvalue.static booleanoptionsSetDouble(String option, double value) Setoptionas agdoublevalue.static booleanoptionsSetInt(String option, int value) Setoptionas agintvalue.static booleanoptionsSetRangeString(String option, String value) Setoptionas a range string.static booleanoptionsSetSize(String option, long value) Setoptionas agsizevalue.static booleanoptionsSetString(String option, String value) Setoptionas a string.static booleanoptionsSetUint(String option, int value) Setoptionas aguintvalue.
-
Field Details
-
MAJOR_VERSION
public static final int MAJOR_VERSIONLike jsc_get_major_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.- See Also:
-
MICRO_VERSION
public static final int MICRO_VERSIONLike jsc_get_micro_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.- See Also:
-
MINOR_VERSION
public static final int MINOR_VERSIONLike jsc_get_minor_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.- See Also:
-
OPTIONS_USE_DFG
- Since:
- 2.24
- See Also:
-
OPTIONS_USE_FTL
- Since:
- 2.24
- See Also:
-
OPTIONS_USE_JIT
Allows the executable pages to be allocated for JIT and thunks iftrue. Option type:OptionType.BOOLEANDefault value:true.- Since:
- 2.24
- See Also:
-
OPTIONS_USE_LLINT
- Since:
- 2.24
- See Also:
-
-
Constructor Details
-
JavaScriptCore
public JavaScriptCore()
-
-
Method Details
-
javagi$ensureInitialized
public static void javagi$ensureInitialized() -
getMajorVersion
public static int getMajorVersion()Returns the major version number of the JavaScriptCore library. (e.g. in JavaScriptCore version 1.8.3 this is 1.)This function is in the library, so it represents the JavaScriptCore library your code is running against. Contrast with the
JSC_MAJOR_VERSIONmacro, which represents the major version of the JavaScriptCore headers you have included when compiling your code.- Returns:
- the major version number of the JavaScriptCore library
-
getMicroVersion
public static int getMicroVersion()Returns the micro version number of the JavaScriptCore library. (e.g. in JavaScriptCore version 1.8.3 this is 3.)This function is in the library, so it represents the JavaScriptCore library your code is running against. Contrast with the
JSC_MICRO_VERSIONmacro, which represents the micro version of the JavaScriptCore headers you have included when compiling your code.- Returns:
- the micro version number of the JavaScriptCore library
-
getMinorVersion
public static int getMinorVersion()Returns the minor version number of the JavaScriptCore library. (e.g. in JavaScriptCore version 1.8.3 this is 8.)This function is in the library, so it represents the JavaScriptCore library your code is running against. Contrast with the
JSC_MINOR_VERSIONmacro, which represents the minor version of the JavaScriptCore headers you have included when compiling your code.- Returns:
- the minor version number of the JavaScriptCore library
-
optionsForeach
Iterates all available options callingfunctionfor each one. Iteration can stop early iffunctionreturnsfalse.- Parameters:
function- aJSCOptionsFunccallback- Since:
- 2.24
-
optionsGetBoolean
-
optionsGetDouble
-
optionsGetInt
-
optionsGetOptionGroup
Create aGOptionGroupto handle JSCOptions as command line arguments. The options will be exposed as command line arguments with the form <emphasis>--jsc-<option>=<value></emphasis>. Each entry in the returnedGOptionGroupis configured to apply the corresponding option during command line parsing. Applications only need to pass the returned group to g_option_context_add_group(), and the rest will be taken care for automatically.- Returns:
- a
GOptionGroupfor the JSCOptions - Since:
- 2.24
-
optionsGetRangeString
Getoptionas a range string. The string must be in the format <emphasis>[!]<low>[:<high>]</emphasis> where low and high areguintvalues. Values between low and high (both included) will be considered in the range, unless <emphasis>!</emphasis> is used to invert the range.- Parameters:
option- the option identifiervalue- return location for the option value- Returns:
trueifvaluehas been set orfalseif the option doesn't exist- Since:
- 2.24
-
optionsGetSize
-
optionsGetString
-
optionsGetUint
-
optionsSetBoolean
Setoptionas agbooleanvalue.- Parameters:
option- the option identifiervalue- the value to set- Returns:
trueif option was correctly set orfalseotherwise.- Since:
- 2.24
-
optionsSetDouble
Setoptionas agdoublevalue.- Parameters:
option- the option identifiervalue- the value to set- Returns:
trueif option was correctly set orfalseotherwise.- Since:
- 2.24
-
optionsSetInt
Setoptionas agintvalue.- Parameters:
option- the option identifiervalue- the value to set- Returns:
trueif option was correctly set orfalseotherwise.- Since:
- 2.24
-
optionsSetRangeString
Setoptionas a range string. The string must be in the format <emphasis>[!]<low>[:<high>]</emphasis> where low and high areguintvalues. Values between low and high (both included) will be considered in the range, unless <emphasis>!</emphasis> is used to invert the range.- Parameters:
option- the option identifiervalue- the value to set- Returns:
trueif option was correctly set orfalseotherwise.- Since:
- 2.24
-
optionsSetSize
Setoptionas agsizevalue.- Parameters:
option- the option identifiervalue- the value to set- Returns:
trueif option was correctly set orfalseotherwise.- Since:
- 2.24
-
optionsSetString
-
optionsSetUint
Setoptionas aguintvalue.- Parameters:
option- the option identifiervalue- the value to set- Returns:
trueif option was correctly set orfalseotherwise.- Since:
- 2.24
-