-
-
Notifications
You must be signed in to change notification settings - Fork 485
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(transformer/arrow-functions): do not inline non-trivial visitor method #8321
Merged
graphite-app
merged 1 commit into
main
from
01-07-refactor_transformer_arrow-functions_do_not_inline_non-trivial_visitor_method
Jan 8, 2025
Merged
refactor(transformer/arrow-functions): do not inline non-trivial visitor method #8321
graphite-app
merged 1 commit into
main
from
01-07-refactor_transformer_arrow-functions_do_not_inline_non-trivial_visitor_method
Jan 8, 2025
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
This was referenced Jan 7, 2025
This was referenced Jan 7, 2025
github-actions
bot
added
A-transformer
Area - Transformer / Transpiler
C-cleanup
Category - technical debt or refactoring. Solution not expected to change behavior
labels
Jan 7, 2025
CodSpeed Performance ReportMerging #8321 will not alter performanceComparing Summary
|
overlookmotel
force-pushed
the
01-07-refactor_transformer_arrow-functions_reorder_visitor_methods
branch
from
January 7, 2025 14:46
b3566eb
to
6e071ec
Compare
overlookmotel
force-pushed
the
01-07-refactor_transformer_arrow-functions_do_not_inline_non-trivial_visitor_method
branch
from
January 7, 2025 14:46
3357ac6
to
cb02fe8
Compare
Merge activity
|
Dunqing
force-pushed
the
01-07-refactor_transformer_arrow-functions_reorder_visitor_methods
branch
from
January 8, 2025 01:34
6e071ec
to
32a0ee9
Compare
Dunqing
pushed a commit
that referenced
this pull request
Jan 8, 2025
…tor method (#8321) Follow-on after #8024. Don't inline `visit_statements` visitor method. This visitor is not so small, and always executes unconditionally. The compiler can decide whether to inline it or not. Where `#[inline]` is really valuable is: 1. Where the function is tiny so the cost of moving it into the caller is small. and 2. The function gets called a lot e.g. `visit_expression`, `visit_statement`, `visit_identifier_reference`. 3. Most commonly the function checks something and exits "nothing to do here". e.g. `visit_expression` where you only need to transform a particular type of `Expression`.
Dunqing
force-pushed
the
01-07-refactor_transformer_arrow-functions_do_not_inline_non-trivial_visitor_method
branch
from
January 8, 2025 01:35
cb02fe8
to
a615e76
Compare
…tor method (#8321) Follow-on after #8024. Don't inline `visit_statements` visitor method. This visitor is not so small, and always executes unconditionally. The compiler can decide whether to inline it or not. Where `#[inline]` is really valuable is: 1. Where the function is tiny so the cost of moving it into the caller is small. and 2. The function gets called a lot e.g. `visit_expression`, `visit_statement`, `visit_identifier_reference`. 3. Most commonly the function checks something and exits "nothing to do here". e.g. `visit_expression` where you only need to transform a particular type of `Expression`.
Dunqing
force-pushed
the
01-07-refactor_transformer_arrow-functions_reorder_visitor_methods
branch
from
January 8, 2025 01:53
32a0ee9
to
ea9cefb
Compare
Dunqing
force-pushed
the
01-07-refactor_transformer_arrow-functions_do_not_inline_non-trivial_visitor_method
branch
from
January 8, 2025 01:54
a615e76
to
3dd08e9
Compare
Base automatically changed from
01-07-refactor_transformer_arrow-functions_reorder_visitor_methods
to
main
January 8, 2025 02:07
graphite-app
bot
deleted the
01-07-refactor_transformer_arrow-functions_do_not_inline_non-trivial_visitor_method
branch
January 8, 2025 02:10
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-transformer
Area - Transformer / Transpiler
C-cleanup
Category - technical debt or refactoring. Solution not expected to change behavior
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.
Follow-on after #8024. Don't inline
visit_statements
visitor method. This visitor is not so small, and always executes unconditionally. The compiler can decide whether to inline it or not. Where#[inline]
is really valuable is:visit_expression
,visit_statement
,visit_identifier_reference
.visit_expression
where you only need to transform a particular type ofExpression
.