Repository navigation
Conversation
This reverts commit 47ca169.
Member
Author
|
Marked as draft for now, some additional tests are required, and some text blocks can be used in place of separate string vararg params. Showcase improves by about 0.1%, or about 300 bytes over 300-400kb permutations. |
niloc132
commented
Jul 22, 2026
niloc132
marked this pull request as ready for review
September 16, 2026 18:19
niloc132
force-pushed
the
9731-dup-clinits-commas-test
branch
from
September 16, 2026 18:20
6894e13 to
3e8403b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explore comma expression contents when finding class initializers, and mark them as seen to avoid their inclusion later in method bodies. Also improved try block handling when there are no catches or finallys, and left notes for how this can be later improved when control flow is more structured (#10248, #10381)
Moved this pass into the main JS optimization loop - inlining methods tends to produce grouped clinits, and clinit removal can leave behind dead code that needs to be simplified away. In some cases, clinit removal make also make a method eligible for inlining.
This code previously had no tests, so added a test class, and improved the JS OptimizerTestBase to allow for minor changes (newlines, etc) between input and expected contents, as well as asserting for "no change" when appropriate. This more closely mirrors the Java version of this test base.
Also cleans up some "XO" references ("eXactly Once") in favor of "clinit" as referenced elsewhere.
Fixes #9731