diff graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotCompiledCode.java @ 21561:ce2113326bc8

Merge.
author Doug Simon <doug.simon@oracle.com>
date Thu, 28 May 2015 17:13:22 +0200
parents graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledCode.java@5cbaf1e9ff2e graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledCode.java@48c1ebd24120
children
line wrap: on
line diff
--- a/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotCompiledCode.java	Thu May 28 16:39:41 2015 +0200
+++ b/graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotCompiledCode.java	Thu May 28 17:13:22 2015 +0200
@@ -36,6 +36,8 @@
 import com.oracle.jvmci.code.CompilationResult.JumpTable;
 import com.oracle.jvmci.code.CompilationResult.Mark;
 import com.oracle.jvmci.code.CompilationResult.Site;
+import com.oracle.jvmci.meta.Assumptions.Assumption;
+import com.oracle.jvmci.meta.*;
 
 /**
  * A {@link CompilationResult} with additional HotSpot-specific information required for installing
@@ -43,16 +45,29 @@
  */
 public abstract class HotSpotCompiledCode {
 
-    public final CompilationResult comp;
-
+    public final String name;
     public final Site[] sites;
     public final ExceptionHandler[] exceptionHandlers;
     public final Comment[] comments;
+    public final Assumption[] assumptions;
+
+    public final byte[] targetCode;
+    public final int targetCodeSize;
 
     public final byte[] dataSection;
     public final int dataSectionAlignment;
     public final DataPatch[] dataSectionPatches;
 
+    public final int totalFrameSize;
+    public final int customStackAreaOffset;
+
+    /**
+     * The list of the methods whose bytecodes were used as input to the compilation. If
+     * {@code null}, then the compilation did not record method dependencies. Otherwise, the first
+     * element of this array is the root method of the compilation.
+     */
+    public final ResolvedJavaMethod[] methods;
+
     public static class Comment {
 
         public final String text;
@@ -65,7 +80,7 @@
     }
 
     public HotSpotCompiledCode(CompilationResult compResult) {
-        this.comp = compResult;
+        name = compResult.getName();
         sites = getSortedSites(compResult);
         if (compResult.getExceptionHandlers().isEmpty()) {
             exceptionHandlers = null;
@@ -90,8 +105,12 @@
                 comments[i] = new Comment(annotation.position, text);
             }
         }
+        assumptions = compResult.getAssumptions();
         assert validateFrames();
 
+        targetCode = compResult.getTargetCode();
+        targetCodeSize = compResult.getTargetCodeSize();
+
         DataSection data = compResult.getDataSection();
         data.finalizeLayout();
         dataSection = new byte[data.getSectionSize()];
@@ -102,6 +121,11 @@
 
         dataSectionAlignment = data.getSectionAlignment();
         dataSectionPatches = patchBuilder.build().toArray(len -> new DataPatch[len]);
+
+        totalFrameSize = compResult.getTotalFrameSize();
+        customStackAreaOffset = compResult.getCustomStackAreaOffset();
+
+        methods = compResult.getMethods();
     }
 
     /**