On Mon, 17 Oct 2022 21:48:42 GMT, Ioi Lam <[email protected]> wrote:
>> Please review this small optimization. As shown in the JBS issue, most of
>> the generated LambdaForm classes have a single ClassData, so we can get a
>> small footprint/speed improvement.
>
> Ioi Lam 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 four additional commits since the
> last revision:
>
> - Merge branch 'master' into
> 8295302-no-arraylist-for-single-classdata-for-lambdaform
> - @mlchung comments
> - @iwanowww comments
> - 8295302: Do not use ArrayList when LambdaForm has a single ClassData
Thanks for the update. I made the suggested wording. You can push once
it's updated.
src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java line
346:
> 344:
> 345: /**
> 346: * Returns an object to pass this.classData to the <clinit> method
> of the
What about:
Suggestion:
* Returns the class data object that will be passed to
`Lookup.defineHiddenClass`.
* The classData is loaded in the <clinit> method of the generated class.
* If the class data contains only one single object, this method returns
that single object.
* If the class data contains more than one objects, this method returns a
List.
*
* This method returns null if no class data.
-------------
Marked as reviewed by mchung (Reviewer).
PR: https://git.openjdk.org/jdk/pull/10706