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

feat(minifier): minimize computed property access #8162

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sapphi-red
Copy link
Contributor

Ported ConvertToDottedProperties partially. The rest seems to be mostly handled by #8147.

Copy link

graphite-app bot commented Dec 28, 2024

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.

@github-actions github-actions bot added A-minifier Area - Minifier C-enhancement Category - New feature or request labels Dec 28, 2024
test_same("a[P]");
test_same("a[$]");
test_same("a[p()]");
// test_same("a['default']");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keywords seems to be not allowed for ES3, but I guess this is fine for us.

Comment on lines +109 to +114
// upper case lower half of o from phonetic extensions set.
// valid in Safari, not in Firefox, IE.
// test_same("a['\\u1d17A']");
// Latin capital N with tilde - nice if we handled it, but for now let's
// only allow simple Latin (aka ASCII) to be converted.
// test_same("a['\\u00d1StuffAfter']");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\u1d17A is invalid for ES5 (ES5 uses Unicode 3.0 and that character was introduced in Unicode 3.1) and valid for ES2015 (ES2015 uses Unicode 5.1).
\u00d1 is valid for ES3+.

Copy link

codspeed-hq bot commented Dec 28, 2024

CodSpeed Performance Report

Merging #8162 will not alter performance

Comparing sapphi-red:feat/minifier-minimize-computed-property-access (4c78078) with main (37c9959)

Summary

✅ 29 untouched benchmarks

@Boshen
Copy link
Member

Boshen commented Dec 28, 2024

This falls under substitute alternative syntax. I'll move the code around when I get the time.

@Boshen Boshen self-assigned this Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-minifier Area - Minifier C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants