Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/SpecializationMethodParser.java @ 19289:62c43fcf5be2
Truffle-DSL: implement @Cached and fixes for the new guard expression syntax.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 03 Feb 2015 15:07:07 +0100 |
parents | 08aa0372dad4 |
children | f4792a544170 |
comparison
equal
deleted
inserted
replaced
19288:3a37116ef37f | 19289:62c43fcf5be2 |
---|---|
40 super(context, operation); | 40 super(context, operation); |
41 } | 41 } |
42 | 42 |
43 @Override | 43 @Override |
44 public MethodSpec createSpecification(ExecutableElement method, AnnotationMirror mirror) { | 44 public MethodSpec createSpecification(ExecutableElement method, AnnotationMirror mirror) { |
45 return createDefaultMethodSpec(method, mirror, true, null); | 45 MethodSpec spec = createDefaultMethodSpec(method, mirror, true, null); |
46 spec.getAnnotations().add(new AnnotatedParameterSpec(getContext().getDeclaredType(Cached.class))); | |
47 return spec; | |
46 } | 48 } |
47 | 49 |
48 @Override | 50 @Override |
49 public SpecializationData create(TemplateMethod method, boolean invalid) { | 51 public SpecializationData create(TemplateMethod method, boolean invalid) { |
50 return parseSpecialization(method); | 52 return parseSpecialization(method); |