langtools/test/tools/javac/lambda/TestLambdaToMethodStats.java
author vromero
Tue, 06 Sep 2016 17:04:43 -0700
changeset 40835 6ab9ed1abc46
parent 39599 3c7da4996d8c
permissions -rw-r--r--
8162546: change hidden options -Xdebug to --debug, -XshouldStop to --should-stop, and -diags to --diags Reviewed-by: mcimadamore
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     1
/*
39599
3c7da4996d8c 8153407: javac, fold debug options
vromero
parents: 32454
diff changeset
     2
 * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     4
 *
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     7
 * published by the Free Software Foundation.
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     8
 *
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    13
 * accompanied this code).
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    14
 *
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    18
 *
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    21
 * questions.
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    22
 */
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    23
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    24
/*
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    25
 * @test
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    26
 * @bug 8013576 8129962
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    27
 * @summary Add stat support to LambdaToMethod
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    28
 * @library /tools/javac/lib
30730
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 18386
diff changeset
    29
 * @modules jdk.compiler/com.sun.tools.javac.api
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    30
 *          jdk.compiler/com.sun.tools.javac.code
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    31
 *          jdk.compiler/com.sun.tools.javac.comp
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    32
 *          jdk.compiler/com.sun.tools.javac.main
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    33
 *          jdk.compiler/com.sun.tools.javac.tree
30730
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 18386
diff changeset
    34
 *          jdk.compiler/com.sun.tools.javac.util
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    35
 * @build combo.ComboTestHelper
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    36
 * @run main TestLambdaToMethodStats
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    37
 */
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    38
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    39
import java.io.IOException;
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    40
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    41
import javax.tools.Diagnostic;
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    42
import javax.tools.JavaFileObject;
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    43
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    44
import com.sun.tools.javac.api.ClientCodeWrapper;
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    45
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    46
import com.sun.tools.javac.util.List;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    47
import combo.ComboInstance;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    48
import combo.ComboParameter;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    49
import combo.ComboTask.Result;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    50
import combo.ComboTestHelper;
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    51
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    52
public class TestLambdaToMethodStats extends ComboInstance<TestLambdaToMethodStats> {
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    53
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    54
    enum ExprKind implements ComboParameter {
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    55
        LAMBDA("()->null"),
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    56
        MREF1("this::g"),
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    57
        MREF2("this::h");
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    58
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    59
        String exprStr;
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    60
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    61
        ExprKind(String exprStr) {
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    62
            this.exprStr = exprStr;
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    63
        }
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    64
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    65
        @Override
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    66
        public String expand(String optParameter) {
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    67
            return exprStr;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    68
        }
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    69
    }
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    70
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    71
    enum TargetKind implements ComboParameter {
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    72
        IMPLICIT(""),
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    73
        SERIALIZABLE("(A & java.io.Serializable)");
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    74
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    75
        String targetStr;
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    76
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    77
        TargetKind(String targetStr) {
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    78
            this.targetStr = targetStr;
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
    79
        }
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    80
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    81
        @Override
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    82
        public String expand(String optParameter) {
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    83
            return targetStr;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    84
        }
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    85
    }
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    86
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    87
    enum DiagnosticKind {
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    88
        LAMBDA_STAT("compiler.note.lambda.stat", true, false),
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    89
        MREF_STAT("compiler.note.mref.stat", false, false),
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    90
        MREF_STAT1("compiler.note.mref.stat.1", false, true);
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    91
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    92
        String code;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    93
        boolean lambda;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    94
        boolean bridge;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    95
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    96
        DiagnosticKind(String code, boolean lambda, boolean bridge) {
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    97
            this.code = code;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    98
            this.lambda = lambda;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
    99
            this.bridge = bridge;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   100
        }
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   101
    }
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   102
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   103
    public static void main(String... args) throws Exception {
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   104
        new ComboTestHelper<TestLambdaToMethodStats>()
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   105
                .withDimension("EXPR", (x, expr) -> x.ek = expr, ExprKind.values())
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   106
                .withDimension("CAST", (x, target) -> x.tk = target, TargetKind.values())
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   107
                .run(TestLambdaToMethodStats::new);
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   108
    }
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   109
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   110
    ExprKind ek;
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   111
    TargetKind tk;
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   112
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   113
    String template = "interface A {\n" +
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   114
            "   Object o();\n" +
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   115
            "}\n" +
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   116
            "class Test {\n" +
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   117
            "   A a = #{CAST}#{EXPR};\n" +
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   118
            "   Object g() { return null; }\n" +
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   119
            "   Object h(Object... o) { return null; }\n" +
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   120
            "}";
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   121
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   122
    @Override
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   123
    public void doWork() throws IOException {
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   124
        check(newCompilationTask()
40835
6ab9ed1abc46 8162546: change hidden options -Xdebug to --debug, -XshouldStop to --should-stop, and -diags to --diags
vromero
parents: 39599
diff changeset
   125
                .withOption("--debug:dumpLambdaToMethodStats")
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   126
                .withSourceFromTemplate(template)
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   127
                .generate());
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   128
    }
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   129
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   130
    void check(Result<?> res) {
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   131
        DiagnosticKind diag = null;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   132
        boolean altMetafactory = false;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   133
        for (DiagnosticKind dk : DiagnosticKind.values()) {
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   134
            List<Diagnostic<? extends JavaFileObject>> jcDiag = res.diagnosticsForKey(dk.code);
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   135
            if (jcDiag.nonEmpty()) {
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   136
                diag = dk;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   137
                ClientCodeWrapper.DiagnosticSourceUnwrapper dsu =
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   138
                        (ClientCodeWrapper.DiagnosticSourceUnwrapper)jcDiag.head;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   139
                altMetafactory = (Boolean)dsu.d.getArgs()[0];
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   140
                break;
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   141
            }
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   142
        }
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   143
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   144
        if (diag == null) {
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   145
            fail("No diagnostic found; " + res.compilationInfo());
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   146
        }
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   147
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   148
        boolean error = diag.lambda !=
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   149
                (ek == ExprKind.LAMBDA);
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   150
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   151
        error |= diag.bridge !=
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   152
                (ek == ExprKind.MREF2);
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   153
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   154
        error |= altMetafactory !=
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   155
                (tk == TargetKind.SERIALIZABLE);
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   156
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   157
        if (error) {
32454
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   158
            fail("Bad stat diagnostic found for source\n" +
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   159
                    "lambda = " + diag.lambda + "\n" +
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   160
                    "bridge = " + diag.bridge + "\n" +
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   161
                    "altMF = " + altMetafactory + "\n" +
b0ac04e0fefe 8129962: Investigate performance improvements in langtools combo tests
mcimadamore
parents: 30730
diff changeset
   162
                    res.compilationInfo());
18386
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   163
        }
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   164
    }
174879d5b5d0 8013576: Add stat support to LambdaToMethod
mcimadamore
parents:
diff changeset
   165
}