changeset 20946:56eb34a5aa22

Truffle-DSL: fixed executable input types do not count as generic if there are implicit casts defined for them.
author Christian Humer <christian.humer@gmail.com>
date Tue, 14 Apr 2015 19:23:33 +0200
parents 1ed58a90b510
children 824ef485081f
files graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/model/NodeData.java
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/model/NodeData.java	Tue Apr 14 19:23:33 2015 +0200
+++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/model/NodeData.java	Tue Apr 14 19:23:33 2015 +0200
@@ -563,7 +563,9 @@
                 if (executable.hasUnexpectedValue(getContext())) {
                     continue;
                 }
-                types.add(executable.getReturnType());
+                if (!typeSystem.hasImplicitSourceTypes(executable.getReturnType())) {
+                    types.add(executable.getReturnType());
+                }
             }
         }
 
@@ -571,7 +573,10 @@
         if (executionIndex >= 0) {
             for (ExecutableTypeData typeData : getExecutableTypes()) {
                 if (executionIndex < typeData.getEvaluatedCount()) {
-                    types.add(typeData.getEvaluatedParameters().get(executionIndex));
+                    TypeMirror genericType = typeData.getEvaluatedParameters().get(executionIndex);
+                    if (!typeSystem.hasImplicitSourceTypes(genericType)) {
+                        types.add(genericType);
+                    }
                 }
             }
         }