# HG changeset patch # User Roland Schatz # Date 1454588731 -3600 # Node ID b6c33361df1e26d944feee8a4f68bee663ce7e19 # Parent 3cbb2c4565435dbd3b7f55e72cd1049dcdbfdfa1 Update jvmci import: Use explicit StackSlot instead of int offset for the deopt rescue slot. diff -r 3cbb2c456543 -r b6c33361df1e graal/com.oracle.graal.code/src/com/oracle/graal/code/CompilationResult.java --- a/graal/com.oracle.graal.code/src/com/oracle/graal/code/CompilationResult.java Wed Feb 03 12:09:46 2016 +0100 +++ b/graal/com.oracle.graal.code/src/com/oracle/graal/code/CompilationResult.java Thu Feb 04 13:25:31 2016 +0100 @@ -34,6 +34,7 @@ import java.util.Objects; import jdk.vm.ci.code.DebugInfo; +import jdk.vm.ci.code.StackSlot; import jdk.vm.ci.code.site.Call; import jdk.vm.ci.code.site.ConstantReference; import jdk.vm.ci.code.site.DataPatch; @@ -179,7 +180,8 @@ private int totalFrameSize = -1; private int maxInterpreterFrameSize = -1; - private int customStackAreaOffset = -1; + + private StackSlot customStackArea = null; private final String name; @@ -239,7 +241,7 @@ CompilationResult that = (CompilationResult) obj; // @formatter:off if (this.entryBCI == that.entryBCI && - this.customStackAreaOffset == that.customStackAreaOffset && + Objects.equals(this.customStackArea, that.customStackArea) && this.totalFrameSize == that.totalFrameSize && this.targetCodeSize == that.targetCodeSize && Objects.equals(this.name, that.name) && @@ -496,21 +498,21 @@ } /** - * Offset in bytes for the custom stack area (relative to sp). + * Start of the custom stack area. * - * @return the offset in bytes + * @return the first stack slot of the custom stack area */ - public int getCustomStackAreaOffset() { - return customStackAreaOffset; + public StackSlot getCustomStackArea() { + return customStackArea; } /** - * @see #getCustomStackAreaOffset() - * @param offset + * @see #getCustomStackArea() + * @param slot */ - public void setCustomStackAreaOffset(int offset) { + public void setCustomStackAreaOffset(StackSlot slot) { checkOpen(); - customStackAreaOffset = offset; + customStackArea = slot; } /** diff -r 3cbb2c456543 -r b6c33361df1e graal/com.oracle.graal.hotspot.aarch64/src/com/oracle/graal/hotspot/aarch64/AArch64HotSpotBackend.java --- a/graal/com.oracle.graal.hotspot.aarch64/src/com/oracle/graal/hotspot/aarch64/AArch64HotSpotBackend.java Wed Feb 03 12:09:46 2016 +0100 +++ b/graal/com.oracle.graal.hotspot.aarch64/src/com/oracle/graal/hotspot/aarch64/AArch64HotSpotBackend.java Thu Feb 04 13:25:31 2016 +0100 @@ -228,7 +228,7 @@ crb.setMaxInterpreterFrameSize(gen.getMaxInterpreterFrameSize()); StackSlot deoptimizationRescueSlot = gen.getDeoptimizationRescueSlot(); if (deoptimizationRescueSlot != null && stub == null) { - crb.compilationResult.setCustomStackAreaOffset(frameMap.offsetForStackSlot(deoptimizationRescueSlot)); + crb.compilationResult.setCustomStackAreaOffset(deoptimizationRescueSlot); } if (stub != null) { diff -r 3cbb2c456543 -r b6c33361df1e graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java Wed Feb 03 12:09:46 2016 +0100 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java Thu Feb 04 13:25:31 2016 +0100 @@ -212,7 +212,7 @@ crb.setMaxInterpreterFrameSize(gen.getMaxInterpreterFrameSize()); StackSlot deoptimizationRescueSlot = gen.getDeoptimizationRescueSlot(); if (deoptimizationRescueSlot != null && stub == null) { - crb.compilationResult.setCustomStackAreaOffset(frameMap.offsetForStackSlot(deoptimizationRescueSlot)); + crb.compilationResult.setCustomStackAreaOffset(deoptimizationRescueSlot); } if (stub != null) { diff -r 3cbb2c456543 -r b6c33361df1e graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackend.java --- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackend.java Wed Feb 03 12:09:46 2016 +0100 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackend.java Thu Feb 04 13:25:31 2016 +0100 @@ -232,7 +232,7 @@ crb.setMaxInterpreterFrameSize(gen.getMaxInterpreterFrameSize()); StackSlot deoptimizationRescueSlot = gen.getDeoptimizationRescueSlot(); if (deoptimizationRescueSlot != null && stub == null) { - crb.compilationResult.setCustomStackAreaOffset(frameMap.offsetForStackSlot(deoptimizationRescueSlot)); + crb.compilationResult.setCustomStackAreaOffset(deoptimizationRescueSlot); } if (stub != null) { diff -r 3cbb2c456543 -r b6c33361df1e graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledCodeBuilder.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledCodeBuilder.java Wed Feb 03 12:09:46 2016 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledCodeBuilder.java Thu Feb 04 13:25:31 2016 +0100 @@ -33,6 +33,7 @@ import java.util.stream.Stream; import java.util.stream.Stream.Builder; +import jdk.vm.ci.code.StackSlot; import jdk.vm.ci.code.site.ConstantReference; import jdk.vm.ci.code.site.DataPatch; import jdk.vm.ci.code.site.Infopoint; @@ -100,7 +101,7 @@ DataPatch[] dataSectionPatches = patchBuilder.build().toArray(len -> new DataPatch[len]); int totalFrameSize = compResult.getTotalFrameSize(); - int customStackAreaOffset = compResult.getCustomStackAreaOffset(); + StackSlot customStackArea = compResult.getCustomStackArea(); if (method instanceof HotSpotResolvedJavaMethod) { HotSpotResolvedJavaMethod hsMethod = (HotSpotResolvedJavaMethod) method; @@ -117,10 +118,10 @@ jvmciEnv = 0L; } return new HotSpotCompiledNmethod(name, targetCode, targetCodeSize, sites, assumptions, methods, comments, dataSection, dataSectionAlignment, dataSectionPatches, false, totalFrameSize, - customStackAreaOffset, hsMethod, entryBCI, id, jvmciEnv, hasUnsafeAccess); + customStackArea, hsMethod, entryBCI, id, jvmciEnv, hasUnsafeAccess); } else { return new HotSpotCompiledCode(name, targetCode, targetCodeSize, sites, assumptions, methods, comments, dataSection, dataSectionAlignment, dataSectionPatches, false, totalFrameSize, - customStackAreaOffset); + customStackArea); } } diff -r 3cbb2c456543 -r b6c33361df1e mx.graal/suite.py --- a/mx.graal/suite.py Wed Feb 03 12:09:46 2016 +0100 +++ b/mx.graal/suite.py Thu Feb 04 13:25:31 2016 +0100 @@ -39,7 +39,7 @@ { "name" : "jvmci", "optional" : "true", - "version" : "657ccda6d2816df5696bbc15802d374a55c8dfbc", + "version" : "ab845d4f2ef6734dec4db5afb6a528b179e36c69", "urls" : [ {"url" : "http://lafo.ssw.uni-linz.ac.at/hg/graal-jvmci-8", "kind" : "hg"}, {"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},