diff --git a/compiler/src/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java b/compiler/src/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java index 96c54062efb8..d41273b89c7b 100644 --- a/compiler/src/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java +++ b/compiler/src/org.graalvm.compiler.code/src/org/graalvm/compiler/code/CompilationResult.java @@ -218,7 +218,7 @@ public String toString() { private final DataSection dataSection = new DataSection(); - private final EconomicSet invalidDeoptimizationStates = EconomicSet.create(Equivalence.IDENTITY_WITH_SYSTEM_HASHCODE); + private final EconomicSet invalidCallDeoptimizationStates = EconomicSet.create(Equivalence.IDENTITY_WITH_SYSTEM_HASHCODE); private final List infopoints = new ArrayList<>(); private final List sourceMapping = new ArrayList<>(); private final List dataPatches = new ArrayList<>(); @@ -318,7 +318,7 @@ public boolean equals(Object obj) { Objects.equals(this.dataSection, that.dataSection) && Objects.equals(this.exceptionHandlers, that.exceptionHandlers) && Objects.equals(this.dataPatches, that.dataPatches) && - Objects.equals(this.invalidDeoptimizationStates, that.invalidDeoptimizationStates) && + Objects.equals(this.invalidCallDeoptimizationStates, that.invalidCallDeoptimizationStates) && Objects.equals(this.infopoints, that.infopoints) && Objects.equals(this.marks, that.marks) && Arrays.equals(this.assumptions, that.assumptions) && @@ -605,14 +605,14 @@ public void addInfopoint(Infopoint infopoint) { } /** - * Mark that the provided infopoint cannot be used as a deoptimization entrypoint. + * Mark that the provided call infopoint cannot be used as a deoptimization entrypoint. * * This distinction is necessary as native-image, in addition to deoptimization support, uses - * infopoints for stack traces and debugging information. + * call infopoints for stack traces and debugging information. */ - public void recordInvalidForDeoptimization(Infopoint infopoint) { + public void recordCallInvalidForDeoptimization(Call call) { checkOpen(); - invalidDeoptimizationStates.add(infopoint); + invalidCallDeoptimizationStates.add(call); } public void recordSourceMapping(int startOffset, int endOffset, NodeSourcePosition sourcePosition) { @@ -684,8 +684,8 @@ public void addAnnotation(CodeAnnotation annotation) { annotations.add(annotation); } - public boolean isValidDeoptimizationState(Infopoint infopoint) { - return infopoint != null && !invalidDeoptimizationStates.contains(infopoint); + public boolean isValidCallDeoptimizationState(Call call) { + return call != null && !invalidCallDeoptimizationStates.contains(call); } /** diff --git a/compiler/src/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilder.java b/compiler/src/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilder.java index 4587274008c7..239e255c8dfa 100644 --- a/compiler/src/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilder.java +++ b/compiler/src/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/asm/CompilationResultBuilder.java @@ -352,27 +352,27 @@ public boolean hasImplicitException(int pcOffset) { /** * Helper to mark invalid deoptimization state as needed. */ - private void recordIfInvalidForDeoptimization(LIRFrameState info, Call infopoint) { + private void recordIfCallInvalidForDeoptimization(LIRFrameState info, Call call) { if (info != null && !info.validForDeoptimization && info.hasDebugInfo()) { DebugInfo debugInfo = info.debugInfo(); assert debugInfo != null; if (debugInfo.hasFrame()) { - compilationResult.recordInvalidForDeoptimization(infopoint); + compilationResult.recordCallInvalidForDeoptimization(call); } } } public Call recordDirectCall(int posBefore, int posAfter, InvokeTarget callTarget, LIRFrameState info) { DebugInfo debugInfo = info != null ? info.debugInfo() : null; - Call infopoint = compilationResult.recordCall(posBefore, posAfter - posBefore, callTarget, debugInfo, true); - recordIfInvalidForDeoptimization(info, infopoint); - return infopoint; + Call call = compilationResult.recordCall(posBefore, posAfter - posBefore, callTarget, debugInfo, true); + recordIfCallInvalidForDeoptimization(info, call); + return call; } public void recordIndirectCall(int posBefore, int posAfter, InvokeTarget callTarget, LIRFrameState info) { DebugInfo debugInfo = info != null ? info.debugInfo() : null; Call infopoint = compilationResult.recordCall(posBefore, posAfter - posBefore, callTarget, debugInfo, false); - recordIfInvalidForDeoptimization(info, infopoint); + recordIfCallInvalidForDeoptimization(info, infopoint); } public void recordInfopoint(int pos, LIRFrameState info, InfopointReason reason) { diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/NativeImageCodeCache.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/NativeImageCodeCache.java index 88b0f2520cc1..d5b4f8ea0ffa 100644 --- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/NativeImageCodeCache.java +++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/NativeImageCodeCache.java @@ -638,7 +638,7 @@ protected boolean isDeoptEntry(ResolvedJavaMethod method, CompilationResult comp * During call entrypoints must always be linked to a call. */ VMError.guarantee(infopoint instanceof Call, String.format("Unexpected infopoint type: %s\nFrame: %s", infopoint, topFrame)); - return compilation.isValidDeoptimizationState(infopoint); + return compilation.isValidCallDeoptimizationState((Call) infopoint); } else { /* * Other deoptimization entrypoints correspond to an DeoptEntryOp.