Skip to content
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

perf(semantic): calculate number of nodes, scopes, symbols, references before visiting AST #4367

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

Dunqing
Copy link
Member

@Dunqing Dunqing commented Jul 19, 2024

context: #4328

Copy link

graphite-app bot commented Jul 19, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “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.

Copy link

codspeed-hq bot commented Jul 19, 2024

CodSpeed Performance Report

Merging #4367 will improve performances by 29.98%

Comparing test-visit (40f9356) with main (910f2a0)

Summary

⚡ 12 improvements
✅ 20 untouched benchmarks

Benchmarks breakdown

Benchmark main test-visit Change
minifier[antd.js] 343.9 ms 303.9 ms +13.15%
minifier[react.development.js] 3.9 ms 3.5 ms +10.68%
minifier[typescript.js] 690.4 ms 615.1 ms +12.24%
semantic[RadixUIAdoptionSection.jsx] 107.6 µs 102.4 µs +5.1%
semantic[antd.js] 174.6 ms 134.3 ms +29.98%
semantic[cal.com.tsx] 56.5 ms 48.7 ms +16.18%
semantic[checker.ts] 103.9 ms 82.9 ms +25.29%
semantic[pdf.mjs] 26.6 ms 22.1 ms +20.58%
transformer[antd.js] 297.9 ms 257.6 ms +15.63%
transformer[cal.com.tsx] 75.8 ms 65.4 ms +15.91%
transformer[checker.ts] 170.2 ms 151.7 ms +12.17%
transformer[pdf.mjs] 46.1 ms 39.8 ms +15.65%

@DonIsaac
Copy link
Collaborator

Please hold on from merging this for a few days; I'm testing some things out locally.

@Dunqing Dunqing marked this pull request as draft July 19, 2024 16:17
Dunqing pushed a commit that referenced this pull request Jul 19, 2024
The visit was missing previously, though it didn't matter, because semantic doesn't do anything with `Hashbang` anyway. But is needed for #4367.
@DonIsaac
Copy link
Collaborator

NVM, storing statistics in AstBuilder is more trouble than it's worth. Borrow checking woes. Merge whenever.

@overlookmotel
Copy link
Collaborator

Can I make 1 suggestion: Before we get to point of merging, I'd suggest temporarily changing the debug_assert!s to assert!s so conformance suite runs with those assertions active (conformance is compiled in release mode so debug_assert! won't run). If there are any more counter bugs lurking, that'd likely flush them out.

@Dunqing
Copy link
Member Author

Dunqing commented Jul 21, 2024

Can I make 1 suggestion: Before we get to point of merging, I'd suggest temporarily changing the debug_assert!s to assert!s so conformance suite runs with those assertions active (conformance is compiled in release mode so debug_assert! won't run). If there are any more counter bugs lurking, that'd likely flush them out.

Good suggestion! I saw you already retain debug_assert! in conformance in #4386. So do I need to change anything else?

@overlookmotel
Copy link
Collaborator

Good suggestion! I saw you already retain debug_assert! in conformance in #4386. So do I need to change anything else?

#4386 is now merged, so my previous comment is now irrelevant. If you rebase on main, it'll reveal whether anything in the conformance tests causes the counts to be wrong.

@Dunqing Dunqing marked this pull request as ready for review July 22, 2024 07:19
@overlookmotel
Copy link
Collaborator

Conformance passes! I'll take a look at this shortly.

@Dunqing
Copy link
Member Author

Dunqing commented Jul 22, 2024

Conformance passes! I'll take a look at this shortly.

Feel free to add more docs to this PR if you want

@overlookmotel
Copy link
Collaborator

@Dunqing I'd like to suggest a bunch of changes which are all cosmetic - just naming and comments etc.

Rather than writing them up as a review, would you mind if I just push a bunch of commits to this branch? You can revert any you don't like.

@Dunqing
Copy link
Member Author

Dunqing commented Jul 22, 2024

@Dunqing I'd like to suggest a bunch of changes which are all cosmetic - just naming and comments etc.

Rather than writing them up as a review, would you mind if I just push a bunch of commits to this branch? You can revert any you don't like.

