comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/java/ElementUtils.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 8169deda04bb
children 28e29a4b0b97
comparison
equal deleted inserted replaced
16819:8d374faacb7e 16820:0370880ac9ce
912 } 912 }
913 } 913 }
914 } 914 }
915 915
916 public static String getUniqueIdentifier(TypeMirror typeMirror) { 916 public static String getUniqueIdentifier(TypeMirror typeMirror) {
917 return fixECJBinaryNameIssue(typeMirror.toString()); 917 if (typeMirror.getKind() == TypeKind.ARRAY) {
918 return getUniqueIdentifier(((ArrayType) typeMirror).getComponentType()) + "[]";
919 } else {
920 return getQualifiedName(typeMirror);
921 }
918 } 922 }
919 923
920 public static int compareByTypeHierarchy(TypeMirror t1, TypeMirror t2) { 924 public static int compareByTypeHierarchy(TypeMirror t1, TypeMirror t2) {
921 if (typeEquals(t1, t2)) { 925 if (typeEquals(t1, t2)) {
922 return 0; 926 return 0;