diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/model/NodeData.java @ 20984:6361fa2e3321

Truffle-DSL: further fixes for polymorphic execute signatures.
author Christian Humer <christian.humer@oracle.com>
date Wed, 15 Apr 2015 21:13:43 +0200
parents 05a2b72c071f
children 8e5f9310f3aa
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/model/NodeData.java	Wed Apr 15 21:35:51 2015 +0200
+++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/model/NodeData.java	Wed Apr 15 21:13:43 2015 +0200
@@ -134,8 +134,19 @@
         return types;
     }
 
+    public int getExecutionCount() {
+        return getChildExecutions().size();
+    }
+
     public int getSignatureSize() {
-        return getChildExecutions().size();
+        int count = 0;
+        for (NodeExecutionData execution : getChildExecutions()) {
+            if (execution.isShortCircuit()) {
+                count++;
+            }
+            count++;
+        }
+        return count;
     }
 
     public boolean isFrameUsedByAnyGuard() {
@@ -567,20 +578,17 @@
                 if (executable.hasUnexpectedValue(getContext())) {
                     continue;
                 }
-                if (!typeSystem.hasImplicitSourceTypes(executable.getReturnType())) {
-                    types.add(executable.getReturnType());
-                }
+                types.add(executable.getReturnType());
             }
         }
 
         int executionIndex = execution.getIndex();
         if (executionIndex >= 0) {
             for (ExecutableTypeData typeData : getExecutableTypes()) {
-                if (executionIndex < typeData.getEvaluatedCount()) {
-                    TypeMirror genericType = typeData.getEvaluatedParameters().get(executionIndex);
-                    if (!typeSystem.hasImplicitSourceTypes(genericType)) {
-                        types.add(genericType);
-                    }
+                List<TypeMirror> signatureParameters = typeData.getSignatureParameters();
+                if (executionIndex < signatureParameters.size()) {
+                    TypeMirror genericType = signatureParameters.get(executionIndex);
+                    types.add(genericType);
                 }
             }
         }