Go for it. I always like your revised code.😁

@overlookmotel
Copy link
Collaborator

overlookmotel commented Jul 22, 2024

Thanks. I've pushed 10 commits. Please take a look and see if you're happy with them.

Now the cosmetic stuff is done, I'm reviewing the meat of the PR. Please don't merge yet.

@overlookmotel
Copy link
Collaborator

@Dunqing I've reviewed the whole PR and tested out the wacky parts with e.g. <foo.bar />, <foo:bar /> and enum X { [f()] = 1, 'Q1' = 2 }. Counts are still accurate in these edge case - it all seems to work!

If you're happy with the changes in extra commits I pushed, please go ahead and merge. If you're not, please let me know (do feel free to argue if you don't like what I've done).

@Dunqing
Copy link
Member Author

Dunqing commented Jul 22, 2024

If you're happy with the changes in extra commits I pushed, please go ahead and merge. If you're not, please let me know (do feel free to argue if you don't like what I've done).

I am happy with your changes!! Let's merge it

@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Jul 22, 2024
Copy link

graphite-app bot commented Jul 22, 2024

Merge activity

  • Jul 22, 6:46 AM EDT: The merge label 'merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jul 22, 6:46 AM EDT: Dunqing added this pull request to the Graphite merge queue.
  • Jul 22, 6:50 AM EDT: Dunqing merged this pull request with the Graphite merge queue.

@graphite-app graphite-app bot merged commit 40f9356 into main Jul 22, 2024
22 checks passed
@graphite-app graphite-app bot deleted the test-visit branch July 22, 2024 10:50
@overlookmotel
Copy link
Collaborator

30% speed-up landed! 🎉 🎉 🎉 Nice one Dunqing.

@github-actions github-actions bot mentioned this pull request Jul 22, 2024
Dunqing pushed a commit that referenced this pull request Jul 23, 2024
## [0.22.0] - 2024-07-22

