Skip to content

refactor(transformer/nullish-coalescing): avoid repeated symbol lookups#7272

Merged
graphite-app[bot] merged 1 commit intomainfrom
11-13-refactor_transformer_nullish-coalescing_avoid_repeated_symbol_lookups
Nov 14, 2024
Merged

refactor(transformer/nullish-coalescing): avoid repeated symbol lookups#7272
graphite-app[bot] merged 1 commit intomainfrom
11-13-refactor_transformer_nullish-coalescing_avoid_repeated_symbol_lookups

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Nov 13, 2024

clone_expression was unnecessarily looking up the SymbolId of references multiple times. Use BoundIdentifier instead to avoid that.

Notes:

  • create_conditional_expression has to take all parts as Expressions just to support this ?? something.
  • TraverseCtx::is_static also handles Super, but can skip that in this case as super ?? something is not valid syntax.

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 13, 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
Member Author

overlookmotel commented Nov 13, 2024

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Nov 13, 2024
@overlookmotel overlookmotel marked this pull request as ready for review November 13, 2024 15:51
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 13, 2024

CodSpeed Performance Report

Merging #7272 will not alter performance

Comparing 11-13-refactor_transformer_nullish-coalescing_avoid_repeated_symbol_lookups (345fbb9) with main (01ddf37)

Summary

✅ 30 untouched benchmarks

@overlookmotel overlookmotel force-pushed the 11-13-refactor_transformer_nullish-coalescing_avoid_repeated_symbol_lookups branch from d23e8da to 4ced135 Compare November 13, 2024 15:57
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Nov 14, 2024
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 14, 2024

Merge activity

…ps (#7272)

`clone_expression` was unnecessarily looking up the `SymbolId` of references multiple times. Use `BoundIdentifier` instead to avoid that.

Notes:

* `create_conditional_expression` has to take all parts as `Expression`s just to support `this ?? something`.
* `TraverseCtx::is_static` also handles `Super`, but can skip that in this case as `super ?? something` is not valid syntax.
@Boshen Boshen force-pushed the 11-13-fix_transformer_nullish-coalescing_correct_span branch from 7428d93 to 5b5c8a9 Compare November 14, 2024 16:18
@Boshen Boshen force-pushed the 11-13-refactor_transformer_nullish-coalescing_avoid_repeated_symbol_lookups branch from 4ced135 to 345fbb9 Compare November 14, 2024 16:18
Base automatically changed from 11-13-fix_transformer_nullish-coalescing_correct_span to main November 14, 2024 16:28
@graphite-app graphite-app bot merged commit 345fbb9 into main Nov 14, 2024
@graphite-app graphite-app bot deleted the 11-13-refactor_transformer_nullish-coalescing_avoid_repeated_symbol_lookups branch November 14, 2024 16:32
Dunqing pushed a commit that referenced this pull request Nov 17, 2024
…ps (#7272)

`clone_expression` was unnecessarily looking up the `SymbolId` of references multiple times. Use `BoundIdentifier` instead to avoid that.

Notes:

* `create_conditional_expression` has to take all parts as `Expression`s just to support `this ?? something`.
* `TraverseCtx::is_static` also handles `Super`, but can skip that in this case as `super ?? something` is not valid syntax.
Dunqing pushed a commit that referenced this pull request Nov 18, 2024
…ps (#7272)

`clone_expression` was unnecessarily looking up the `SymbolId` of references multiple times. Use `BoundIdentifier` instead to avoid that.

Notes:

* `create_conditional_expression` has to take all parts as `Expression`s just to support `this ?? something`.
* `TraverseCtx::is_static` also handles `Super`, but can skip that in this case as `super ?? something` is not valid syntax.
Dunqing pushed a commit that referenced this pull request Nov 18, 2024
…ps (#7272)

`clone_expression` was unnecessarily looking up the `SymbolId` of references multiple times. Use `BoundIdentifier` instead to avoid that.

Notes:

* `create_conditional_expression` has to take all parts as `Expression`s just to support `this ?? something`.
* `TraverseCtx::is_static` also handles `Super`, but can skip that in this case as `super ?? something` is not valid syntax.
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