On Sun, 22 Sep 2024 15:38:19 GMT, Alan Bateman <[email protected]> wrote:
>> This PR split out large array/set construction into separate factory methods >> to avoid oversized method trying to construct several of those. >> >> In order to do that, we will need to generate those help methods on demand >> in the class builder. Here we have two approach, one is for dedup set, which >> is processed in advance so we can know what methods should be created. >> >> Another is for random set, such as packages, thus we put those request into >> a queue to amend the class later. >> >> To keep the optimization of caching built value that are references more >> than once, it was implemented using local vars, which doesn't work well for >> helper methods. The existing approach to populate local vars doesn't work >> well with larger scope of split operation, as the slot was allocated on >> lazily built, but the transfer is captured in advance, this count could >> mismatch as built time and run time. >> >> So we make this build in advance, and use a static array for values referred >> more than once. >> >> All the codegen instead of giving index to be loaded, the builder snippet >> now load the wanted set/array to the operand stack to be consistent. > > It would be helpful for potential reviewers if the PR description included a > brief summary on the changes to the code generated, otherwise it's a lot to > wade through to understand the changes. @AlanBateman Do I need another approval before integrate this? If so, would you have a look? @jerboaa , @liach Thanks for reviewing, is there anything else you would like to add? ------------- PR Comment: https://git.openjdk.org/jdk/pull/21022#issuecomment-2578297968
