hotspot/test/compiler/compilercontrol/share/pool/sub/Klass.java
author ppunegov
Wed, 20 Jan 2016 20:26:33 +0300
changeset 35587 173b2da63cc3
parent 33081 71794b149055
child 40059 c2304140ed64
permissions -rw-r--r--
8145800: [Testbug] CompilerControl: inline message differs for not inlined methods Summary: Create callables outside the Internal subclasses Reviewed-by: kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33081
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
     1
/*
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
     4
 *
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
     7
 * published by the Free Software Foundation.
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
     8
 *
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    13
 * accompanied this code).
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    14
 *
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    18
 *
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    21
 * questions.
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    22
 */
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    23
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    24
package pool.sub;
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    25
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    26
import pool.MethodHolder;
35587
173b2da63cc3 8145800: [Testbug] CompilerControl: inline message differs for not inlined methods
ppunegov
parents: 33081
diff changeset
    27
import pool.SubMethodHolder;
33081
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    28
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    29
/**
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    30
 * Simple class with methods to test signatures
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    31
 */
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    32
public class Klass extends MethodHolder {
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    33
    public void method(int a, String[] ss, Integer i, byte[] bb, double[][] dd) { }
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    34
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    35
    public void method() { }
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    36
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    37
    public static String smethod() {
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    38
        return "ABC";
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    39
    }
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    40
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    41
    public static String smethod(int iarg, int[] aarg) {
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    42
        return "ABC";
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    43
    }
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    44
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    45
    public static Integer smethod(Integer arg) {
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    46
        Integer var = 1024;
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    47
        return arg + var;
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    48
    }
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    49
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    50
    // Internal class and constructor
35587
173b2da63cc3 8145800: [Testbug] CompilerControl: inline message differs for not inlined methods
ppunegov
parents: 33081
diff changeset
    51
    public static class Internal extends SubMethodHolder {
33081
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    52
        public Internal() { }
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    53
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    54
        public Double method(Float fl) { return Double.valueOf(fl); }
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    55
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    56
        public Double methodDup() {
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    57
            return Math.exp(1.0);
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    58
        }
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    59
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    60
        public static Integer smethod(Integer arg) {
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    61
            Integer var = 1024;
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    62
            return arg + var;
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    63
        }
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    64
    }
71794b149055 8066157: JEP-JDK-8046155: Test task: method matcher
ppunegov
parents:
diff changeset
    65
}