Top |
gboolean | jsc_options_set_boolean () |
gboolean | jsc_options_get_boolean () |
gboolean | jsc_options_set_int () |
gboolean | jsc_options_get_int () |
gboolean | jsc_options_set_uint () |
gboolean | jsc_options_get_uint () |
gboolean | jsc_options_set_size () |
gboolean | jsc_options_get_size () |
gboolean | jsc_options_set_double () |
gboolean | jsc_options_get_double () |
gboolean | jsc_options_set_string () |
gboolean | jsc_options_get_string () |
gboolean | jsc_options_set_range_string () |
gboolean | jsc_options_get_range_string () |
gboolean | (*JSCOptionsFunc) () |
void | jsc_options_foreach () |
GOptionGroup * | jsc_options_get_option_group () |
enum | JSCOptionType |
#define | JSC_OPTIONS_USE_JIT |
#define | JSC_OPTIONS_USE_DFG |
#define | JSC_OPTIONS_USE_FTL |
#define | JSC_OPTIONS_USE_LLINT |
JavaScript options allow changing the behavior of the JavaScript engine. They affect the way the engine works, so the options must be set at the very beginning of the program execution, before any other JavaScript API call. Most of the options are only useful for testing and debugging. Only a few of them are documented; you can use the undocumented options at your own risk. (You can find the list of options in the WebKit source code).
The API allows to set and get any option using the types defined in JSCOptionType.
You can also iterate all the available options using jsc_options_foreach()
and
passing a JSCOptionsFunc callback. If your application uses GOptionContext to handle
command line arguments, you can easily integrate the JSCOptions by adding the
GOptionGroup returned by jsc_options_get_option_group()
.
gboolean jsc_options_set_boolean (const char *option
,gboolean value
);
Set option
as a gboolean value.
Since: 2.24
gboolean jsc_options_get_boolean (const char *option
,gboolean *value
);
Get option
as a gboolean value.
Since: 2.24
gboolean jsc_options_set_int (const char *option
,gint value
);
Set option
as a gint value.
Since: 2.24
gboolean jsc_options_get_int (const char *option
,gint *value
);
Get option
as a gint value.
Since: 2.24
gboolean jsc_options_set_uint (const char *option
,guint value
);
Set option
as a guint value.
Since: 2.24
gboolean jsc_options_get_uint (const char *option
,guint *value
);
Get option
as a guint value.
Since: 2.24
gboolean jsc_options_set_size (const char *option
,gsize value
);
Set option
as a gsize value.
Since: 2.24
gboolean jsc_options_get_size (const char *option
,gsize *value
);
Get option
as a gsize value.
Since: 2.24
gboolean jsc_options_set_double (const char *option
,gdouble value
);
Set option
as a gdouble value.
Since: 2.24
gboolean jsc_options_get_double (const char *option
,gdouble *value
);
Get option
as a gdouble value.
Since: 2.24
gboolean jsc_options_set_string (const char *option
,const char *value
);
Set option
as a string.
Since: 2.24
gboolean jsc_options_get_string (const char *option
,char **value
);
Get option
as a string.
Since: 2.24
gboolean jsc_options_set_range_string (const char *option
,const char *value
);
Set option
as a range string. The string must be in the
format [!]<low>[:<high>] where low and high are guint values.
Values between low and high (both included) will be considered in
the range, unless ! is used to invert the range.
Since: 2.24
gboolean jsc_options_get_range_string (const char *option
,char **value
);
Get option
as a range string. The string must be in the
format [!]<low>[:<high>] where low and high are guint values.
Values between low and high (both included) will be considered in
the range, unless ! is used to invert the range.
Since: 2.24
gboolean (*JSCOptionsFunc) (const char *option
,JSCOptionType type
,const char *description
,gpointer user_data
);
Function used to iterate options.
Not that description
string is not localized.
option |
the option name |
|
type |
the option JSCOptionType |
|
description |
the option description, or |
[nullable] |
user_data |
user data |
Since: 2.24
void jsc_options_foreach (JSCOptionsFunc function
,gpointer user_data
);
Iterates all available options calling function
for each one. Iteration can
stop early if function
returns FALSE
.
Since: 2.24
GOptionGroup *
jsc_options_get_option_group (void
);
Create a GOptionGroup to handle JSCOptions as command line arguments.
The options will be exposed as command line arguments with the form
--jsc-<option>=<value>.
Each entry in the returned GOptionGroup is 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.
Since: 2.24
#define JSC_OPTIONS_USE_JIT "useJIT"
Allows the executable pages to be allocated for JIT and thunks if TRUE
.
Option type: JSC_OPTION_BOOLEAN
Default value: TRUE
.
Since: 2.24
#define JSC_OPTIONS_USE_DFG "useDFGJIT"
Allows the DFG JIT to be used if TRUE
.
Option type: JSC_OPTION_BOOLEAN
Default value: TRUE
.
Since: 2.24
#define JSC_OPTIONS_USE_FTL "useFTLJIT"
Allows the FTL JIT to be used if TRUE
.
Option type: JSC_OPTION_BOOLEAN
Default value: TRUE
.
Since: 2.24
#define JSC_OPTIONS_USE_LLINT "useLLInt"
Allows the LLINT to be used if TRUE
.
Option type: JSC_OPTION_BOOLEAN
Default value: TRUE
.
Since: 2.24