< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InterfaceMethodHandleTest.java

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  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 package org.graalvm.compiler.core.test;
  24 
  25 import java.lang.invoke.MethodHandle;
  26 import java.lang.invoke.MethodHandles;
  27 import java.lang.invoke.MethodType;
  28 
  29 import org.junit.Test;
  30 
  31 import org.graalvm.compiler.code.CompilationResult;
  32 import org.graalvm.compiler.test.ExportingClassLoader;





  33 
  34 import jdk.internal.org.objectweb.asm.ClassWriter;
  35 import jdk.internal.org.objectweb.asm.Label;
  36 import jdk.internal.org.objectweb.asm.MethodVisitor;
  37 import jdk.internal.org.objectweb.asm.Opcodes;
  38 import jdk.vm.ci.code.InstalledCode;
  39 import jdk.vm.ci.meta.ResolvedJavaMethod;
  40 
  41 public final class InterfaceMethodHandleTest extends GraalCompilerTest implements Opcodes {
  42     private static final MethodHandle INTERFACE_HANDLE_M;
  43     private static final MethodHandle INTERFACE_HANDLE_M2;
  44 
  45     public interface I {
  46         int m();
  47 
  48         int m2(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j);
  49     }
  50 
  51     static class A implements I {
  52         @Override
  53         public int m() {
  54             return 0;
  55         }
  56 
  57         @Override




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  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 package org.graalvm.compiler.core.test;
  24 
  25 import java.lang.invoke.MethodHandle;
  26 import java.lang.invoke.MethodHandles;
  27 import java.lang.invoke.MethodType;
  28 


  29 import org.graalvm.compiler.code.CompilationResult;
  30 import org.graalvm.compiler.test.ExportingClassLoader;
  31 import org.junit.Test;
  32 import org.objectweb.asm.ClassWriter;
  33 import org.objectweb.asm.Label;
  34 import org.objectweb.asm.MethodVisitor;
  35 import org.objectweb.asm.Opcodes;
  36 




  37 import jdk.vm.ci.code.InstalledCode;
  38 import jdk.vm.ci.meta.ResolvedJavaMethod;
  39 
  40 public final class InterfaceMethodHandleTest extends GraalCompilerTest implements Opcodes {
  41     private static final MethodHandle INTERFACE_HANDLE_M;
  42     private static final MethodHandle INTERFACE_HANDLE_M2;
  43 
  44     public interface I {
  45         int m();
  46 
  47         int m2(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j);
  48     }
  49 
  50     static class A implements I {
  51         @Override
  52         public int m() {
  53             return 0;
  54         }
  55 
  56         @Override


< prev index next >