Mercurial > hg > graal-jvmci-8
changeset 19354:343e0e71031b
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 13 Feb 2015 12:54:34 +0100 |
parents | 8d09a572da84 (diff) dd7d436a7e19 (current diff) |
children | 1c2e8a440bbd |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassIsAssignableFromNode.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/ClassIsInstanceNode.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ClassSubstitutions.java |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotGraphBuilderPlugins.java Fri Feb 13 12:00:26 2015 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotGraphBuilderPlugins.java Fri Feb 13 12:54:34 2015 +0100 @@ -65,11 +65,10 @@ r = new Registration(plugins, metaAccess, Class.class); r.register2("cast", Receiver.class, Object.class, new InvocationPlugin() { public boolean apply(GraphBuilderContext builder, ValueNode rcvr, ValueNode object) { - if (rcvr.isConstant() && !rcvr.isNullConstant() && object.isConstant()) { + if (rcvr.isConstant() && !rcvr.isNullConstant()) { ResolvedJavaType type = builder.getConstantReflection().asJavaType(rcvr.asConstant()); - if (type != null && !type.isPrimitive() && type.isInstance(object.asJavaConstant())) { - builder.push(Kind.Object, object); - return true; + if (type != null && !type.isPrimitive()) { + builder.push(Kind.Object, CheckCastNode.create(type, object, null, false, builder.getAssumptions())); } } return false;