Mercurial > hg > graal-compiler
changeset 22654:4fca22325604
Use dummy PlatformKind in platform independent backend test.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Fri, 18 Sep 2015 11:41:06 +0200 |
parents | 9ca1a782b6c7 |
children | 8372e2859f3a |
files | graal/com.oracle.graal.lir.test/src/com/oracle/graal/lir/test/GenericValueMapTest.java |
diffstat | 1 files changed, 29 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.lir.test/src/com/oracle/graal/lir/test/GenericValueMapTest.java Thu Sep 17 22:15:07 2015 -0700 +++ b/graal/com.oracle.graal.lir.test/src/com/oracle/graal/lir/test/GenericValueMapTest.java Fri Sep 18 11:41:06 2015 +0200 @@ -27,8 +27,9 @@ import jdk.internal.jvmci.code.Register; import jdk.internal.jvmci.code.Register.RegisterCategory; import jdk.internal.jvmci.code.RegisterValue; -import jdk.internal.jvmci.meta.JavaKind; +import jdk.internal.jvmci.meta.JavaConstant; import jdk.internal.jvmci.meta.LIRKind; +import jdk.internal.jvmci.meta.PlatformKind; import org.junit.Test; @@ -37,12 +38,38 @@ public class GenericValueMapTest { + private static enum DummyKind implements PlatformKind { + Long; + + private EnumKey<DummyKind> key = new EnumKey<>(this); + + public Key getKey() { + return key; + } + + public int getSizeInBytes() { + return 8; + } + + public int getVectorLength() { + return 1; + } + + public char getTypeChar() { + return 'l'; + } + + public JavaConstant getDefaultValue() { + return null; + } + } + @Test public void run0() { RegisterCategory cat = new RegisterCategory("regs"); RegisterValue reg = new Register(0, 0, "reg0", cat).asValue(); - Variable var = new Variable(LIRKind.value(JavaKind.Long), 0); + Variable var = new Variable(LIRKind.value(DummyKind.Long), 0); Object obj0 = new Object(); Object obj1 = new Object();