8210434: [Graal] 8209301 prevents GitHub Graal from compiling with latest JDK
Reviewed-by: dnsimon, kvn
--- a/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/AOTCompiledClass.java Mon Sep 10 19:18:04 2018 -0400
+++ b/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/AOTCompiledClass.java Mon Sep 10 16:33:05 2018 -0700
@@ -74,7 +74,7 @@
this.dependentMethods = new ArrayList<>();
this.classId = classId;
this.type = type;
- this.metadataName = type.isUnsafeAnonymous() ? "anon<" + classId + ">" : type.getName();
+ this.metadataName = type.isAnonymous() ? "anon<" + classId + ">" : type.getName();
this.gotIndex = binaryContainer.addTwoSlotKlassSymbol(metadataName);
this.compiledMethodsOffset = -1; // Not compiled classes do not have compiled methods.
this.dependentMethodsOffset = -1;
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectType.java Mon Sep 10 19:18:04 2018 -0400
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectType.java Mon Sep 10 16:33:05 2018 -0700
@@ -110,6 +110,21 @@
@Override
ResolvedJavaMethod getClassInitializer();
+ /**
+ * Checks whether this type is an unsafe anonymous class.
+ *
+ * @return {@code true} if this type is an unsafe anonymous class
+ */
boolean isUnsafeAnonymous();
+ /**
+ * Checks whether this type is an unsafe anonymous class.
+ * This method is here to maintain compatibility with JDK11.
+ *
+ * @return {@code true} if this type is an unsafe anonymous class
+ */
+ default boolean isAnonymous() {
+ return isUnsafeAnonymous();
+ }
+
}