Mercurial > hg > truffle
changeset 12454:ce4836e0212d
Merge.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Wed, 16 Oct 2013 18:27:28 +0200 |
parents | 8970574702a4 (diff) d60cdea43920 (current diff) |
children | d08accd58925 935dcd8ad8eb ce82cdbffe47 |
files | graal/com.oracle.graal.compiler.hsail/src/com/oracle/graal/compiler/hsail/ForEachToGraal.java graal/com.oracle.graal.compiler.hsail/src/com/oracle/graal/compiler/hsail/HSAILBackend.java graal/com.oracle.graal.compiler.hsail/src/com/oracle/graal/compiler/hsail/HSAILCompilationResult.java graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotRuntime.java graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXHotSpotRuntime.java graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotRuntime.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java graal/com.oracle.graal.truffle.printer/src/com/oracle/graal/truffle/printer/InlinePrinterProcessor.java graal/com.oracle.graal.truffle.printer/src/com/oracle/graal/truffle/printer/method/CallStackElement.java graal/com.oracle.graal.truffle.printer/src/com/oracle/graal/truffle/printer/method/MethodHolder.java graal/com.oracle.graal.truffle.printer/src/com/oracle/graal/truffle/printer/method/TruffleMethodNode.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/frame/FrameAccessNode.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/frame/FrameGetNode.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/nodes/frame/FrameSetNode.java |
diffstat | 2 files changed, 19 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/Utils.java Wed Oct 16 16:15:40 2013 +0200 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/Utils.java Wed Oct 16 18:27:28 2013 +0200 @@ -400,7 +400,19 @@ } public static String getQualifiedName(TypeElement element) { - return element.getQualifiedName().toString(); + String qualifiedName = element.getQualifiedName().toString(); + if (qualifiedName.contains("$")) { + /* + * If a class gets loaded in its binary form by the ECJ compiler it fails to produce the + * proper canonical class name. It leaves the $ in the qualified name of the class. So + * one instance of a TypeElement may be loaded in binary and one in source form. The + * current type comparison in #typeEquals compares by the qualified name so the + * qualified name must match. This is basically a hack to fix the returned qualified + * name of eclipse. + */ + qualifiedName = qualifiedName.replace('$', '.'); + } + return qualifiedName; } public static String getQualifiedName(TypeMirror mirror) { @@ -866,6 +878,8 @@ return true; } else if (type1 == null || type2 == null) { return false; + } else if (type1 == type2) { + return true; } String qualified1 = getQualifiedName(type1); String qualified2 = getQualifiedName(type2);
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/typesystem/ImplicitCastData.java Wed Oct 16 16:15:40 2013 +0200 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/typesystem/ImplicitCastData.java Wed Oct 16 18:27:28 2013 +0200 @@ -45,13 +45,14 @@ @Override public int compareTo(TemplateMethod o) { - if (o instanceof ImplicitCastData) { + if (o instanceof ImplicitCastData && sourceType != null) { // implicit casts are ordered by source type since // its also the order in which they are checked. TypeData otherSourceType = ((ImplicitCastData) o).getSourceType(); - return this.sourceType.compareTo(otherSourceType); + if (otherSourceType != null) { + return this.sourceType.compareTo(otherSourceType); + } } return super.compareTo(o); } - }