< prev index next >
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java
Print this page
*** 53,62 ****
--- 53,63 ----
import jdk.vm.ci.code.site.Site;
import jdk.vm.ci.meta.Assumptions.Assumption;
import jdk.vm.ci.meta.InvokeTarget;
import jdk.vm.ci.meta.ResolvedJavaField;
import jdk.vm.ci.meta.ResolvedJavaMethod;
+ import jdk.vm.ci.meta.SpeculationLog;
/**
* Represents the output from compiling a method, including the compiled machine code, associated
* data and references, relocation information, deoptimization information, etc.
*/
*** 219,228 ****
--- 220,234 ----
* element of this array is the root method of the compilation.
*/
private ResolvedJavaMethod[] methods;
/**
+ * The {@link SpeculationLog} log used during compilation.
+ */
+ private SpeculationLog speculationLog;
+
+ /**
* The list of fields that were accessed from the bytecodes.
*/
private ResolvedJavaField[] fields;
private int bytecodeSize;
*** 371,380 ****
--- 377,401 ----
public ResolvedJavaMethod[] getMethods() {
return methods;
}
/**
+ * Sets the {@link SpeculationLog} log used during compilation.
+ */
+ public void setSpeculationLog(SpeculationLog speculationLog) {
+ checkOpen();
+ this.speculationLog = speculationLog;
+ }
+
+ /**
+ * Gets the {@link SpeculationLog} log, if any, used during compilation.
+ */
+ public SpeculationLog getSpeculationLog() {
+ return speculationLog;
+ }
+
+ /**
* Sets the fields that were referenced from the bytecodes that were used as input to the
* compilation.
*
* @param accessedFields the collected set of fields accessed during compilation
*/
*** 613,623 ****
}
/**
* @return the code annotations or {@code null} if there are none
*/
! public List<CodeAnnotation> getAnnotations() {
if (annotations == null) {
return Collections.emptyList();
}
return annotations;
}
--- 634,644 ----
}
/**
* @return the code annotations or {@code null} if there are none
*/
! public List<CodeAnnotation> getCodeAnnotations() {
if (annotations == null) {
return Collections.emptyList();
}
return annotations;
}
*** 704,714 ****
/**
* Clears the information in this object pertaining to generating code. That is, the
* {@linkplain #getMarks() marks}, {@linkplain #getInfopoints() infopoints},
* {@linkplain #getExceptionHandlers() exception handlers}, {@linkplain #getDataPatches() data
! * patches} and {@linkplain #getAnnotations() annotations} recorded in this object are cleared.
*/
public void resetForEmittingCode() {
checkOpen();
infopoints.clear();
sourceMapping.clear();
--- 725,736 ----
/**
* Clears the information in this object pertaining to generating code. That is, the
* {@linkplain #getMarks() marks}, {@linkplain #getInfopoints() infopoints},
* {@linkplain #getExceptionHandlers() exception handlers}, {@linkplain #getDataPatches() data
! * patches} and {@linkplain #getCodeAnnotations() annotations} recorded in this object are
! * cleared.
*/
public void resetForEmittingCode() {
checkOpen();
infopoints.clear();
sourceMapping.clear();
*** 719,728 ****
--- 741,758 ----
if (annotations != null) {
annotations.clear();
}
}
+ public void clearInfopoints() {
+ infopoints.clear();
+ }
+
+ public void clearExceptionHandlers() {
+ exceptionHandlers.clear();
+ }
+
private void checkOpen() {
if (closed) {
throw new IllegalStateException();
}
}
< prev index next >