comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/NodeMethodParser.java @ 20966:05a2b72c071f

Truffle-DSL: fixed potential non generic executes in uninitialized nodes.
author Christian Humer <christian.humer@gmail.com>
date Wed, 15 Apr 2015 13:49:38 +0200
parents 833e088ee7d3
children
comparison
equal deleted inserted replaced
20965:05e1ab8c5c6a 20966:05a2b72c071f
56 returnValue.setExecution(getNode().getThisExecution()); 56 returnValue.setExecution(getNode().getThisExecution());
57 return returnValue; 57 return returnValue;
58 } 58 }
59 59
60 protected Collection<TypeMirror> getPossibleReturnTypes() { 60 protected Collection<TypeMirror> getPossibleReturnTypes() {
61 List<TypeMirror> possibleTypes = getNode().getGenericTypes(getNode().getThisExecution()); 61 return Arrays.asList(getNode().getGenericType(getNode().getThisExecution()));
62 if (possibleTypes.size() > 1) {
63 return Arrays.asList(ElementUtils.getCommonSuperType(getContext(), possibleTypes));
64 } else {
65 return possibleTypes;
66 }
67 } 62 }
68 63
69 @Override 64 @Override
70 public boolean isParsable(ExecutableElement method) { 65 public boolean isParsable(ExecutableElement method) {
71 if (getAnnotationType() != null) { 66 if (getAnnotationType() != null) {