public class TRegexOptions extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
RegexMaxCacheSize
Maximum number of entries in the global compilation cache in
RegexLanguage. |
static boolean |
TRegexEnableNodeSplitter
Try to make control flow through DFAs reducible by node splitting (see
DFANodeSplit). |
static boolean |
TRegexEnableTraceFinder
Try to pre-calculate results of tree-like expressions (see
NFATraceFinderGenerator). |
static int |
TRegexGenerateDFAThreshold
Number of regex searches done without generating a DFA for a given regular expression.
|
static int |
TRegexMaxDFASize
Bailout threshold for number of nodes in the DFA (
TRegexDFAExecutorNode generated by
DFAGenerator). |
static int |
TRegexMaxDFASizeAfterNodeSplitting
Maximum size of a DFA after being altered by
DFANodeSplit. |
static int |
TRegexMaxNFASize
Bailout threshold for number of nodes in the NFA (
NFA generated by
NFAGenerator). |
static int |
TRegexMaxNumberOfASTSuccessorsInOneASTStep
Bailout threshold for number of ASTSuccessor instances allowed in a single
ASTStep. |
static int |
TRegexMaxNumberOfCaptureGroups
Bailout threshold for number of capture groups.
|
static int |
TRegexMaxNumberOfCaptureGroupsForDFA
Bailout threshold for number of capture groups in the DFA generator.
|
static int |
TRegexMaxNumberOfNFAStatesInOneDFATransition
Maximum number of NFA states involved in one DFA transition.
|
static int |
TRegexMaxParseTreeSizeForDFA
Parser trees bigger than this setting will not be considered for DFA generation.
|
static int |
TRegexParserTreeMaxNumberOfSequencesInGroup
|
static int |
TRegexParserTreeMaxNumberOfTermsInSequence
|
static int |
TRegexParserTreeMaxSize
Bailout threshold for number of nodes in the parser tree (
RegexAST generated by
RegexParser). |
static int |
TRegexQuantifierUnrollThresholdGroup
The parser will try to unroll bounded quantifiers on groups up to this limit.
|
static int |
TRegexQuantifierUnrollThresholdSingleCC
The parser will try to unroll bounded quantifiers on single character classes up to this
limit.
|
static int |
TRegexRangeToBitSetConversionThreshold
Minimum number of ranges that have the same high byte to convert into a bit set in a
RangeListMatcher or
RangeTreeMatcher. |
static int |
TRegexTraceFinderMaxNumberOfResults
Maximum number of pre-calculated results per TraceFinder DFA.
|
| Constructor and Description |
|---|
TRegexOptions() |
public static final int TRegexGenerateDFAThreshold
public static final boolean TRegexEnableTraceFinder
NFATraceFinderGenerator).
A regular expression is considered tree-like if it does not contain infinite loops (+ or *).
This option will increase performance at the cost of startup time and memory usage.public static final int TRegexTraceFinderMaxNumberOfResults
byte in
TraceFinderDFAStateNode, with 255 being reserved for "no result"!public static final boolean TRegexEnableNodeSplitter
DFANodeSplit).
This option will increase performance at the cost of startup time and memory usage.public static final int TRegexMaxDFASizeAfterNodeSplitting
DFANodeSplit.public static final int TRegexRangeToBitSetConversionThreshold
RangeListMatcher or
RangeTreeMatcher. The threshold value must
be greater than 1. Example:
[က-ဠ], [ူ-၀], [ၐ-ၠ]
are three ranges that have the same high byte (0x10).
if TRegexRangeToBitSetConversionThreshold is <= 3, they will be converted to a
bit set if they appear in a RangeList or RangeTree matcher.
public static final int TRegexParserTreeMaxSize
RegexAST generated by
RegexParser).public static final int TRegexParserTreeMaxNumberOfSequencesInGroup
public static final int TRegexParserTreeMaxNumberOfTermsInSequence
public static final int TRegexMaxParseTreeSizeForDFA
graal/com.oracle.truffle.js.test/js/trufflejs/regexp/npm_extracted/hungry-regexp*.jspublic static final int TRegexMaxNFASize
NFA generated by
NFAGenerator). This number must not be higher than Short.MAX_VALUE, because
we use short values for indexing NFA nodes. The current setting is based on run times
of
graal/com.oracle.truffle.js.test/js/trufflejs/regexp/npm_extracted/hungry-regexp*.jspublic static final int TRegexMaxNumberOfASTSuccessorsInOneASTStep
ASTStep.
It is possible to construct patterns where the number of NFA transitions grows exponentially.
ASTStep is an intermediate data structure between the AST and the NFA, which is
filled eagerly and can cause an OutOfMemoryError if not capped. Since ASTSuccessors
roughly correspond to NFA transitions, the cap has been set to the maximum number of NFA
transitions we allow in a single NFA.public static final int TRegexMaxDFASize
TRegexDFAExecutorNode generated by
DFAGenerator). This number must not be higher than Short.MAX_VALUE, because
we use short values for indexing DFA nodes. The current setting is based on run times
of
graal/com.oracle.truffle.js.test/js/trufflejs/regexp/npm_extracted/hungry-regexp*.jspublic static final int RegexMaxCacheSize
RegexLanguage.public static final int TRegexQuantifierUnrollThresholdSingleCC
public static final int TRegexQuantifierUnrollThresholdGroup
public static final int TRegexMaxNumberOfCaptureGroups
public static final int TRegexMaxNumberOfCaptureGroupsForDFA
byte in
DFACaptureGroupPartialTransition!public static final int TRegexMaxNumberOfNFAStatesInOneDFATransition
DFACaptureGroupPartialTransition.