Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/java/ElementUtils.java @ 16818:8169deda04bb
Truffle-DSL: introduced identifiers for type matching.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 13 Aug 2014 18:06:18 +0200 |
parents | c22fc3f48c60 |
children | 0370880ac9ce |
comparison
equal
deleted
inserted
replaced
16817:85c6e6fc3961 | 16818:8169deda04bb |
---|---|
904 return true; | 904 return true; |
905 } else if (type1 == null || type2 == null) { | 905 } else if (type1 == null || type2 == null) { |
906 return false; | 906 return false; |
907 } else { | 907 } else { |
908 if (type1.getKind() == type2.getKind()) { | 908 if (type1.getKind() == type2.getKind()) { |
909 return type1.toString().equals(type2.toString()); | 909 return getUniqueIdentifier(type1).equals(getUniqueIdentifier(type2)); |
910 } else { | 910 } else { |
911 return false; | 911 return false; |
912 } | 912 } |
913 } | 913 } |
914 } | |
915 | |
916 public static String getUniqueIdentifier(TypeMirror typeMirror) { | |
917 return fixECJBinaryNameIssue(typeMirror.toString()); | |
914 } | 918 } |
915 | 919 |
916 public static int compareByTypeHierarchy(TypeMirror t1, TypeMirror t2) { | 920 public static int compareByTypeHierarchy(TypeMirror t1, TypeMirror t2) { |
917 if (typeEquals(t1, t2)) { | 921 if (typeEquals(t1, t2)) { |
918 return 0; | 922 return 0; |