-
-
Notifications
You must be signed in to change notification settings - Fork 759
refactor(semantic): always use SymbolFlags::Function for function id
#7479
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(semantic): always use SymbolFlags::Function for function id
#7479
Conversation
Your org has enabled the Graphite merge queue for merging into mainAdd the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Instrumentation Performance ReportMerging #7479 will not alter performanceComparing Summary
Benchmarks breakdown
|
SymbolFlags::Function for function id
93b94c7 to
70d22c4
Compare
70d22c4 to
69e66d3
Compare
5acbe14 to
f40c689
Compare
90c06bb to
76d7e62
Compare
Merge activity
|
cd8ff8c to
24da206
Compare
|
Can we possibly discuss this before merging? Personally, I'm not convinced this is a good idea. |
24da206 to
2fb06c0
Compare
|
oxc/crates/oxc_transformer/src/es2017/async_to_generator.rs Lines 368 to 373 in 58a125f
|
#7479) close #7402 related: #7470 The purpose of this PR is to keep the SymbolFlags of the function consistent. Always use `SymbolFlags::Function` for the function id symbol, to avoid adding extra logic to find accurate `SymbolFlags` for the function in `transformer`. This change adds a fallback redeclaration check for case `async function foo() {}; var foo;` in `SemanticBuilder::check_redeclaraion`. No performance difference here because redeclaration is always rare.
78531f5 to
0fa58d7
Compare

close #7402
related: #7470
The purpose of this PR is to keep the SymbolFlags of the function consistent.
Always use
SymbolFlags::Functionfor the function id symbol, to avoid adding extra logic to find accurateSymbolFlagsfor the function intransformer. This change adds a fallback redeclaration check for caseasync function foo() {}; var foo;inSemanticBuilder::check_redeclaraion.No performance difference here because redeclaration is always rare.