Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/ExecutableTypeMethodParser.java @ 9780:763100239da6
Fixed GRAAL-276.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 21 May 2013 19:20:53 +0200 |
parents | 97ad6d3e7557 |
children | f43eb2f1bbbc |
comparison
equal
deleted
inserted
replaced
9779:0e4db5ee0695 | 9780:763100239da6 |
---|---|
42 } | 42 } |
43 | 43 |
44 @Override | 44 @Override |
45 public MethodSpec createSpecification(ExecutableElement method, AnnotationMirror mirror) { | 45 public MethodSpec createSpecification(ExecutableElement method, AnnotationMirror mirror) { |
46 MethodSpec spec = createDefaultMethodSpec(method, mirror, false, null); | 46 MethodSpec spec = createDefaultMethodSpec(method, mirror, false, null); |
47 List<ParameterSpec> requiredSpecs = new ArrayList<>(spec.getRequired()); | |
48 spec.getRequired().clear(); | |
49 | |
50 for (ParameterSpec originalSpec : requiredSpecs) { | |
51 spec.addRequired(new ParameterSpec(originalSpec, Arrays.asList(getNode().getTypeSystem().getGenericType()))); | |
52 } | |
53 | |
47 spec.setVariableRequiredArguments(true); | 54 spec.setVariableRequiredArguments(true); |
48 ParameterSpec other = new ParameterSpec("other", nodeTypeMirrors(getNode())); | 55 ParameterSpec other = new ParameterSpec("other", Arrays.asList(getNode().getTypeSystem().getGenericType())); |
49 other.setCardinality(Cardinality.MANY); | 56 other.setCardinality(Cardinality.MANY); |
50 other.setSignature(true); | 57 other.setSignature(true); |
51 other.setIndexed(true); | 58 other.setIndexed(true); |
52 spec.addRequired(other); | 59 spec.addRequired(other); |
53 return spec; | 60 return spec; |