Mercurial > hg > truffle
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/model/ParameterSpec.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 | c0fb70634640 |
children | 18c0f02fa4d2 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/model/ParameterSpec.java Mon Dec 29 18:32:03 2014 +0100 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/model/ParameterSpec.java Tue Feb 03 15:07:07 2015 +0100 @@ -24,6 +24,7 @@ import java.util.*; +import javax.lang.model.element.*; import javax.lang.model.type.*; import com.oracle.truffle.dsl.processor.java.*; @@ -114,8 +115,11 @@ return allowedTypes; } - public boolean matches(TypeMirror actualType) { - return allowedTypesIdentifier.contains(ElementUtils.getUniqueIdentifier(actualType)); + public boolean matches(VariableElement variable) { + if (allowedTypesIdentifier != null) { + return allowedTypesIdentifier.contains(ElementUtils.getUniqueIdentifier(variable.asType())); + } + return true; } @Override