Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/ShortCircuitParser.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 |
---|---|
46 } | 46 } |
47 } | 47 } |
48 | 48 |
49 @Override | 49 @Override |
50 public MethodSpec createSpecification(ExecutableElement method, AnnotationMirror mirror) { | 50 public MethodSpec createSpecification(ExecutableElement method, AnnotationMirror mirror) { |
51 String shortCircuitValue = Utils.getAnnotationValueString(mirror, "value"); | 51 String shortCircuitValue = Utils.getAnnotationValue(String.class, mirror, "value"); |
52 | 52 |
53 if (!shortCircuitValues.contains(shortCircuitValue)) { | 53 if (!shortCircuitValues.contains(shortCircuitValue)) { |
54 getContext().getLog().error(method, mirror, "Invalid short circuit value %s.", shortCircuitValue); | 54 getContext().getLog().error(method, mirror, "Invalid short circuit value %s.", shortCircuitValue); |
55 return null; | 55 return null; |
56 } | 56 } |
63 return new ParameterSpec("has", getContext().getType(boolean.class), false); | 63 return new ParameterSpec("has", getContext().getType(boolean.class), false); |
64 } | 64 } |
65 | 65 |
66 @Override | 66 @Override |
67 public ShortCircuitData create(TemplateMethod method) { | 67 public ShortCircuitData create(TemplateMethod method) { |
68 String shortCircuitValue = Utils.getAnnotationValueString(method.getMarkerAnnotation(), "value"); | 68 String shortCircuitValue = Utils.getAnnotationValue(String.class, method.getMarkerAnnotation(), "value"); |
69 assert shortCircuitValue != null; | 69 assert shortCircuitValue != null; |
70 assert shortCircuitValues.contains(shortCircuitValue); | 70 assert shortCircuitValues.contains(shortCircuitValue); |
71 return new ShortCircuitData(method, shortCircuitValue); | 71 return new ShortCircuitData(method, shortCircuitValue); |
72 } | 72 } |
73 | 73 |