diff graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/DebugInfo.java @ 9336:47e7933283f1

added support for adding callee save information to a DebugInfo (GRAAL-81)
author Doug Simon <doug.simon@oracle.com>
date Fri, 26 Apr 2013 18:16:30 +0200
parents b45ed2b14fd1
children df023d960636
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/DebugInfo.java	Thu Apr 25 17:46:35 2013 +0200
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/DebugInfo.java	Fri Apr 26 18:16:30 2013 +0200
@@ -26,8 +26,16 @@
 import java.util.*;
 
 /**
- * Represents the debugging information for a particular place in the code, which includes the code
- * position, a reference map, and deoptimization information.
+ * Represents the debugging information for a particular point of execution. This information
+ * includes:
+ * <ul>
+ * <li>a {@linkplain #getBytecodePosition() bytecode position}</li>
+ * <li>a reference map for {@linkplain #getRegisterRefMap() registers}</li>
+ * <li>a reference map for {@linkplain #getRegisterRefMap() stack slots} in the current frame</li>
+ * <li>a map from bytecode locals and operand stack slots to their values or locations from which
+ * their values can be read</li>
+ * <li>a map from the registers (in the caller's frame) to the slots where they are saved in the
+ * current frame</li>
  */
 public class DebugInfo implements Serializable {
 
@@ -37,6 +45,7 @@
     private final BitSet registerRefMap;
     private final BitSet frameRefMap;
     private final short deoptimizationReason;
+    private RegisterSaveLayout calleeSaveInfo;
 
     /**
      * Creates a new {@link DebugInfo} from the given values.
@@ -125,4 +134,20 @@
     public short getDeoptimizationReason() {
         return deoptimizationReason;
     }
+
+    /**
+     * Sets the map from the registers (in the caller's frame) to the slots where they are saved in
+     * the current frame.
+     */
+    public void setCalleeSaveInfo(RegisterSaveLayout calleeSaveInfo) {
+        this.calleeSaveInfo = calleeSaveInfo;
+    }
+
+    /**
+     * Gets the map from the registers (in the caller's frame) to the slots where they are saved in
+     * the current frame. If no such information is available, {@code null} is returned.
+     */
+    public RegisterSaveLayout getCalleeSaveInfo() {
+        return calleeSaveInfo;
+    }
 }