Mercurial > hg > graal-compiler
comparison graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassIsInterfaceNode.java @ 18290:e7d219e9d01f
removed HotSpotObjectConstantImpl.asObject()
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 06 Nov 2014 20:13:08 +0100 |
parents | f7d45e2426d4 |
children | 0f4813e0b4a9 |
comparison
equal
deleted
inserted
replaced
18289:7acff34abbf7 | 18290:e7d219e9d01f |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 package com.oracle.graal.hotspot.nodes; | 23 package com.oracle.graal.hotspot.nodes; |
24 | 24 |
25 import com.oracle.graal.api.meta.*; | |
25 import com.oracle.graal.graph.*; | 26 import com.oracle.graal.graph.*; |
26 import com.oracle.graal.graph.spi.*; | 27 import com.oracle.graal.graph.spi.*; |
27 import com.oracle.graal.hotspot.meta.*; | |
28 import com.oracle.graal.hotspot.replacements.*; | 28 import com.oracle.graal.hotspot.replacements.*; |
29 import com.oracle.graal.nodeinfo.*; | 29 import com.oracle.graal.nodeinfo.*; |
30 import com.oracle.graal.nodes.*; | 30 import com.oracle.graal.nodes.*; |
31 import com.oracle.graal.replacements.nodes.*; | 31 import com.oracle.graal.replacements.nodes.*; |
32 | 32 |
52 | 52 |
53 @Override | 53 @Override |
54 public Node canonical(CanonicalizerTool tool) { | 54 public Node canonical(CanonicalizerTool tool) { |
55 ValueNode javaClass = getJavaClass(); | 55 ValueNode javaClass = getJavaClass(); |
56 if (javaClass.isConstant()) { | 56 if (javaClass.isConstant()) { |
57 Class<?> c = (Class<?>) HotSpotObjectConstantImpl.asObject(javaClass.asJavaConstant()); | 57 ConstantReflectionProvider constantReflection = tool.getConstantReflection(); |
58 if (c != null) { | 58 ResolvedJavaType type = constantReflection.asJavaType(javaClass.asJavaConstant()); |
59 return ConstantNode.forBoolean(c.isInterface()); | 59 if (type != null) { |
60 return ConstantNode.forBoolean(type.isInterface()); | |
60 } | 61 } |
61 } | 62 } |
62 return this; | 63 return this; |
63 } | 64 } |
64 } | 65 } |