Mercurial > hg > graal-compiler
annotate test/runtime/lambda-features/PublicStaticInterfaceMethodHandling.java @ 21324:086f931c31ee
LinearScan: move getMaterializedValue to LifetimeAnalysis.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Tue, 12 May 2015 11:12:33 +0200 |
parents | 08236d966eea |
children |
rev | line source |
---|---|
10166
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
1 /* |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
4 * |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
8 * |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
13 * accompanied this code). |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
14 * |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
18 * |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
21 * questions. |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
22 * |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
23 */ |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
24 |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
25 /* |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
26 * @test |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
27 * @bug 8013418 |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
28 * @summary [JDK 8] Test correct handling of static public interface methods |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
29 * @run main/othervm -Xverify:all PublicStaticInterfaceMethodHandling |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
30 */ |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
31 |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
32 class TestClass implements InterfaceWithStaticAndDefaultMethods { |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
33 } |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
34 |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
35 interface InterfaceWithStaticAndDefaultMethods { |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
36 public static String get() { |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
37 return "Hello from StaticMethodInInterface.get()"; |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
38 } |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
39 default void default_method() { |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
40 System.out.println("Default method FunctionalInterface:default_method()"); |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
41 } |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
42 } |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
43 |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
44 public class PublicStaticInterfaceMethodHandling { |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
45 public static void main(String[] args) { |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
46 TestClass tc = new TestClass(); |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
47 tc.default_method(); |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
48 } |
08236d966eea
8013418: assert(i == total_args_passed) in AdapterHandlerLibrary::get_adapter since 8-b87
bharadwaj
parents:
diff
changeset
|
49 } |