changeset 23379:b6c33361df1e

Update jvmci import: Use explicit StackSlot instead of int offset for the deopt rescue slot.
author Roland Schatz <roland.schatz@oracle.com>
date Thu, 04 Feb 2016 13:25:31 +0100
parents 3cbb2c456543
children d7e25fa8bc3e
files graal/com.oracle.graal.code/src/com/oracle/graal/code/CompilationResult.java graal/com.oracle.graal.hotspot.aarch64/src/com/oracle/graal/hotspot/aarch64/AArch64HotSpotBackend.java graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackend.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledCodeBuilder.java mx.graal/suite.py
diffstat 6 files changed, 20 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- 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;
     }
 
     /**
--- 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) {
--- 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) {
--- 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) {
--- 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);
         }
     }
 
--- 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"},