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(js_semantic): wrap scope id for niche optimization and clarity #3408

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

Conaclos
Copy link
Member

@Conaclos Conaclos commented Jul 11, 2024

Summary

This PR wraps every scope id into a dedicated type.
This improves readability (sometimes it is not clear if a u32 is a TextSize, a scope id or a binding id).
This also allows niche optimization (we are using NonZeroU32 internally) and thus reduces the size of every event.

Test Plan

CI must pass.

@github-actions github-actions bot added the L-JavaScript Language: JavaScript and super languages label Jul 11, 2024
@Conaclos Conaclos force-pushed the conaclos/js-semantic-scope-index branch from f69c777 to ec599c3 Compare July 11, 2024 11:28
Copy link
Contributor

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 48292 48292 0
Passed 47095 47095 0
Failed 1197 1197 0
Panics 0 0 0
Coverage 97.52% 97.52% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 40 40 0
Passed 37 37 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.50% 92.50% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 6546 6546 0
Passed 2201 2201 0
Failed 4345 4345 0
Panics 0 0 0
Coverage 33.62% 33.62% 0.00%

ts/babel

Test result main count This PR count Difference
Total 669 669 0
Passed 597 597 0
Failed 72 72 0
Panics 0 0 0
Coverage 89.24% 89.24% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 18264 18264 0
Passed 14000 14000 0
Failed 4264 4264 0
Panics 0 0 0
Coverage 76.65% 76.65% 0.00%

@Conaclos Conaclos force-pushed the conaclos/js-semantic-scope-index branch 2 times, most recently from e3ae66a to 1f1acb6 Compare July 11, 2024 11:37
@Conaclos Conaclos force-pushed the conaclos/js-semantic-scope-index branch from 1f1acb6 to 25e31a6 Compare July 11, 2024 11:41
@Conaclos Conaclos merged commit b26021e into main Jul 11, 2024
15 checks passed
@Conaclos Conaclos deleted the conaclos/js-semantic-scope-index branch July 11, 2024 12:59
@Conaclos Conaclos added the A-Changelog Area: changelog label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants