Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/ImplicitCastParser.java @ 16820:0370880ac9ce
Truffle-DSL: better caching for type checks.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 13 Aug 2014 18:06:26 +0200 |
parents | 23415229349b |
children | 3912400fc33a |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/ImplicitCastParser.java Wed Aug 13 18:06:18 2014 +0200 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/parser/ImplicitCastParser.java Wed Aug 13 18:06:26 2014 +0200 @@ -45,12 +45,10 @@ @Override public MethodSpec createSpecification(ExecutableElement method, AnnotationMirror mirror) { - List<TypeMirror> types = new ArrayList<>(); - for (TypeData typeData : getTypeSystem().getTypes()) { - types.add(typeData.getPrimitiveType()); - } - MethodSpec spec = new MethodSpec(new ParameterSpec("target", types)); - spec.addRequired(new ParameterSpec("source", types)); + List<TypeMirror> types = getTypeSystem().getPrimitiveTypeMirrors(); + Set<String> identifiers = getTypeSystem().getTypeIdentifiers(); + MethodSpec spec = new MethodSpec(new ParameterSpec("target", types, identifiers)); + spec.addRequired(new ParameterSpec("source", types, identifiers)); return spec; }