RFR: 8295302: Do not use ArrayList when LambdaForm has a single ClassData [v2]

Ioi Lam iklam at openjdk.org
Mon Oct 17 21:14:01 UTC 2022


On Mon, 17 Oct 2022 19:28:09 GMT, Claes Redestad <redestad at openjdk.org> wrote:

> Looks good, assuming there are tests calling in with no class data to check that `defineClass` is fine with `null` inputs?

Yes, we have two existing test cases that has no class data:

- java/lang/invoke/CompileThresholdBootstrapTest
- java/lang/invoke/LoopCombinatorLongSignatureTest

I found them by adding this to `InvokerBytecodeGenerator::classDataValues()`


    private Object classDataValues() {
        final List<ClassData> cd = classData;
        if (cd.size() == 0) {
            throw new RuntimeException("huh");
        }


If I remove the above hack but keep my patch, the tests passed. So I think this case is covered.

-------------

PR: https://git.openjdk.org/jdk/pull/10706


More information about the core-libs-dev mailing list