Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/generator/NodeGenFactory.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 | 56a30cfcefaf |
children | 6361fa2e3321 |
comparison
equal
deleted
inserted
replaced
20965:05e1ab8c5c6a | 20966:05a2b72c071f |
---|---|
1681 | 1681 |
1682 LocalVariable var = currentLocals.getValue(execution); | 1682 LocalVariable var = currentLocals.getValue(execution); |
1683 if (var == null) { | 1683 if (var == null) { |
1684 TypeMirror targetType; | 1684 TypeMirror targetType; |
1685 if (specialization == null) { | 1685 if (specialization == null) { |
1686 List<TypeMirror> genericTypes = node.getGenericTypes(execution); | 1686 targetType = node.getGenericType(execution); |
1687 if (genericTypes.isEmpty()) { | |
1688 targetType = genericType; | |
1689 } else { | |
1690 targetType = genericTypes.get(0); | |
1691 } | |
1692 } else { | 1687 } else { |
1693 targetType = specialization.findParameterOrDie(execution).getType(); | 1688 targetType = specialization.findParameterOrDie(execution).getType(); |
1694 } | 1689 } |
1695 LocalVariable shortCircuit = resolveShortCircuit(specialization, execution, currentLocals); | 1690 LocalVariable shortCircuit = resolveShortCircuit(specialization, execution, currentLocals); |
1696 var = currentLocals.createValue(execution, targetType).nextName(); | 1691 var = currentLocals.createValue(execution, targetType).nextName(); |