Mercurial > hg > truffle
changeset 4196:ae261db78f68
Remove isFoldable from runtime interface.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 03 Jan 2012 15:36:28 +0100 |
parents | 7703a9f4769f |
children | b765172082ac |
files | graal/com.oracle.max.cri/src/com/sun/cri/ri/RiRuntime.java graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/HotSpotRuntime.java |
diffstat | 2 files changed, 0 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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);