# HG changeset patch # User Doug Simon # Date 1364298782 -3600 # Node ID e9dad49ce33623fe5b57ee13b21357a68e10b431 # Parent abf5a4554bae756c4eed0cc5ca08b0401caecffa made method substitutions for System be interpretable diff -r abf5a4554bae -r e9dad49ce336 graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/HotSpotMethodSubstitutionTest.java --- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/HotSpotMethodSubstitutionTest.java Tue Mar 26 12:48:44 2013 +0100 +++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/HotSpotMethodSubstitutionTest.java Tue Mar 26 12:53:02 2013 +0100 @@ -125,6 +125,12 @@ public void testSystemSubstitutions() { test("systemTime"); test("systemIdentityHashCode"); + + SystemSubstitutions.currentTimeMillis(); + SystemSubstitutions.nanoTime(); + for (Object o : new Object[]{this, new int[5], new String[2][], new Object()}) { + assertEquals(System.identityHashCode(o), SystemSubstitutions.identityHashCode(o)); + } } @SuppressWarnings("all") diff -r abf5a4554bae -r e9dad49ce336 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/IdentityHashCodeStubCall.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/IdentityHashCodeStubCall.java Tue Mar 26 12:48:44 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/IdentityHashCodeStubCall.java Tue Mar 26 12:53:02 2013 +0100 @@ -52,5 +52,7 @@ } @NodeIntrinsic - public static native int call(Object object); + public static int call(Object object) { + return System.identityHashCode(object); + } } diff -r abf5a4554bae -r e9dad49ce336 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BranchProbabilityNode.java --- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BranchProbabilityNode.java Tue Mar 26 12:48:44 2013 +0100 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/BranchProbabilityNode.java Tue Mar 26 12:53:02 2013 +0100 @@ -75,7 +75,9 @@ GraphUtil.killCFG(this); } + @SuppressWarnings("unused") @NodeIntrinsic - public static native void probability(@ConstantNodeParameter double probability); + public static void probability(@ConstantNodeParameter double probability) { + } }