Details
-
Task
-
Resolution: Fixed
-
P4
-
None
-
None
-
b82
Description
runtime.regexp.RegExpScanner currently builds a token tree based on the formal regexp grammar.
This creates a lot of objects even for small patterns. It also makes the code hard to understand because scanning and transformation are separated, and the token tree is hard to inspect and debug.
Since only a few regexp tokens need to be transformed RegExpScanner should perform the transformation in one step, writing directly to a string builder instead of generating an intermediate representation.
This creates a lot of objects even for small patterns. It also makes the code hard to understand because scanning and transformation are separated, and the token tree is hard to inspect and debug.
Since only a few regexp tokens need to be transformed RegExpScanner should perform the transformation in one step, writing directly to a string builder instead of generating an intermediate representation.