diff src/share/vm/graal/graalCompilerToVM.cpp @ 6275:957c266d8bc5

Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Tue, 21 Aug 2012 10:39:19 +0200
parents 58a607307306
children dddcdb7ae209
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompilerToVM.cpp	Mon Aug 20 15:21:31 2012 +0200
+++ b/src/share/vm/graal/graalCompilerToVM.cpp	Tue Aug 21 10:39:19 2012 +0200
@@ -100,20 +100,19 @@
   VM_ENTRY_MARK
   ResourceMark rm;
   methodHandle method = getMethodFromHotSpotMethod(hotspot_method);
-  typeArrayHandle handlers = method->exception_table();
-  int handler_count = handlers.is_null() ? 0 : handlers->length() / 4;
+  int handler_count = method->exception_table_length();
+  ExceptionTableElement* handlers = handler_count == 0 ? NULL : method->exception_table_start();
 
   instanceKlass::cast(ExceptionHandler::klass())->initialize(CHECK_NULL);
   objArrayHandle array = oopFactory::new_objArray(SystemDictionary::ExceptionHandler_klass(), handler_count, CHECK_NULL);
 
   for (int i = 0; i < handler_count; i++) {
-    // exception handlers are stored as four integers: start bci, end bci, handler bci, catch class constant pool index
-    int base = i * 4;
+    ExceptionTableElement* handler = handlers + i;
     Handle entry = instanceKlass::cast(ExceptionHandler::klass())->allocate_instance(CHECK_NULL);
-    ExceptionHandler::set_startBCI(entry, handlers->int_at(base + 0));
-    ExceptionHandler::set_endBCI(entry, handlers->int_at(base + 1));
-    ExceptionHandler::set_handlerBCI(entry, handlers->int_at(base + 2));
-    int catch_class_index = handlers->int_at(base + 3);
+    ExceptionHandler::set_startBCI(entry, handler->start_pc);
+    ExceptionHandler::set_endBCI(entry, handler->end_pc);
+    ExceptionHandler::set_handlerBCI(entry, handler->handler_pc);
+    int catch_class_index = handler->catch_type_index;
     ExceptionHandler::set_catchTypeCPI(entry, catch_class_index);
 
     if (catch_class_index == 0) {