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

refactor(transformer): duplicate_expression take mutated_symbol_needs_temp_var param #7756

Conversation

overlookmotel
Copy link
Contributor

@overlookmotel overlookmotel commented Dec 9, 2024

TransformCtx::duplicate_expression method introduced in #7754 take a param mutated_symbol_needs_temp_var.

If true, duplicate_expression will create a temp var for an IdentifierReference whose's symbol is assigned to elsewhere in the AST. If false, it won't.

This is required because different transforms which use duplicate_expression have different requirements.

Copy link

graphite-app bot commented Dec 9, 2024

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

Add 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.

Copy link

codspeed-hq bot commented Dec 9, 2024

CodSpeed Performance Report

Merging #7756 will improve performances by 3.27%

Comparing 12-09-refactor_transformer_duplicate_expression_take_mutated_symbol_needs_temp_var_param (a750ebc) with main (3c1b2bf)

Summary

⚡ 1 improvements
✅ 28 untouched benchmarks

Benchmarks breakdown

Benchmark main 12-09-refactor_transformer_duplicate_expression_take_mutated_symbol_needs_temp_var_param Change
semantic[cal.com.tsx] 29.1 ms 28.2 ms +3.27%

@overlookmotel overlookmotel marked this pull request as ready for review December 9, 2024 22:06
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Dec 10, 2024
Copy link

graphite-app bot commented Dec 10, 2024

Merge activity

…eds_temp_var` param (#7756)

`TransformCtx::duplicate_expression` method introduced in #7754 take a param `mutated_symbol_needs_temp_var`.

If `true`, `duplicate_expression` will create a temp var for an `IdentifierReference` whose's symbol is assigned to elsewhere in the AST. If `false`, it won't.

This is required because different transforms which use `duplicate_expression` have different requirements.
@Dunqing Dunqing force-pushed the 12-09-feat_semantic_add_symboltable_symbol_is_mutated_method branch from 99542f4 to 78dff7d Compare December 10, 2024 02:29
@Dunqing Dunqing requested a review from Boshen as a code owner December 10, 2024 02:29
@Dunqing Dunqing force-pushed the 12-09-refactor_transformer_duplicate_expression_take_mutated_symbol_needs_temp_var_param branch from 04f6445 to a750ebc Compare December 10, 2024 02:29
Base automatically changed from 12-09-feat_semantic_add_symboltable_symbol_is_mutated_method to main December 10, 2024 02:45
@graphite-app graphite-app bot merged commit a750ebc into main Dec 10, 2024
27 checks passed
@graphite-app graphite-app bot deleted the 12-09-refactor_transformer_duplicate_expression_take_mutated_symbol_needs_temp_var_param branch December 10, 2024 02:50
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant