langtools/test/tools/javac/lambda/TestBootstrapMethodsCount.java
author mcimadamore
Mon, 31 Aug 2015 17:33:34 +0100
changeset 32454 b0ac04e0fefe
parent 32334 langtools/test/tools/javac/TestBootstrapMethodsCount.java@fd65e32e16b3
child 36526 3b41f1c69604
permissions -rw-r--r--
8129962: Investigate performance improvements in langtools combo tests Summary: New combo API that runs all combo instances in a shared javac context (whenever possible). Reviewed-by: jjg, jlahoda, vromero
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32334
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
     1
/*
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
     2
 * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
     4
 *
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
     7
 * published by the Free Software Foundation.
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
     8
 *
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    13
 * accompanied this code).
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    14
 *
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    18
 *
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    21
 * questions.
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    22
 */
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    23
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    24
/*
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    25
 * @test
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    26
 * @bug 8129547
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    27
 * @summary Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 32334
diff changeset
    28
 * @library /tools/javac/lib
32334
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    29
 * @modules jdk.jdeps/com.sun.tools.classfile
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    30
 *          jdk.compiler/com.sun.tools.javac.api
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    31
 *          jdk.compiler/com.sun.tools.javac.code
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    32
 *          jdk.compiler/com.sun.tools.javac.tree
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    33
 *          jdk.compiler/com.sun.tools.javac.util
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    34
 */
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    35
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    36
import java.io.File;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    37
import java.net.URI;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    38
import java.util.ArrayList;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    39
import java.util.Arrays;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    40
import java.util.Locale;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    41
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    42
import javax.tools.Diagnostic;
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 32334
diff changeset
    43
import javax.tools.JavaCompiler;
32334
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    44
import javax.tools.JavaFileObject;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    45
import javax.tools.SimpleJavaFileObject;
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 32334
diff changeset
    46
import javax.tools.ToolProvider;
32334
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    47
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    48
import com.sun.source.tree.MethodInvocationTree;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    49
import com.sun.source.tree.MethodTree;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    50
import com.sun.source.util.TaskEvent;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    51
import com.sun.source.util.TaskListener;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    52
import com.sun.source.util.TreeScanner;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    53
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    54
import com.sun.tools.classfile.Attribute;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    55
import com.sun.tools.classfile.BootstrapMethods_attribute;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    56
import com.sun.tools.classfile.ClassFile;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    57
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    58
import com.sun.tools.javac.api.JavacTaskImpl;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    59
import com.sun.tools.javac.code.Symbol;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    60
import com.sun.tools.javac.code.Symbol.MethodSymbol;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    61
import com.sun.tools.javac.code.Symtab;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    62
import com.sun.tools.javac.code.Types;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    63
import com.sun.tools.javac.tree.JCTree.JCMethodInvocation;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    64
import com.sun.tools.javac.tree.JCTree.JCMethodDecl;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    65
import com.sun.tools.javac.tree.JCTree.JCIdent;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    66
import com.sun.tools.javac.util.Context;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    67
import com.sun.tools.javac.util.Names;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    68
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    69
import static com.sun.tools.javac.jvm.ClassFile.*;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    70
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 32334
diff changeset
    71
public class TestBootstrapMethodsCount {
32334
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    72
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    73
    public static void main(String... args) throws Exception {
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 32334
diff changeset
    74
        JavaCompiler comp = ToolProvider.getSystemJavaCompiler();
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 32334
diff changeset
    75
        new TestBootstrapMethodsCount().run(comp);
32334
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    76
    }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    77
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    78
    DiagChecker dc;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    79
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    80
    TestBootstrapMethodsCount() {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    81
        dc = new DiagChecker();
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    82
    }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    83
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 32334
diff changeset
    84
    public void run(JavaCompiler comp) {
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 32334
diff changeset
    85
        JavaSource source = new JavaSource();
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 32334
diff changeset
    86
        JavacTaskImpl ct = (JavacTaskImpl)comp.getTask(null, null, dc,
32334
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    87
                Arrays.asList("-g"), null, Arrays.asList(source));
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    88
        Context context = ct.getContext();
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    89
        Symtab syms = Symtab.instance(context);
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    90
        Names names = Names.instance(context);
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    91
        Types types = Types.instance(context);
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    92
        ct.addTaskListener(new Indifier(syms, names, types));
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    93
        try {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    94
            ct.generate();
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    95
        } catch (Throwable t) {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    96
            t.printStackTrace();
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    97
            throw new AssertionError(
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    98
                    String.format("Error thrown when compiling following code\n%s",
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
    99
                            source.source));
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   100
        }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   101
        if (dc.diagFound) {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   102
            throw new AssertionError(
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   103
                    String.format("Diags found when compiling following code\n%s\n\n%s",
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   104
                            source.source, dc.printDiags()));
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   105
        }
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 32334
diff changeset
   106
        verifyBytecode();
32334
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   107
    }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   108
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 32334
diff changeset
   109
    void verifyBytecode() {
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 32334
diff changeset
   110
        File compiledTest = new File("Test.class");
32334
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   111
        try {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   112
            ClassFile cf = ClassFile.read(compiledTest);
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   113
            BootstrapMethods_attribute bsm_attr =
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   114
                    (BootstrapMethods_attribute)cf
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   115
                            .getAttribute(Attribute.BootstrapMethods);
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   116
            int length = bsm_attr.bootstrap_method_specifiers.length;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   117
            if (length != 1) {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   118
                throw new Error("Bad number of method specifiers " +
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   119
                        "in BootstrapMethods attribute: " + length);
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   120
            }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   121
        } catch (Exception e) {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   122
            e.printStackTrace();
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   123
            throw new Error("error reading " + compiledTest +": " + e);
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   124
        }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   125
    }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   126
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   127
    class JavaSource extends SimpleJavaFileObject {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   128
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 32334
diff changeset
   129
        static final String source = "import java.lang.invoke.*;\n" +
32334
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   130
                "class Bootstrap {\n" +
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   131
                "   public static CallSite bsm(MethodHandles.Lookup lookup, " +
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   132
                "String name, MethodType methodType) {\n" +
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   133
                "       return null;\n" +
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   134
                "   }\n" +
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   135
                "}\n" +
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 32334
diff changeset
   136
                "class Test {\n" +
32334
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   137
                "   void m1() { }\n" +
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   138
                "   void m2(Object arg1) { }\n" +
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   139
                "   void test1() {\n" +
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   140
                "      Object o = this; // marker statement \n" +
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   141
                "      m1();\n" +
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   142
                "   }\n" +
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   143
                "   void test2(Object arg1) {\n" +
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   144
                "      Object o = this; // marker statement \n" +
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   145
                "      m2(arg1);\n" +
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   146
                "   }\n" +
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   147
                "}";
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   148
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 32334
diff changeset
   149
        JavaSource() {
32334
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   150
            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   151
        }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   152
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   153
        @Override
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   154
        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   155
            return source;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   156
        }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   157
    }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   158
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   159
    class Indifier extends TreeScanner<Void, Void> implements TaskListener {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   160
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   161
        MethodSymbol bsm;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   162
        Symtab syms;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   163
        Names names;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   164
        Types types;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   165
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   166
        Indifier(Symtab syms, Names names, Types types) {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   167
            this.syms = syms;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   168
            this.names = names;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   169
            this.types = types;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   170
        }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   171
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   172
        @Override
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   173
        public void started(TaskEvent e) {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   174
            //do nothing
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   175
        }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   176
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   177
        @Override
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   178
        public void finished(TaskEvent e) {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   179
            if (e.getKind() == TaskEvent.Kind.ANALYZE) {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   180
                scan(e.getCompilationUnit(), null);
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   181
            }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   182
        }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   183
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   184
        @Override
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   185
        public Void visitMethodInvocation(MethodInvocationTree node, Void p) {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   186
            super.visitMethodInvocation(node, p);
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   187
            JCMethodInvocation apply = (JCMethodInvocation)node;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   188
            JCIdent ident = (JCIdent)apply.meth;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   189
            Symbol oldSym = ident.sym;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   190
            if (!oldSym.isConstructor()) {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   191
                ident.sym = new Symbol.DynamicMethodSymbol(oldSym.name,
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   192
                        oldSym.owner, REF_invokeStatic, bsm, oldSym.type, new Object[0]);
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   193
            }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   194
            return null;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   195
        }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   196
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   197
        @Override
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   198
        public Void visitMethod(MethodTree node, Void p) {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   199
            super.visitMethod(node, p);
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   200
            if (node.getName().toString().equals("bsm")) {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   201
                bsm = ((JCMethodDecl)node).sym;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   202
            }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   203
            return null;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   204
        }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   205
    }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   206
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   207
    static class DiagChecker
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   208
            implements javax.tools.DiagnosticListener<JavaFileObject> {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   209
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   210
        boolean diagFound;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   211
        ArrayList<String> diags = new ArrayList<>();
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   212
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   213
        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   214
            diags.add(diagnostic.getMessage(Locale.getDefault()));
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   215
            diagFound = true;
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   216
        }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   217
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   218
        String printDiags() {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   219
            StringBuilder buf = new StringBuilder();
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   220
            for (String s : diags) {
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   221
                buf.append(s);
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   222
                buf.append("\n");
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   223
            }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   224
            return buf.toString();
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   225
        }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   226
    }
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   227
fd65e32e16b3 8129547: Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
mcimadamore
parents:
diff changeset
   228
}