-
-
Notifications
You must be signed in to change notification settings - Fork 759
refactor(transformer, minifier): replace AstBuilder::move_xxxx methods with TakeIn trait
#10170
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
Conversation
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 #10170 will create unknown performance changesComparing Summary
Benchmarks breakdown
|
AstBuilder::move_xxxx methods with TakeIn traitAstBuilder::move_xxxx methods with TakeIn trait
|
I did this in #9970 but then decided against it, for the reasons given in #10001. I think I'm not dead set on that position if you strongly disagree, but that's my overall feeling. |
I think we should have one way of doing things. Making decisions on |
Merge activity
|
…ods with `TakeIn` trait (#10170) Pure refactor, `TakeIn` trait is exactly used for these cases, we don't need an indirect call for `move_xxx`.
9d82508 to
c198578
Compare
120b494 to
bcdbd38
Compare
|
@Dunqing Should we add an - declaration.take_in(self.ast.allocator)
+ self.ast.take(declaration)I don't mind either way, just asking what you think. |
Yes, this would be easier to use, I don't have opinion on this. |
|
OK, I opened an issue: #10314 |

Pure refactor,
TakeIntrait is exactly used for these cases, we don't need an indirect call formove_xxx.