-
-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(parser): remove TokenValue::RegExp
from Token
#1926
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
aa6aa76
to
9fac4e4
Compare
Token
CodSpeed Performance ReportMerging #1926 will not alter performanceComparing Summary
|
It looks like this change breaks some cases. |
Base automatically changed from
01-07-refactor_parser_parse_BigInt_lazily
to
main
January 8, 2024 04:37
This PR is part of #1880. `Token` size is reduced from 48 to 40 bytes. To reconstruct the regex pattern and flags within the parser , the regex string is re-parsed from the end by reading all valid flags. In order to make things work nicely, the lexer will no longer recover from a invalid regex.
9fac4e4
to
27c3023
Compare
Token
TokenValue::RegExp
from Token
Closed
Boshen
pushed a commit
that referenced
this pull request
Jan 12, 2024
#1926 produced a small performance regression because when parsing a regexp, some work is repeated.
Boshen
pushed a commit
that referenced
this pull request
Jan 12, 2024
As discussed in #1999 (comment), this PR restores some of regex parsing behavior to as it was prior to #1926.
1 task
IWANABETHATGUY
pushed a commit
to IWANABETHATGUY/oxc
that referenced
this pull request
May 29, 2024
…#1926) This PR is part of oxc-project#1880. `Token` size is reduced from 48 to 40 bytes. To reconstruct the regex pattern and flags within the parser , the regex string is re-parsed from the end by reading all valid flags. In order to make things work nicely, the lexer will no longer recover from a invalid regex.
IWANABETHATGUY
pushed a commit
to IWANABETHATGUY/oxc
that referenced
this pull request
May 29, 2024
oxc-project#1926 produced a small performance regression because when parsing a regexp, some work is repeated.
IWANABETHATGUY
pushed a commit
to IWANABETHATGUY/oxc
that referenced
this pull request
May 29, 2024
As discussed in oxc-project#1999 (comment), this PR restores some of regex parsing behavior to as it was prior to oxc-project#1926.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is part of #1880.
Token
size is reduced from 48 to 40 bytes.To reconstruct the regex pattern and flags within the parser , the regex string is
re-parsed from the end by reading all valid flags.
In order to make things work nicely, the lexer will no longer recover
from a invalid regex.