Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/NodeCodeGenerator.java @ 14598:40eedef0a586
Truffle-DSL: fixed some findbugs errors for (CR-2223)
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 18 Mar 2014 19:45:22 +0100 |
parents | b1dded9c748a |
children | fdabadc7980d |
comparison
equal
deleted
inserted
replaced
14597:918b0360bdb2 | 14598:40eedef0a586 |
---|---|
212 } | 212 } |
213 } else { | 213 } else { |
214 if (method.getModifiers().contains(STATIC)) { | 214 if (method.getModifiers().contains(STATIC)) { |
215 builder.type(targetClass.asType()); | 215 builder.type(targetClass.asType()); |
216 } else { | 216 } else { |
217 ActualParameter parameter = null; | 217 ActualParameter firstParameter = null; |
218 for (ActualParameter searchParameter : targetMethod.getParameters()) { | 218 for (ActualParameter searchParameter : targetMethod.getParameters()) { |
219 if (searchParameter.getSpecification().isSignature()) { | 219 if (searchParameter.getSpecification().isSignature()) { |
220 parameter = searchParameter; | 220 firstParameter = searchParameter; |
221 break; | 221 break; |
222 } | 222 } |
223 } | 223 } |
224 ActualParameter sourceParameter = sourceMethod.findParameter(parameter.getLocalName()); | 224 if (firstParameter == null) { |
225 throw new AssertionError(); | |
226 } | |
227 | |
228 ActualParameter sourceParameter = sourceMethod.findParameter(firstParameter.getLocalName()); | |
225 | 229 |
226 if (castedValues && sourceParameter != null) { | 230 if (castedValues && sourceParameter != null) { |
227 builder.string(valueName(sourceParameter, parameter)); | 231 builder.string(valueName(sourceParameter, firstParameter)); |
228 } else { | 232 } else { |
229 builder.string(valueName(parameter)); | 233 builder.string(valueName(firstParameter)); |
230 } | 234 } |
231 } | 235 } |
232 } | 236 } |
233 builder.string("."); | 237 builder.string("."); |
234 } else { | 238 } else { |
2629 continue; | 2633 continue; |
2630 } | 2634 } |
2631 } | 2635 } |
2632 | 2636 |
2633 CodeExecutableElement superConstructor = createSuperConstructor(clazz, constructor); | 2637 CodeExecutableElement superConstructor = createSuperConstructor(clazz, constructor); |
2638 if (superConstructor == null) { | |
2639 continue; | |
2640 } | |
2634 CodeTree body = superConstructor.getBodyTree(); | 2641 CodeTree body = superConstructor.getBodyTree(); |
2635 CodeTreeBuilder builder = superConstructor.createBuilder(); | 2642 CodeTreeBuilder builder = superConstructor.createBuilder(); |
2636 builder.tree(body); | 2643 builder.tree(body); |
2637 | 2644 |
2638 if (node.isPolymorphic()) { | 2645 if (node.isPolymorphic()) { |