refactor(transformer): share TypeScriptOptions with ref not Rc#6121
Merged
graphite-app[bot] merged 1 commit intomainfrom Sep 27, 2024
Conversation
Contributor
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. |
Member
Author
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @overlookmotel and the rest of your teammates on |
CodSpeed Performance ReportMerging #6121 will not alter performanceComparing Summary
|
Contributor
Merge activity
|
…6121) Similar to #6118. Share `TypeScriptOptions` between transforms as a plain `&` reference, rather than an `Rc`, to reduce setup/teardown time. The code to parse pragmas from comments is moved into `Transformer::new`. This isn't the ideal place for it, but it means `TypeScriptOptions` can be shared with the existing `'ctx` lifetime, rather than having to have a 3rd lifetime `TypeScript<'a, 'ctx, 'options>`.
5015cb4 to
4387845
Compare
Boshen
added a commit
that referenced
this pull request
Sep 28, 2024
## [0.30.4] - 2024-09-28 ### Bug Fixes - 8582ae3 codegen: Missing parentheses if there is a pure comment before a NewExpression as a ComputedMemberExpression's callee (#6105) (Dunqing) - fd6798f parser: Remove unintended `pub Kind` (#6109) (Boshen) - 6f98aad sourcemap: Align sourcemap type with Rollup (#6133) (Boshen) - 64d4756 transformer: Fix debug assertion in `Stack` (#6106) (overlookmotel) ### Performance - 05852a0 codegen: Do not check whether there are annotation comments or not if we don't preserve annotation comments (#6107) (Dunqing) ### Documentation - 26a273a oxc-transform: Update README (Boshen) - e2c5baf transformer: Fix formatting of README (#6111) (overlookmotel) ### Refactor - 2090fce semantic: Fix lint warning in nightly (#6110) (overlookmotel) - 7bc3988 transformer: Remove dead code (#6124) (overlookmotel) - 07fe45b transformer: Exponentiation operator: convert to match (#6123) (overlookmotel) - 4387845 transformer: Share `TypeScriptOptions` with ref not `Rc` (#6121) (overlookmotel) - 09e41c2 transformer: Share `TransformCtx` with ref not `Rc` (#6118) (overlookmotel) - 58fd6eb transformer: Pre-allocate more stack space (#6095) (overlookmotel) - 9ac80bd transformer: Add wrapper around `NonNull` (#6115) (overlookmotel) - c50500e transformer: Move common stack functionality into `StackCommon` trait (#6114) (overlookmotel) - 9839059 transformer: Simplify `StackCapacity` trait (#6113) (overlookmotel) --------- Co-authored-by: Boshen <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This file contains hidden or 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
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.

Similar to #6118.
Share
TypeScriptOptionsbetween transforms as a plain&reference, rather than anRc, to reduce setup/teardown time.The code to parse pragmas from comments is moved into
Transformer::new. This isn't the ideal place for it, but it meansTypeScriptOptionscan be shared with the existing'ctxlifetime, rather than having to have a 3rd lifetimeTypeScript<'a, 'ctx, 'options>.