Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/ExecutableTypeMethodParser.java @ 18761:a665483c3881
Truffle-DSL: new node layout implementation.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 29 Dec 2014 23:38:54 +0100 |
parents | 2db61eddcb97 |
children | a069a87b9a02 |
comparison
equal
deleted
inserted
replaced
18760:6fa3999631d8 | 18761:a665483c3881 |
---|---|
26 import java.util.*; | 26 import java.util.*; |
27 | 27 |
28 import javax.lang.model.element.*; | 28 import javax.lang.model.element.*; |
29 import javax.lang.model.type.*; | 29 import javax.lang.model.type.*; |
30 | 30 |
31 import com.oracle.truffle.api.dsl.*; | |
31 import com.oracle.truffle.dsl.processor.*; | 32 import com.oracle.truffle.dsl.processor.*; |
33 import com.oracle.truffle.dsl.processor.java.*; | |
32 import com.oracle.truffle.dsl.processor.model.*; | 34 import com.oracle.truffle.dsl.processor.model.*; |
33 | 35 |
34 public class ExecutableTypeMethodParser extends NodeMethodParser<ExecutableTypeData> { | 36 public class ExecutableTypeMethodParser extends NodeMethodParser<ExecutableTypeData> { |
35 | 37 |
36 public ExecutableTypeMethodParser(ProcessorContext context, NodeData node) { | 38 public ExecutableTypeMethodParser(ProcessorContext context, NodeData node) { |
75 public final boolean isParsable(ExecutableElement method) { | 77 public final boolean isParsable(ExecutableElement method) { |
76 if (method.getModifiers().contains(Modifier.STATIC)) { | 78 if (method.getModifiers().contains(Modifier.STATIC)) { |
77 return false; | 79 return false; |
78 } else if (method.getModifiers().contains(Modifier.NATIVE)) { | 80 } else if (method.getModifiers().contains(Modifier.NATIVE)) { |
79 return false; | 81 return false; |
82 } else if (ElementUtils.findAnnotationMirror(getContext().getEnvironment(), method, Specialization.class) != null) { | |
83 return false; | |
80 } | 84 } |
81 return method.getSimpleName().toString().startsWith("execute"); | 85 return method.getSimpleName().toString().startsWith("execute"); |
82 } | 86 } |
83 | 87 |
84 @Override | 88 @Override |