Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/TypeSystemTest.java @ 16830:c3c07046a74b
Truffle-DSL: fixed guard solve of guards for interfaces.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 14 Aug 2014 15:02:17 +0200 |
parents | 5148aab962af |
children | c5db657d93c1 |
comparison
equal
deleted
inserted
replaced
16829:e3724f25056a | 16830:c3c07046a74b |
---|---|
29 import com.oracle.truffle.api.frame.*; | 29 import com.oracle.truffle.api.frame.*; |
30 import com.oracle.truffle.api.nodes.*; | 30 import com.oracle.truffle.api.nodes.*; |
31 | 31 |
32 public class TypeSystemTest { | 32 public class TypeSystemTest { |
33 | 33 |
34 @TypeSystem({int.class, double.class, boolean.class, BigInteger.class, String.class, CallTarget.class, BExtendsAbstract.class, CExtendsAbstract.class, Abstract.class, Object[].class}) | 34 @TypeSystem({int.class, double.class, boolean.class, BigInteger.class, String.class, CallTarget.class, BExtendsAbstract.class, CExtendsAbstract.class, Abstract.class, Interface.class, |
35 Object[].class}) | |
35 static class SimpleTypes { | 36 static class SimpleTypes { |
36 | 37 |
37 static int intCheck; | 38 static int intCheck; |
38 static int intCast; | 39 static int intCast; |
39 | 40 |
100 return SimpleTypesGen.SIMPLETYPES.expectAbstract(execute(frame)); | 101 return SimpleTypesGen.SIMPLETYPES.expectAbstract(execute(frame)); |
101 } | 102 } |
102 | 103 |
103 public double executeDouble(VirtualFrame frame) throws UnexpectedResultException { | 104 public double executeDouble(VirtualFrame frame) throws UnexpectedResultException { |
104 return SimpleTypesGen.SIMPLETYPES.expectDouble(execute(frame)); | 105 return SimpleTypesGen.SIMPLETYPES.expectDouble(execute(frame)); |
106 } | |
107 | |
108 public Interface executeInterface(VirtualFrame frame) throws UnexpectedResultException { | |
109 return SimpleTypesGen.SIMPLETYPES.expectInterface(execute(frame)); | |
105 } | 110 } |
106 | 111 |
107 public Object execute(@SuppressWarnings("unused") VirtualFrame frame) { | 112 public Object execute(@SuppressWarnings("unused") VirtualFrame frame) { |
108 throw new UnsupportedOperationException(); | 113 throw new UnsupportedOperationException(); |
109 } | 114 } |
182 static final class CExtendsAbstract extends Abstract { | 187 static final class CExtendsAbstract extends Abstract { |
183 | 188 |
184 static final CExtendsAbstract INSTANCE = new CExtendsAbstract(); | 189 static final CExtendsAbstract INSTANCE = new CExtendsAbstract(); |
185 } | 190 } |
186 | 191 |
192 interface Interface { | |
193 } | |
187 } | 194 } |