Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/template/TemplateMethodParser.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 | 703c09f8640c |
children | 0905d796944a |
comparison
equal
deleted
inserted
replaced
8247:5b08b0f4d338 | 8248:c4c3f50fa9c2 |
---|---|
94 AnnotationMirror mirror = null; | 94 AnnotationMirror mirror = null; |
95 if (annotationType != null) { | 95 if (annotationType != null) { |
96 mirror = Utils.findAnnotationMirror(getContext().getEnvironment(), method, annotationType); | 96 mirror = Utils.findAnnotationMirror(getContext().getEnvironment(), method, annotationType); |
97 } | 97 } |
98 | 98 |
99 if (method.getModifiers().contains(Modifier.PRIVATE)) { | 99 if (method.getModifiers().contains(Modifier.PRIVATE) && emitErrors) { |
100 getContext().getLog().error(method, "Method must not be private."); | 100 getContext().getLog().error(method, "Method must not be private."); |
101 valid = false; | 101 valid = false; |
102 continue; | 102 continue; |
103 } | 103 } |
104 | 104 |
158 } | 158 } |
159 | 159 |
160 String id = method.getSimpleName().toString(); | 160 String id = method.getSimpleName().toString(); |
161 AnnotationMirror idAnnotation = Utils.findAnnotationMirror(context.getEnvironment(), method, NodeId.class); | 161 AnnotationMirror idAnnotation = Utils.findAnnotationMirror(context.getEnvironment(), method, NodeId.class); |
162 if (idAnnotation != null) { | 162 if (idAnnotation != null) { |
163 id = Utils.getAnnotationValueString(idAnnotation, "value"); | 163 id = Utils.getAnnotationValue(String.class, idAnnotation, "value"); |
164 } | 164 } |
165 | 165 |
166 return create(new TemplateMethod(id, template, methodSpecification, method, annotation, returnTypeMirror, parameters)); | 166 return create(new TemplateMethod(id, template, methodSpecification, method, annotation, returnTypeMirror, parameters)); |
167 } | 167 } |
168 | 168 |