Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/ast/CodeExecutableElement.java @ 8248:c4c3f50fa9c2
Fixes for codegen builtins support.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 12 Mar 2013 11:37:32 +0100 |
parents | 91cc98eae8ee |
children | fbf25ec7aa5e |
comparison
equal
deleted
inserted
replaced
8247:5b08b0f4d338 | 8248:c4c3f50fa9c2 |
---|---|
202 @Override | 202 @Override |
203 public <R, P> R accept(ElementVisitor<R, P> v, P p) { | 203 public <R, P> R accept(ElementVisitor<R, P> v, P p) { |
204 return v.visitExecutable(this, p); | 204 return v.visitExecutable(this, p); |
205 } | 205 } |
206 | 206 |
207 public static CodeExecutableElement clone(ProcessingEnvironment env, ExecutableElement method) { | 207 public static CodeExecutableElement clone(@SuppressWarnings("unused") ProcessingEnvironment env, ExecutableElement method) { |
208 CodeExecutableElement copy = new CodeExecutableElement(method.getReturnType(), method.getSimpleName().toString()); | 208 CodeExecutableElement copy = new CodeExecutableElement(method.getReturnType(), method.getSimpleName().toString()); |
209 for (TypeMirror thrownType : method.getThrownTypes()) { | 209 for (TypeMirror thrownType : method.getThrownTypes()) { |
210 copy.addThrownType(thrownType); | 210 copy.addThrownType(thrownType); |
211 } | 211 } |
212 copy.setDefaultValue(method.getDefaultValue()); | 212 copy.setDefaultValue(method.getDefaultValue()); |
218 copy.addParameter(var); | 218 copy.addParameter(var); |
219 } | 219 } |
220 for (Element element : method.getEnclosedElements()) { | 220 for (Element element : method.getEnclosedElements()) { |
221 copy.add(element); | 221 copy.add(element); |
222 } | 222 } |
223 copy.setBody(Utils.getMethodBody(env, method)); | |
224 copy.getModifiers().addAll(method.getModifiers()); | 223 copy.getModifiers().addAll(method.getModifiers()); |
225 return copy; | 224 return copy; |
226 } | 225 } |
227 | 226 |
228 } | 227 } |