-
-
Notifications
You must be signed in to change notification settings - Fork 483
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/class-properties): use temp_var_name_base
to generate temp var names for super
transform
#8004
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 Performance ReportMerging #8004 will not alter performanceComparing Summary
|
fab198b
to
3ea4109
Compare
1784c5e
to
d7184c6
Compare
aee4ca9
to
a846198
Compare
Merge activity
|
…enerate temp var names for `super` transform (#8004) Follow-on after #7997. Generate "base name" for temp var using `temp_var_name_base` and then create the 2 temp bindings from it. This is a bit more efficient than creating 2nd temp binding from name of the first temp binding, because the first binding's name has `_` added to start, and may have digits on the end, which have to be trimmed off again. Whereas the "base name" is ready to go. Incidentally, changing the timing of when temp bindings are created also aligns output with Babel.
a846198
to
0a38eea
Compare
## [0.43.0] - 2024-12-21 - de4c772 traverse: [**BREAKING**] Rename `Ancestor::is_via_*` methods to `is_parent_of_*` (#8031) (overlookmotel) - ed75e42 semantic: [**BREAKING**] Make SymbolTable fields `pub(crate)` instead of `pub` (#7999) (Boshen) ### Features - 75b775c allocator: `Vec<u8>::into_string` (#8017) (overlookmotel) - 8547e02 ast: Implement `allocator_api2` for `Allocator` (#8043) (Boshen) - 63a95e4 ast: Add `AstBulder::move_property_key` (#7998) (overlookmotel) - 897a1a8 transformer/class-properties: Exit faster from super replacement visitor (#8028) (overlookmotel) - 3ea4109 transformer/class-properties: Transform super update expressions within static prop initializer (#7997) (Dunqing) - cc57db3 transformer/class-properties: Transform super assignment expressions within static prop initializer (#7991) (Dunqing) - 6b6444b traverse: Record current block scope (#8007) (overlookmotel) ### Bug Fixes - 043252d transformer/class-properties: Replace `this` and class name in static blocks (#8035) (overlookmotel) - 273795d transformer/class-properties: Run other transforms on static properties, static blocks, and computed keys (#7982) (overlookmotel) ### Performance - c0dd3f8 ast: `move_expression` and `move_statement` produce dummy with no span (#7995) (overlookmotel) - 862838f codegen: Remove useless to_owned (#8014) (Dunqing) - 2736657 semantic: Allocate `UnresolvedReferences` in allocator (#8046) (Boshen) - 2e8872c semantic: Allocate child scope in allocator (#8045) (Boshen) - 414e828 semantic: Allocate symbol data in Allocator (#8012) (Boshen) - 7aebed0 semantic: Allocate `Bindings` in allocator (#8021) (Boshen) - 0f9308f transformer/react-refresh: Reduce allocations (#8018) (overlookmotel) - 0deb9e6 transformer/react-refresh: Reserve capacity in hook key string (#8016) (overlookmotel) - 7b70347 transformer/react-refresh: Avoid allocating string in each hook call (#8013) (Dunqing) ### Documentation - df5c341 ast: Improve docs for `AstBuilder::move_*` methods (#7994) (overlookmotel) ### Refactor - f1adf9f semantic: `ScopeTree::rename_binding` remove old binding first (#8020) (overlookmotel) - 02f968d semantic: Change `Bindings` to a plain `FxHashMap` (#8019) (Boshen) - e7476a1 semantic: Remove `serialize` (#8015) (Boshen) - 1cf7b83 semantic: Simplify handling namespace stack (#7987) (Dunqing) - 48cb52b semantic: Remove resetting `current_reference_flags` in visit functions (#7986) (Dunqing) - 3250a47 semantic: Remove unused current_symbol_flags (#7985) (Dunqing) - efe96ec semantic: Use `Stack` for function stack node ids (#7984) (Dunqing) - ac097e9 transformer/class-properties: Rename file (#8036) (overlookmotel) - 059a5dd transformer/class-properties: Do not pass `ScopeId` into `insert_instance_inits` (#8001) (overlookmotel) - 0a38eea transformer/class-properties: Use `temp_var_name_base` to generate temp var names for `super` transform (#8004) (overlookmotel) - d1b7181 transformer/class-properties: Rename var (#8006) (overlookmotel) - 5a23d72 transformer/class-properties: Remove outdated comment (#8000) (overlookmotel) - b3a5f3e transformer/class-properties: Mark `transform_assignment_expression_if_super_member_assignment_target` as inline (#7993) (Dunqing) ### Testing - bcb33c0 semantic: Add a test for catch parameters reference (#7988) (Dunqing) Co-authored-by: Boshen <[email protected]>
Follow-on after #7997.
Generate "base name" for temp var using
temp_var_name_base
and then create the 2 temp bindings from it.This is a bit more efficient than creating 2nd temp binding from name of the first temp binding, because the first binding's name has
_
added to start, and may have digits on the end, which have to be trimmed off again. Whereas the "base name" is ready to go.Incidentally, changing the timing of when temp bindings are created also aligns output with Babel.