diff graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiTargetMethod.java @ 4693:07bcee8b70a4

Simplify exception debug information and exception handler table creation based on Graal's simplified model of exception handler information (i.e. the dispatch is done in compiled code).
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sat, 25 Feb 2012 00:40:34 +0100
parents aaac4894175c
children 12c63380e7ff
line wrap: on
line diff
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiTargetMethod.java	Fri Feb 24 22:32:43 2012 +0100
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ci/CiTargetMethod.java	Sat Feb 25 00:40:34 2012 +0100
@@ -309,24 +309,16 @@
          *
          */
         private static final long serialVersionUID = 4897339464722665281L;
-        public final int bci;
-        public final int scopeLevel;
         public final int handlerPos;
-        public final int handlerBci;
-        public final RiType exceptionType;
 
-        ExceptionHandler(int pcOffset, int bci, int scopeLevel, int handlerPos, int handlerBci, RiType exceptionType) {
+        ExceptionHandler(int pcOffset, int handlerPos) {
             super(pcOffset);
-            this.bci = bci;
-            this.scopeLevel = scopeLevel;
             this.handlerPos = handlerPos;
-            this.handlerBci = handlerBci;
-            this.exceptionType = exceptionType;
         }
 
         @Override
         public String toString() {
-            return String.format("%d[<exception edge to %d with type %s>]", pcOffset, handlerPos, (exceptionType == null) ? "null" : exceptionType);
+            return String.format("%d[<exception edge to %d>]", pcOffset, handlerPos);
         }
     }
 
@@ -461,8 +453,8 @@
      * @param handlerPos    the position of the handler
      * @param throwableType the type of exceptions handled by the handler
      */
-    public void recordExceptionHandler(int codePos, int bci, int scopeLevel, int handlerPos, int handlerBci, RiType throwableType) {
-        exceptionHandlers.add(new ExceptionHandler(codePos, bci, scopeLevel, handlerPos, handlerBci, throwableType));
+    public void recordExceptionHandler(int codePos, int handlerPos) {
+        exceptionHandlers.add(new ExceptionHandler(codePos, handlerPos));
     }
 
     /**