# HG changeset patch # User Thomas Wuerthinger # Date 1325601388 -3600 # Node ID ae261db78f68cb82c47c00044cf230f367b8ef87 # Parent 7703a9f4769f5c2e36f37f3b96ecec64195ae9df Remove isFoldable from runtime interface. diff -r 7703a9f4769f -r ae261db78f68 graal/com.oracle.max.cri/src/com/sun/cri/ri/RiRuntime.java --- a/graal/com.oracle.max.cri/src/com/sun/cri/ri/RiRuntime.java Tue Jan 03 15:34:46 2012 +0100 +++ b/graal/com.oracle.max.cri/src/com/sun/cri/ri/RiRuntime.java Tue Jan 03 15:36:28 2012 +0100 @@ -117,26 +117,6 @@ boolean isExceptionType(RiResolvedType type); /** - * Checks whether this method is foldable (i.e. if it is a pure function without side effects). - * @param method the method that is checked - * @return whether the method is foldable - */ - boolean isFoldable(RiResolvedMethod method); - - /** - * Attempts to compile-time evaluate or "fold" a call to a given method. A foldable method is a pure function - * that has no side effects. Such methods can be executed via reflection when all their inputs are constants, - * and the resulting value is substituted for the method call. May only be called on methods for which - * isFoldable(method) returns {@code true}. The array of constant for arguments may contain {@code null} values, which - * means that this particular argument does not evaluate to a compile time constant. - * - * @param method the compiler interface method for which folding is being requested - * @param args the arguments to the call as an array of CiConstant objects - * @return the result of the folding or {@code null} if no folding occurred - */ - CiConstant fold(RiResolvedMethod method, CiConstant[] args); - - /** * Used by the canonicalizer to compare objects, since a given runtime might not want to expose the real objects to the compiler. * * @return true if the two parameters represent the same runtime object, false otherwise diff -r 7703a9f4769f -r ae261db78f68 graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/HotSpotRuntime.java --- a/graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/HotSpotRuntime.java Tue Jan 03 15:34:46 2012 +0100 +++ b/graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/HotSpotRuntime.java Tue Jan 03 15:36:28 2012 +0100 @@ -159,15 +159,6 @@ return 8; } - public boolean isFoldable(RiResolvedMethod method) { - return false; - } - - @Override - public CiConstant fold(RiResolvedMethod method, CiConstant[] args) { - return null; - } - @Override public boolean areConstantObjectsEqual(CiConstant x, CiConstant y) { return compiler.getVMEntries().compareConstantObjects(x, y);