src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java Thu Nov 15 21:05:47 2018 +0100
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java Thu Nov 15 09:04:07 2018 -0800
@@ -191,6 +191,10 @@
private StackSlot customStackArea = null;
+ /**
+ * A customized name that is unrelated to {@link #compilationId}. Can be null if
+ * {@link #compilationId} fully describes the compilation.
+ */
private final String name;
private final CompilationIdentifier compilationId;
@@ -228,7 +232,7 @@
private boolean isImmutablePIC;
public CompilationResult(CompilationIdentifier compilationId) {
- this(compilationId, compilationId.toString(CompilationIdentifier.Verbosity.NAME), false);
+ this(compilationId, null, false);
}
public CompilationResult(CompilationIdentifier compilationId, String name) {
@@ -677,6 +681,10 @@
return unmodifiableList(sourceMapping);
}
+ /**
+ * Gets the name for this compilation result. This will only be non-null when it provides a
+ * value unrelated to {@link #getCompilationId()}.
+ */
public String getName() {
return name;
}