Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/SystemSubstitutions.java @ 8519:c91917e43c98
-Merge
author | Christos Kotselidis <christos.kotselidis@oracle.com> |
---|---|
date | Tue, 26 Mar 2013 10:51:42 +0100 |
parents | c36e8ded27d4 68b04162180e |
children | b648515abd0a |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/SystemSubstitutions.java Tue Mar 26 10:50:50 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/SystemSubstitutions.java Tue Mar 26 10:51:42 2013 +0100 @@ -65,5 +65,11 @@ } @NodeIntrinsic(value = RuntimeCallNode.class, setStampFromReturnType = true) - public static native long callLong(@ConstantNodeParameter Descriptor descriptor); + public static long callLong(@ConstantNodeParameter Descriptor descriptor) { + if (descriptor == JAVA_TIME_MILLIS) { + return System.currentTimeMillis(); + } + assert descriptor == JAVA_TIME_NANOS; + return System.nanoTime(); + } }