Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/model/TypeSystemData.java @ 16816:b8470fcec3a3
Truffle-DSL: refined type system type caching
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 13 Aug 2014 18:06:18 +0200 |
parents | e8d9b3827d4b |
children | 8169deda04bb |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/model/TypeSystemData.java Wed Aug 13 18:06:18 2014 +0200 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/model/TypeSystemData.java Wed Aug 13 18:06:18 2014 +0200 @@ -35,7 +35,7 @@ private List<TypeData> types; private List<TypeMirror> primitiveTypeMirrors = new ArrayList<>(); private List<TypeMirror> boxedTypeMirrors = new ArrayList<>(); - private Map<TypeMirror, TypeData> cachedTypes = new HashMap<>(); + private Map<String, TypeData> cachedTypes = new HashMap<>(); private List<ImplicitCastData> implicitCasts; private List<TypeCastData> casts; @@ -59,7 +59,7 @@ for (TypeData typeData : types) { primitiveTypeMirrors.add(typeData.getPrimitiveType()); boxedTypeMirrors.add(typeData.getBoxedType()); - cachedTypes.put(typeData.getPrimitiveType(), typeData); + cachedTypes.put(typeData.getPrimitiveType().toString(), typeData); } } } @@ -154,7 +154,7 @@ } public int findType(TypeMirror type) { - TypeData data = cachedTypes.get(type); + TypeData data = cachedTypes.get(type.toString()); if (data != null) { return data.getIndex(); }