Exemplo n.º 1
0
  private static void runSanityTest(Executable aMethod, Integer expectedTableLength) {
    HotSpotResolvedJavaMethod method = CTVMUtilities.getResolvedMethod(aMethod);
    int tableLength = CompilerToVMHelper.getExceptionTableLength(method);
    Asserts.assertEQ(
        tableLength, expectedTableLength, aMethod + " incorrect exception table length.");

    long tableStart = CompilerToVMHelper.getExceptionTableStart(method);
    if (tableLength > 0) {
      Asserts.assertNE(tableStart, 0L, aMethod + " exception table starts " + "at 0.");
    }
  }