Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Apr 6, 2025

Remove self_closing field from JSXOpeningElement. Whether the tag is self-closing can be determined by whether the JSXElement has a closing_element or not.

This is advantageous for 2 reasons:

  1. Reduce size of JSXOpeningElement by 8 bytes.
  2. Make it impossible for self_closing and closing_element fields to get out of sync. Only one source of truth.

Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added A-linter Area - Linter A-parser Area - Parser A-ast Area - AST A-codegen Area - Code Generation C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Apr 6, 2025
@overlookmotel overlookmotel marked this pull request as ready for review April 6, 2025 16:40
@overlookmotel overlookmotel requested review from Boshen and Dunqing April 6, 2025 16:41
@codspeed-hq
Copy link

codspeed-hq bot commented Apr 6, 2025

CodSpeed Instrumentation Performance Report

Merging #10275 will not alter performance

Comparing 04-06-refactor_ast_remove_jsxopeningelement_self_closing_field (a26fd34) with main (78f1b3a)

Summary

✅ 36 untouched benchmarks

@overlookmotel
Copy link
Member Author

+1% improvement on parser[RadixUIAdoptionSection.jsx] benchmark. I believe the -1% regression on 2 other benchmarks are just due to noise.

@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Apr 7, 2025
Copy link
Member Author

overlookmotel commented Apr 7, 2025

Merge activity

Remove `self_closing` field from `JSXOpeningElement`. Whether the tag is self-closing can be determined by whether the `JSXElement` has a `closing_element` or not.

This is advantageous for 2 reasons:

1. Reduce size of `JSXOpeningElement` by 8 bytes.
2. Make it impossible for `self_closing` and `closing_element` fields to get out of sync. Only one source of truth.
@graphite-app graphite-app bot force-pushed the 04-06-refactor_ast_remove_jsxopeningelement_self_closing_field branch from ce89055 to a26fd34 Compare April 7, 2025 14:27
@graphite-app graphite-app bot merged commit a26fd34 into main Apr 7, 2025
29 checks passed
@graphite-app graphite-app bot deleted the 04-06-refactor_ast_remove_jsxopeningelement_self_closing_field branch April 7, 2025 14:34
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Apr 7, 2025
This was referenced Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast Area - AST A-codegen Area - Code Generation A-linter Area - Linter A-parser Area - Parser 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.

3 participants