11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test CorrectnessTest
26 * @bug 8038418
27 * @library /testlibrary /testlibrary/whitebox
28 * @compile execution/TypeConflict.java execution/TypeProfile.java
29 * execution/MethodHandleDelegate.java
30 * @build CorrectnessTest
31 * @run main ClassFileInstaller sun.hotspot.WhiteBox
32 * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions
33 * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
34 * -XX:TypeProfileLevel=222 -XX:+UseTypeSpeculation
35 * -XX:CompileCommand=exclude,execution/*::methodNotToCompile
36 * -XX:CompileCommand=dontinline,scenarios/Scenario::collectReturnType
37 * CorrectnessTest RETURN
38 * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions
39 * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
40 * -XX:TypeProfileLevel=222 -XX:+UseTypeSpeculation
41 * -XX:CompileCommand=exclude,execution/*::methodNotToCompile
42 * -XX:CompileCommand=dontinline,scenarios/Scenario::collectReturnType
43 * CorrectnessTest PARAMETERS
44 * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions
45 * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
46 * -XX:TypeProfileLevel=222 -XX:+UseTypeSpeculation
47 * -XX:CompileCommand=exclude,execution/*::methodNotToCompile
48 * -XX:CompileCommand=dontinline,scenarios/Scenario::collectReturnType
49 * CorrectnessTest ARGUMENTS
50 * @summary Tests correctness of type usage with type profiling and speculations
51 */
52
53 import com.oracle.java.testlibrary.Asserts;
54 import com.oracle.java.testlibrary.Platform;
55 import execution.Execution;
56 import execution.MethodHandleDelegate;
57 import execution.TypeConflict;
58 import execution.TypeProfile;
59 import hierarchies.*;
60 import scenarios.*;
61 import sun.hotspot.WhiteBox;
62
63 import java.lang.reflect.Constructor;
64 import java.lang.reflect.Method;
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test CorrectnessTest
26 * @bug 8038418
27 * @library /testlibrary /testlibrary/whitebox
28 * @compile execution/TypeConflict.java execution/TypeProfile.java
29 * execution/MethodHandleDelegate.java
30 * @build CorrectnessTest
31 * @run main/othervm/bootclasspath -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions
32 * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
33 * -XX:TypeProfileLevel=222 -XX:+UseTypeSpeculation
34 * -XX:CompileCommand=exclude,execution/*::methodNotToCompile
35 * -XX:CompileCommand=dontinline,scenarios/Scenario::collectReturnType
36 * CorrectnessTest RETURN
37 * @run main/othervm/bootclasspath -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions
38 * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
39 * -XX:TypeProfileLevel=222 -XX:+UseTypeSpeculation
40 * -XX:CompileCommand=exclude,execution/*::methodNotToCompile
41 * -XX:CompileCommand=dontinline,scenarios/Scenario::collectReturnType
42 * CorrectnessTest PARAMETERS
43 * @run main/othervm/bootclasspath -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions
44 * -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
45 * -XX:TypeProfileLevel=222 -XX:+UseTypeSpeculation
46 * -XX:CompileCommand=exclude,execution/*::methodNotToCompile
47 * -XX:CompileCommand=dontinline,scenarios/Scenario::collectReturnType
48 * CorrectnessTest ARGUMENTS
49 * @summary Tests correctness of type usage with type profiling and speculations
50 */
51
52 import com.oracle.java.testlibrary.Asserts;
53 import com.oracle.java.testlibrary.Platform;
54 import execution.Execution;
55 import execution.MethodHandleDelegate;
56 import execution.TypeConflict;
57 import execution.TypeProfile;
58 import hierarchies.*;
59 import scenarios.*;
60 import sun.hotspot.WhiteBox;
61
62 import java.lang.reflect.Constructor;
63 import java.lang.reflect.Method;
|