- 85a7cea semantic: [**BREAKING**] Remove name from `reference` (#4329)
(Dunqing)

- f68b659 ast: [**BREAKING**] Reorder fields of
`ArrowFunctionExpression` (#4364) (Dunqing)

### Features

- d345b84 ast: Add `#[ast]` attribute to non-visited AST types. (#4309)
(rzvxa)
- 3c0c709 linter: Add typescript-eslint/no-extraneous-class (#4357)
(Jaden Rodriguez)
- 0deb027 minfier: Dce `if (xxx) else if (false) { REMOVE }` (#4407)
(Boshen)
- e33ec18 minifier: Compress `typeof foo == "undefined"` into `typeof
foo > "u"` (#4412) (Boshen)- 6068e6b Add error codes to OxcDiagnostic
(#4334) (DonIsaac)

### Bug Fixes

- aece1df ast: Visit `Program`s `hashbang` field first (#4368)
(overlookmotel)
- 44a10c4 codegen: Object shorthand with parens `({x: (x)})` -> `({ x
})` (#4391) (Boshen)
- 3d88f20 codegen: Print shorthand for all `{ x }` variants (#4374)
(Boshen)
- e624dff codegen,mangler: Do not print shorthand for `ObjectProperty`
(#4350) (Boshen)
- 267f7c4 minifier: Skip `Object.defineProperty(exports, ...)` for
`cjs-module-lexer` (#4409) (Boshen)
- bc8d4e5 semantic: Correct comment (#4410) (overlookmotel)
- 6ffce86 semantic: Align `visit_arrow_function_expression` field visit
order with ast (#4366) (Dunqing)
- 4cd5df0 sourcemap: Avoid negative line if token_chunks has same
prev_dst_line (#4348) (underfin)
- f8565ae transformer/typescript: Unexpectedly removed class binding
from ExportNamedDeclaration (#4351) (Dunqing)- ea33f94 Impl
PartialEq<str> for CompactStr (#4352) (DonIsaac)

### Performance

- 1b51511 semantic: Use `Atom` instead of `CompactStr` for
`UnresolvedReferencesStack` (#4401) (Dunqing)
- 40f9356 semantic: Calculate number of nodes, scopes, symbols,
references before visiting AST (#4367) (Dunqing)
- da13d93 semantic: Remove bounds checks on unresolved references stack
(#4390) (overlookmotel)
- e70c67b semantic: Remove a branch from `add_scope` (#4384)
(overlookmotel)
- 402006f semantic: Simplify logic in `enter_scope` + `leave_scope`
(#4383) (overlookmotel)
- 7469e01 semantic: Remove branch from `Nodes::add_node` (#4361)
(overlookmotel)
- 7eb2864 traverse: Speed up finding UID binding name (#4356)
(overlookmotel)- a207923 Replace some CompactStr usages with Cows
(#4377) (DonIsaac)

### Refactor

- d213773 ast: Replace serde rename "lowercase" with "camelCase" (#4376)
(overlookmotel)
- abfccbd ast: Reduce `#[cfg_attr]` boilerplate in AST type defs (#4375)
(overlookmotel)
- 5f1c7ec ast: Rename the `visited_node` marker to `ast`. (#4289)
(rzvxa)
- 58f6ec2 ast: Enter node before scope (#4347) (Dunqing)
- 59aea73 ast: Scope is created only if CatchClause has param (#4346)
(Dunqing)
- 7a3e925 ast_codegen: Better visit marker parsing. (#4371) (rzvxa)
- 7a75e0f linter: Use diagnostic codes in lint rules (#4349) (DonIsaac)
- a2eabe1 parser: Use error codes for ts diagnostics (#4335) (DonIsaac)
- 5d77b36 semantic: `visit_program` visit `hashbang` field (#4370)
(overlookmotel)
- f7b9ada semantic: `Program` visitor leave scope before node (#4369)
(overlookmotel)
- 729b288 semantic: Shorten code (#4358) (overlookmotel)
- 21d0eee semantic: Use error codes for ts diagnostics (#4336)
(DonIsaac)

Co-authored-by: Boshen <Boshen@users.noreply.github.com>
@github-actions github-actions bot mentioned this pull request Jul 23, 2024
Dunqing pushed a commit that referenced this pull request Jul 23, 2024
## [0.22.0] - 2024-07-23

- 85a7cea semantic: [**BREAKING**] Remove name from `reference` (#4329)
(Dunqing)

- f68b659 ast: [**BREAKING**] Reorder fields of
`ArrowFunctionExpression` (#4364) (Dunqing)

### Features

- d345b84 ast: Add `#[ast]` attribute to non-visited AST types. (#4309)
(rzvxa)
- 3c0c709 linter: Add typescript-eslint/no-extraneous-class (#4357)
(Jaden Rodriguez)
- 68efcd4 linter/react-perf: Handle new objects and arrays in prop
assignment patterns (#4396) (DonIsaac)
- 0deb027 minfier: Dce `if (xxx) else if (false) { REMOVE }` (#4407)
(Boshen)
- e33ec18 minifier: Compress `typeof foo == "undefined"` into `typeof
foo > "u"` (#4412) (Boshen)- 6068e6b Add error codes to OxcDiagnostic
(#4334) (DonIsaac)

### Bug Fixes

- aece1df ast: Visit `Program`s `hashbang` field first (#4368)
(overlookmotel)
- 44a10c4 codegen: Object shorthand with parens `({x: (x)})` -> `({ x
})` (#4391) (Boshen)
- 3d88f20 codegen: Print shorthand for all `{ x }` variants (#4374)
(Boshen)
- e624dff codegen,mangler: Do not print shorthand for `ObjectProperty`
(#4350) (Boshen)
- ac08de8 linter/react_perf: Allow new objects, array, fns, etc in top
scope (#4395) (DonIsaac)
- 267f7c4 minifier: Skip `Object.defineProperty(exports, ...)` for
`cjs-module-lexer` (#4409) (Boshen)
- bc8d4e5 semantic: Correct comment (#4410) (overlookmotel)
- 6ffce86 semantic: Align `visit_arrow_function_expression` field visit
order with ast (#4366) (Dunqing)
- 4cd5df0 sourcemap: Avoid negative line if token_chunks has same
prev_dst_line (#4348) (underfin)
- f8565ae transformer/typescript: Unexpectedly removed class binding
from ExportNamedDeclaration (#4351) (Dunqing)- ea33f94 Impl
PartialEq<str> for CompactStr (#4352) (DonIsaac)

### Performance

- 1b51511 semantic: Use `Atom` instead of `CompactStr` for
`UnresolvedReferencesStack` (#4401) (Dunqing)
- 40f9356 semantic: Calculate number of nodes, scopes, symbols,
references before visiting AST (#4367) (Dunqing)
- da13d93 semantic: Remove bounds checks on unresolved references stack
(#4390) (overlookmotel)
- e70c67b semantic: Remove a branch from `add_scope` (#4384)
(overlookmotel)
- 402006f semantic: Simplify logic in `enter_scope` + `leave_scope`
(#4383) (overlookmotel)
- 7469e01 semantic: Remove branch from `Nodes::add_node` (#4361)
(overlookmotel)
- 7eb2864 traverse: Speed up finding UID binding name (#4356)
(overlookmotel)- a207923 Replace some CompactStr usages with Cows
(#4377) (DonIsaac)

### Refactor

- d213773 ast: Replace serde rename "lowercase" with "camelCase" (#4376)
(overlookmotel)
- abfccbd ast: Reduce `#[cfg_attr]` boilerplate in AST type defs (#4375)
(overlookmotel)
- 5f1c7ec ast: Rename the `visited_node` marker to `ast`. (#4289)
(rzvxa)
- 58f6ec2 ast: Enter node before scope (#4347) (Dunqing)
- 59aea73 ast: Scope is created only if CatchClause has param (#4346)
(Dunqing)
- 7a3e925 ast_codegen: Better visit marker parsing. (#4371) (rzvxa)
- 7a75e0f linter: Use diagnostic codes in lint rules (#4349) (DonIsaac)
- a2eabe1 parser: Use error codes for ts diagnostics (#4335) (DonIsaac)
- 5d77b36 semantic: `visit_program` visit `hashbang` field (#4370)
(overlookmotel)
- f7b9ada semantic: `Program` visitor leave scope before node (#4369)
(overlookmotel)
- 729b288 semantic: Shorten code (#4358) (overlookmotel)
- 21d0eee semantic: Use error codes for ts diagnostics (#4336)
(DonIsaac)

Co-authored-by: Boshen <Boshen@users.noreply.github.com>
@oxc-bot oxc-bot mentioned this pull request Jul 23, 2024
DonIsaac pushed a commit that referenced this pull request Jul 23, 2024
## [0.22.0] - 2024-07-22

- 85a7cea semantic: [**BREAKING**] Remove name from `reference` (#4329)
(Dunqing)

- f68b659 ast: [**BREAKING**] Reorder fields of
`ArrowFunctionExpression` (#4364) (Dunqing)

### Features

- d345b84 ast: Add `#[ast]` attribute to non-visited AST types. (#4309)
(rzvxa)
- 3c0c709 linter: Add typescript-eslint/no-extraneous-class (#4357)
(Jaden Rodriguez)
- 0deb027 minfier: Dce `if (xxx) else if (false) { REMOVE }` (#4407)
(Boshen)
- e33ec18 minifier: Compress `typeof foo == "undefined"` into `typeof
foo > "u"` (#4412) (Boshen)- 6068e6b Add error codes to OxcDiagnostic
(#4334) (DonIsaac)

### Bug Fixes

- aece1df ast: Visit `Program`s `hashbang` field first (#4368)
(overlookmotel)
- 44a10c4 codegen: Object shorthand with parens `({x: (x)})` -> `({ x
})` (#4391) (Boshen)
- 3d88f20 codegen: Print shorthand for all `{ x }` variants (#4374)
(Boshen)
- e624dff codegen,mangler: Do not print shorthand for `ObjectProperty`
(#4350) (Boshen)
- 267f7c4 minifier: Skip `Object.defineProperty(exports, ...)` for
`cjs-module-lexer` (#4409) (Boshen)
- bc8d4e5 semantic: Correct comment (#4410) (overlookmotel)
- 6ffce86 semantic: Align `visit_arrow_function_expression` field visit
order with ast (#4366) (Dunqing)
- 4cd5df0 sourcemap: Avoid negative line if token_chunks has same
prev_dst_line (#4348) (underfin)
- f8565ae transformer/typescript: Unexpectedly removed class binding
from ExportNamedDeclaration (#4351) (Dunqing)- ea33f94 Impl
PartialEq<str> for CompactStr (#4352) (DonIsaac)

### Performance

- 1b51511 semantic: Use `Atom` instead of `CompactStr` for
`UnresolvedReferencesStack` (#4401) (Dunqing)
- 40f9356 semantic: Calculate number of nodes, scopes, symbols,
references before visiting AST (#4367) (Dunqing)
- da13d93 semantic: Remove bounds checks on unresolved references stack
(#4390) (overlookmotel)
- e70c67b semantic: Remove a branch from `add_scope` (#4384)
(overlookmotel)
- 402006f semantic: Simplify logic in `enter_scope` + `leave_scope`
(#4383) (overlookmotel)
- 7469e01 semantic: Remove branch from `Nodes::add_node` (#4361)
(overlookmotel)
- 7eb2864 traverse: Speed up finding UID binding name (#4356)
(overlookmotel)- a207923 Replace some CompactStr usages with Cows
(#4377) (DonIsaac)

### Refactor

- d213773 ast: Replace serde rename "lowercase" with "camelCase" (#4376)
(overlookmotel)
- abfccbd ast: Reduce `#[cfg_attr]` boilerplate in AST type defs (#4375)
(overlookmotel)
- 5f1c7ec ast: Rename the `visited_node` marker to `ast`. (#4289)
(rzvxa)
- 58f6ec2 ast: Enter node before scope (#4347) (Dunqing)
- 59aea73 ast: Scope is created only if CatchClause has param (#4346)
(Dunqing)
- 7a3e925 ast_codegen: Better visit marker parsing. (#4371) (rzvxa)
- 7a75e0f linter: Use diagnostic codes in lint rules (#4349) (DonIsaac)
- a2eabe1 parser: Use error codes for ts diagnostics (#4335) (DonIsaac)
- 5d77b36 semantic: `visit_program` visit `hashbang` field (#4370)
(overlookmotel)
- f7b9ada semantic: `Program` visitor leave scope before node (#4369)
(overlookmotel)
- 729b288 semantic: Shorten code (#4358) (overlookmotel)
- 21d0eee semantic: Use error codes for ts diagnostics (#4336)
(DonIsaac)

Co-authored-by: Boshen <Boshen@users.noreply.github.com>
DonIsaac pushed a commit that referenced this pull request Jul 23, 2024
## [0.22.0] - 2024-07-23

- 85a7cea semantic: [**BREAKING**] Remove name from `reference` (#4329)
(Dunqing)

- f68b659 ast: [**BREAKING**] Reorder fields of
`ArrowFunctionExpression` (#4364) (Dunqing)

### Features

- d345b84 ast: Add `#[ast]` attribute to non-visited AST types. (#4309)
(rzvxa)
- 3c0c709 linter: Add typescript-eslint/no-extraneous-class (#4357)
(Jaden Rodriguez)
- 68efcd4 linter/react-perf: Handle new objects and arrays in prop
assignment patterns (#4396) (DonIsaac)
- 0deb027 minfier: Dce `if (xxx) else if (false) { REMOVE }` (#4407)
(Boshen)
- e33ec18 minifier: Compress `typeof foo == "undefined"` into `typeof
foo > "u"` (#4412) (Boshen)- 6068e6b Add error codes to OxcDiagnostic
(#4334) (DonIsaac)

### Bug Fixes

- aece1df ast: Visit `Program`s `hashbang` field first (#4368)
(overlookmotel)
- 44a10c4 codegen: Object shorthand with parens `({x: (x)})` -> `({ x
})` (#4391) (Boshen)
- 3d88f20 codegen: Print shorthand for all `{ x }` variants (#4374)
(Boshen)
- e624dff codegen,mangler: Do not print shorthand for `ObjectProperty`
(#4350) (Boshen)
- ac08de8 linter/react_perf: Allow new objects, array, fns, etc in top
scope (#4395) (DonIsaac)
- 267f7c4 minifier: Skip `Object.defineProperty(exports, ...)` for
`cjs-module-lexer` (#4409) (Boshen)
- bc8d4e5 semantic: Correct comment (#4410) (overlookmotel)
- 6ffce86 semantic: Align `visit_arrow_function_expression` field visit
order with ast (#4366) (Dunqing)
- 4cd5df0 sourcemap: Avoid negative line if token_chunks has same
prev_dst_line (#4348) (underfin)
- f8565ae transformer/typescript: Unexpectedly removed class binding
from ExportNamedDeclaration (#4351) (Dunqing)- ea33f94 Impl
PartialEq<str> for CompactStr (#4352) (DonIsaac)

### Performance

- 1b51511 semantic: Use `Atom` instead of `CompactStr` for
`UnresolvedReferencesStack` (#4401) (Dunqing)
- 40f9356 semantic: Calculate number of nodes, scopes, symbols,
references before visiting AST (#4367) (Dunqing)
- da13d93 semantic: Remove bounds checks on unresolved references stack
(#4390) (overlookmotel)
- e70c67b semantic: Remove a branch from `add_scope` (#4384)
(overlookmotel)
- 402006f semantic: Simplify logic in `enter_scope` + `leave_scope`
(#4383) (overlookmotel)
- 7469e01 semantic: Remove branch from `Nodes::add_node` (#4361)
(overlookmotel)
- 7eb2864 traverse: Speed up finding UID binding name (#4356)
(overlookmotel)- a207923 Replace some CompactStr usages with Cows
(#4377) (DonIsaac)

### Refactor

- d213773 ast: Replace serde rename "lowercase" with "camelCase" (#4376)
(overlookmotel)
- abfccbd ast: Reduce `#[cfg_attr]` boilerplate in AST type defs (#4375)
(overlookmotel)
- 5f1c7ec ast: Rename the `visited_node` marker to `ast`. (#4289)
(rzvxa)
- 58f6ec2 ast: Enter node before scope (#4347) (Dunqing)
- 59aea73 ast: Scope is created only if CatchClause has param (#4346)
(Dunqing)
- 7a3e925 ast_codegen: Better visit marker parsing. (#4371) (rzvxa)
- 7a75e0f linter: Use diagnostic codes in lint rules (#4349) (DonIsaac)
- a2eabe1 parser: Use error codes for ts diagnostics (#4335) (DonIsaac)
- 5d77b36 semantic: `visit_program` visit `hashbang` field (#4370)
(overlookmotel)
- f7b9ada semantic: `Program` visitor leave scope before node (#4369)
(overlookmotel)
- 729b288 semantic: Shorten code (#4358) (overlookmotel)
- 21d0eee semantic: Use error codes for ts diagnostics (#4336)
(DonIsaac)

Co-authored-by: Boshen <Boshen@users.noreply.github.com>
Dunqing pushed a commit that referenced this pull request Jul 24, 2024
## [0.22.0] - 2024-07-23

- 85a7cea semantic: [**BREAKING**] Remove name from `reference` (#4329)
(Dunqing)

- f68b659 ast: [**BREAKING**] Reorder fields of
`ArrowFunctionExpression` (#4364) (Dunqing)

### Features

- d345b84 ast: Add `#[ast]` attribute to non-visited AST types. (#4309)
(rzvxa)
- 3c0c709 linter: Add typescript-eslint/no-extraneous-class (#4357)
(Jaden Rodriguez)
- 68efcd4 linter/react-perf: Handle new objects and arrays in prop
assignment patterns (#4396) (DonIsaac)
- 0deb027 minfier: Dce `if (xxx) else if (false) { REMOVE }` (#4407)
(Boshen)
- e33ec18 minifier: Compress `typeof foo == "undefined"` into `typeof
foo > "u"` (#4412) (Boshen)- 6068e6b Add error codes to OxcDiagnostic
(#4334) (DonIsaac)

### Bug Fixes

- aece1df ast: Visit `Program`s `hashbang` field first (#4368)
(overlookmotel)
- 44a10c4 codegen: Object shorthand with parens `({x: (x)})` -> `({ x
})` (#4391) (Boshen)
- 3d88f20 codegen: Print shorthand for all `{ x }` variants (#4374)
(Boshen)
- e624dff codegen,mangler: Do not print shorthand for `ObjectProperty`
(#4350) (Boshen)
- ac08de8 linter/react_perf: Allow new objects, array, fns, etc in top
scope (#4395) (DonIsaac)
- 267f7c4 minifier: Skip `Object.defineProperty(exports, ...)` for
`cjs-module-lexer` (#4409) (Boshen)
- bc8d4e5 semantic: Correct comment (#4410) (overlookmotel)
- 6ffce86 semantic: Align `visit_arrow_function_expression` field visit
order with ast (#4366) (Dunqing)
- 4cd5df0 sourcemap: Avoid negative line if token_chunks has same
prev_dst_line (#4348) (underfin)
- f8565ae transformer/typescript: Unexpectedly removed class binding
from ExportNamedDeclaration (#4351) (Dunqing)- ea33f94 Impl
PartialEq<str> for CompactStr (#4352) (DonIsaac)

### Performance

- 1b51511 semantic: Use `Atom` instead of `CompactStr` for
`UnresolvedReferencesStack` (#4401) (Dunqing)
- 40f9356 semantic: Calculate number of nodes, scopes, symbols,
references before visiting AST (#4367) (Dunqing)
- da13d93 semantic: Remove bounds checks on unresolved references stack
(#4390) (overlookmotel)
- e70c67b semantic: Remove a branch from `add_scope` (#4384)
(overlookmotel)
- 402006f semantic: Simplify logic in `enter_scope` + `leave_scope`
(#4383) (overlookmotel)
- 7469e01 semantic: Remove branch from `Nodes::add_node` (#4361)
(overlookmotel)
- 7eb2864 traverse: Speed up finding UID binding name (#4356)
(overlookmotel)- a207923 Replace some CompactStr usages with Cows
(#4377) (DonIsaac)

### Refactor

- 504daed allocator: Rename fn params for `Box::new_in` (#4431)
(overlookmotel)
- d213773 ast: Replace serde rename "lowercase" with "camelCase" (#4376)
(overlookmotel)
- abfccbd ast: Reduce `#[cfg_attr]` boilerplate in AST type defs (#4375)
(overlookmotel)
- 5f1c7ec ast: Rename the `visited_node` marker to `ast`. (#4289)
(rzvxa)
- 58f6ec2 ast: Enter node before scope (#4347) (Dunqing)
- 59aea73 ast: Scope is created only if CatchClause has param (#4346)
(Dunqing)
- 7a3e925 ast_codegen: Better visit marker parsing. (#4371) (rzvxa)
- 0e1ea90 isolated-declarations: Remove useless code from scope (#4420)
(Dunqing)
- 7a75e0f linter: Use diagnostic codes in lint rules (#4349) (DonIsaac)
- a2eabe1 parser: Use error codes for ts diagnostics (#4335) (DonIsaac)
- 5d77b36 semantic: `visit_program` visit `hashbang` field (#4370)
(overlookmotel)
- f7b9ada semantic: `Program` visitor leave scope before node (#4369)
(overlookmotel)
- 729b288 semantic: Shorten code (#4358) (overlookmotel)
- 21d0eee semantic: Use error codes for ts diagnostics (#4336)
(DonIsaac)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
DonIsaac pushed a commit that referenced this pull request Jul 24, 2024
- 85a7cea semantic: [**BREAKING**] Remove name from `reference` (#4329)
(Dunqing)

- f68b659 ast: [**BREAKING**] Reorder fields of
`ArrowFunctionExpression` (#4364) (Dunqing)

- d345b84 ast: Add `#[ast]` attribute to non-visited AST types. (#4309)
(rzvxa)
- 3c0c709 linter: Add typescript-eslint/no-extraneous-class (#4357)
(Jaden Rodriguez)
- 68efcd4 linter/react-perf: Handle new objects and arrays in prop
assignment patterns (#4396) (DonIsaac)
- 0deb027 minfier: Dce `if (xxx) else if (false) { REMOVE }` (#4407)
(Boshen)
- e33ec18 minifier: Compress `typeof foo == "undefined"` into `typeof
foo > "u"` (#4412) (Boshen)- 6068e6b Add error codes to OxcDiagnostic
(#4334) (DonIsaac)

- aece1df ast: Visit `Program`s `hashbang` field first (#4368)
(overlookmotel)
- 44a10c4 codegen: Object shorthand with parens `({x: (x)})` -> `({ x
})` (#4391) (Boshen)
- 3d88f20 codegen: Print shorthand for all `{ x }` variants (#4374)
(Boshen)
- e624dff codegen,mangler: Do not print shorthand for `ObjectProperty`
(#4350) (Boshen)
- ac08de8 linter/react_perf: Allow new objects, array, fns, etc in top
scope (#4395) (DonIsaac)
- 267f7c4 minifier: Skip `Object.defineProperty(exports, ...)` for
`cjs-module-lexer` (#4409) (Boshen)
- bc8d4e5 semantic: Correct comment (#4410) (overlookmotel)
- 6ffce86 semantic: Align `visit_arrow_function_expression` field visit
order with ast (#4366) (Dunqing)
- 4cd5df0 sourcemap: Avoid negative line if token_chunks has same
prev_dst_line (#4348) (underfin)
- f8565ae transformer/typescript: Unexpectedly removed class binding
from ExportNamedDeclaration (#4351) (Dunqing)- ea33f94 Impl
PartialEq<str> for CompactStr (#4352) (DonIsaac)

- 1b51511 semantic: Use `Atom` instead of `CompactStr` for
`UnresolvedReferencesStack` (#4401) (Dunqing)
- 40f9356 semantic: Calculate number of nodes, scopes, symbols,
references before visiting AST (#4367) (Dunqing)
- da13d93 semantic: Remove bounds checks on unresolved references stack
(#4390) (overlookmotel)
- e70c67b semantic: Remove a branch from `add_scope` (#4384)
(overlookmotel)
- 402006f semantic: Simplify logic in `enter_scope` + `leave_scope`
(#4383) (overlookmotel)
- 7469e01 semantic: Remove branch from `Nodes::add_node` (#4361)
(overlookmotel)
- 7eb2864 traverse: Speed up finding UID binding name (#4356)
(overlookmotel)- a207923 Replace some CompactStr usages with Cows
(#4377) (DonIsaac)

- d213773 ast: Replace serde rename "lowercase" with "camelCase" (#4376)
(overlookmotel)
- abfccbd ast: Reduce `#[cfg_attr]` boilerplate in AST type defs (#4375)
(overlookmotel)
- 5f1c7ec ast: Rename the `visited_node` marker to `ast`. (#4289)
(rzvxa)
- 58f6ec2 ast: Enter node before scope (#4347) (Dunqing)
- 59aea73 ast: Scope is created only if CatchClause has param (#4346)
(Dunqing)
- 7a3e925 ast_codegen: Better visit marker parsing. (#4371) (rzvxa)
- 7a75e0f linter: Use diagnostic codes in lint rules (#4349) (DonIsaac)
- a2eabe1 parser: Use error codes for ts diagnostics (#4335) (DonIsaac)
- 5d77b36 semantic: `visit_program` visit `hashbang` field (#4370)
(overlookmotel)
- f7b9ada semantic: `Program` visitor leave scope before node (#4369)
(overlookmotel)
- 729b288 semantic: Shorten code (#4358) (overlookmotel)
- 21d0eee semantic: Use error codes for ts diagnostics (#4336)
(DonIsaac)

Co-authored-by: Boshen <Boshen@users.noreply.github.com>
@DonIsaac DonIsaac mentioned this pull request Aug 12, 2024
@overlookmotel overlookmotel mentioned this pull request Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-merge Merge with Graphite Merge Queue A-semantic Area - Semantic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants