public final class CompilerSettings
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
INITIAL_CALL_SITE_DEPTH
Hack to set the initial "depth" for the
DefBootstrap.PIC and DefBootstrap.MIC. |
static java.lang.String |
MAX_LOOP_COUNTER
Constant to be used when specifying the maximum loop counter when compiling a script.
|
static java.lang.String |
PICKY
Constant to be used for enabling additional internal compilation checks (slower).
|
static <any> |
REGEX_ENABLED
Are regexes enabled? This is a node level setting because regexes break out of painless's lovely sandbox and can cause stack
overflows and we can't analyze the regex to be sure it won't.
|
| Constructor and Description |
|---|
CompilerSettings() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
areRegexesEnabled()
Are regexes enabled? They are currently disabled by default because they break out of the loop counter and even fairly simple
looking regexes can cause stack overflows.
|
int |
getInitialCallSiteDepth()
Returns initial call site depth.
|
int |
getMaxLoopCounter()
Returns the value for the cumulative total number of statements that can be made in all loops
in a script before an exception is thrown.
|
boolean |
isPicky()
Returns true if the compiler should be picky.
|
void |
setInitialCallSiteDepth(int depth)
For testing megamorphic fallbacks.
|
void |
setMaxLoopCounter(int max)
Set the cumulative total number of statements that can be made in all loops.
|
void |
setPicky(boolean picky)
Set to true if compilation should be picky.
|
void |
setRegexesEnabled(boolean regexesEnabled)
Are regexes enabled? They are currently disabled by default because they break out of the loop counter and even fairly simple
looking regexes can cause stack overflows.
|
public static final <any> REGEX_ENABLED
public static final java.lang.String MAX_LOOP_COUNTER
public static final java.lang.String PICKY
public static final java.lang.String INITIAL_CALL_SITE_DEPTH
DefBootstrap.PIC and DefBootstrap.MIC. Only used for testing: do not
overwrite.public int getMaxLoopCounter()
public void setMaxLoopCounter(int max)
getMaxLoopCounter()public boolean isPicky()
public void setPicky(boolean picky)
isPicky()public int getInitialCallSiteDepth()
public void setInitialCallSiteDepth(int depth)
getInitialCallSiteDepth()public boolean areRegexesEnabled()
public void setRegexesEnabled(boolean regexesEnabled)