Mercurial > hg > truffle
diff graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/SystemIdentityHashCodeNode.java @ 18282:ecf3de366ecc
added HotSpotObjectConstant.getIdentityHashCode()
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 06 Nov 2014 13:24:16 +0100 |
parents | f7d45e2426d4 |
children | f57d86eb036f |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/SystemIdentityHashCodeNode.java Thu Nov 06 13:22:00 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/SystemIdentityHashCodeNode.java Thu Nov 06 13:24:16 2014 +0100 @@ -43,6 +43,10 @@ @Override protected JavaConstant evaluate(JavaConstant param, MetaAccessProvider metaAccess) { - return ImmutableCode.getValue() || param.isNull() ? null : JavaConstant.forInt(System.identityHashCode(HotSpotObjectConstantImpl.asObject(param))); + if (ImmutableCode.getValue() || param.isNull()) { + return null; + } + HotSpotObjectConstant c = (HotSpotObjectConstant) param; + return JavaConstant.forInt(c.getIdentityHashCode()); } }