| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
// Lazy compilation implies this function already passed the PreParser.This isn't entirely technically correct. It was either parsed or preparsed. Either way, the ParseBase has seen this literal before and has already called ValidateRegExpLiteral on it.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +2 |
// Lazy compilation implies this function already passed the PreParser.This isn't entirely technically correct. It was either parsed or preparsed. Either way, the ParseBase has seen this literal before and has already called ValidateRegExpLiteral on it.
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
3 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: src/parsing/parser-base.h
Insertions: 1, Deletions: 3.
@@ -2063,9 +2063,7 @@
RegExpFlags flags,
RegExpError* regexp_error) {
if (this->flags().is_lazy_compile()) {
- // Lazy compilation implies this function already passed the PreParser.
- // Since the PreParser throws early SyntaxErrors for invalid RegExp
- // literals, we know they are guaranteed to be valid here.
+ // Lazy compilation implies this has already been validated.
return true;
}
```
[parser] Skip redundant re-parsed RegExp validation
During lazy compilation, the full parser redundantly re-validates the
syntax of RegExp literals. However, a SharedFunctionInfo can only be
created if the function's source code was successfully parsed during a
previous compilation phase.
This yields a 6% performance gain for prismjs-startup-es6 on Jetstream3.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |