changeset 15082:4abf68d7b0b8

PartialEvaluator: quick fix for inlining regression
author Andreas Woess <andreas.woess@jku.at>
date Mon, 14 Apr 2014 11:59:22 +0200
parents 5ffcd28b9340
children 2bcd277b3e6d
files graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java	Mon Apr 14 11:12:39 2014 +0200
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java	Mon Apr 14 11:59:22 2014 +0200
@@ -277,9 +277,6 @@
         }
 
         ResolvedJavaMethod method = methodCallTargetNode.targetMethod();
-        if (!method.getName().equals("call") || method.getSignature().getParameterCount(false) != 1) {
-            return null;
-        }
 
         /*
          * Accessing the constant using the SnippetReflectionProvider is a workaround, we should
@@ -289,6 +286,10 @@
         SnippetReflectionProvider snippetReflection = Graal.getRequiredCapability(SnippetReflectionProvider.class);
         Object receiverValue = snippetReflection.asObject(receiverNode.asConstant());
         if (receiverValue instanceof OptimizedCallNode) {
+            if (!method.getName().equals("call") || method.getSignature().getParameterCount(false) != 2) { // FIXME
+                return null;
+            }
+
             OptimizedCallNode callNode = (OptimizedCallNode) receiverValue;
             TruffleCallPath callPath = methodCallToCallPath.get(methodCallTargetNode);
             if (callPath == null) {