diff jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/CompilerToVM.java @ 22414:c1c05278cdf8

renamed exceptionTable* methods in CompilerToVM to getExceptionTable* and added javadoc (JDK-8133194)
author Doug Simon <doug.simon@oracle.com>
date Mon, 10 Aug 2015 22:54:59 +0200
parents 0e095e2c24e2
children c25188911c49
line wrap: on
line diff
--- a/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/CompilerToVM.java	Mon Aug 10 14:59:44 2015 +0200
+++ b/jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/CompilerToVM.java	Mon Aug 10 22:54:59 2015 +0200
@@ -41,9 +41,33 @@
      */
     byte[] getBytecode(long metaspaceMethod);
 
-    int exceptionTableLength(long metaspaceMethod);
+    /**
+     * Gets the number of entries in the data structure describing the exception handlers for a
+     * given method.
+     *
+     * @param metaspaceMethod the metaspace Method object
+     * @return the number of entries in the exception handler table for {@code metaspaceMethod}
+     */
+    int getExceptionTableLength(long metaspaceMethod);
 
-    long exceptionTableStart(long metaspaceMethod);
+    /**
+     * Gets the address of the first entry in the exception handler table for a given method. Each
+     * entry is a {@code ExceptionTableElement} native object and is described by these fields:
+     *
+     * <ul>
+     * <li>{@link HotSpotVMConfig#exceptionTableElementSize}</li>
+     * <li>{@link HotSpotVMConfig#exceptionTableElementStartPcOffset}</li>
+     * <li>{@link HotSpotVMConfig#exceptionTableElementEndPcOffset}</li>
+     * <li>{@link HotSpotVMConfig#exceptionTableElementHandlerPcOffset}</li>
+     * <li>{@link HotSpotVMConfig#exceptionTableElementCatchTypeIndexOffset}
+     * </ul>
+     *
+     * The behavior of this method is undefined if {@link #getExceptionTableLength(long)} returns 0 for
+     * {@code metaspaceMethod}.
+     *
+     * @param metaspaceMethod the metaspace Method object
+     */
+    long getExceptionTableStart(long metaspaceMethod);
 
     /**
      * Determines if a given metaspace Method object has balanced monitors.