> 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.
Henry Jen has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 16 additional commits since the last revision: - Merge remote-tracking branch 'openjdk/master' into JDK-8321413 - Javadoc and some minor refactoring - Move up Snippet setup as a builder - Merge remote-tracking branch 'openjdk/master' into JDK-8321413 - Minor cleanup - Rename based on feedback to emphasis building a snippet for loading a reference - Fix typo and comment to match latest implementation - Fix regression failed to setup helper methods properly - Separate out ModuleDescriptorBuilder and use LoadableArray for paging - Merge remote-tracking branch 'openjdk/master' into JDK-8321413 - ... and 6 more: https://git.openjdk.org/jdk/compare/91d3635e...d5a93295 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/21022/files - new: https://git.openjdk.org/jdk/pull/21022/files/4833be88..d5a93295 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=21022&range=13 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=21022&range=12-13 Stats: 241529 lines in 5609 files changed: 148946 ins; 72274 del; 20309 mod Patch: https://git.openjdk.org/jdk/pull/21022.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/21022/head:pull/21022 PR: https://git.openjdk.org/jdk/pull/21022