Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeData.java @ 8279:cc83fc474fd5
Fixed unsupported generic generation which could also take void as a type.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 14 Mar 2013 13:13:27 +0100 |
parents | 0905d796944a |
children | 3fbe6772dbf6 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeData.java Thu Mar 14 13:11:14 2013 +0100 +++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeData.java Thu Mar 14 13:13:27 2013 +0100 @@ -211,8 +211,16 @@ public ExecutableTypeData findAnyGenericExecutableType(ProcessorContext context) { List<ExecutableTypeData> types = findGenericExecutableTypes(context); - if (!types.isEmpty()) { - return types.get(0); + for (ExecutableTypeData type : types) { + if (type.getType().isGeneric()) { + return type; + } + } + + for (ExecutableTypeData type : types) { + if (!type.getType().isVoid()) { + return type; + } } return null; }