-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Class emit: cached repeat prototype sets in a variable #33363
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
Class emit: cached repeat prototype sets in a variable #33363
Conversation
If two or more class members would assign to the class `.prototype`, that'll be stored in a temporary variable named like `proto`.
Ping @DanielRosenwasser - this, #33337, and #29374 have been sitting for a little while. Do you think someone would be able to take a look at them soon? Thanks! |
@JoshuaKGoldberg we discussed this in the design meeting today. As you mention above, a previous attempt (#16469) to address this was made before. At the time it was determined that zlib compression can already handle repeated |
Ok, thanks for letting me know and discussing! It was a fun learning experience regardless. 😄 |
If two or more class members would assign to the class
.prototype
, that'll be stored in a temporary variable named likeproto
per @kitsonk's suggestion. This approach is similar to #16469 but with the the original behavior preserved for classes with only oneprototype
member.Does not return the class
prototype
from__extends
for further terseness; I'd be interested in taking that on next.Fixes #9638.
This PR contains <100 lines of real code change and >350 files of test changes. Fun!
Waiting to update the last few baselines on #33364. They seem to be generally acceptable?I'll just fix them manually.