8057845: ClassVerifier::verify_exception_handler_targets reconstructs the ExceptionTable in a loop
authorhseigel
Fri, 19 Sep 2014 08:19:04 -0400
changeset 26814 c4aad88451f7
parent 26813 fd74c05c4a7e
child 26815 e42b578aa29e
8057845: ClassVerifier::verify_exception_handler_targets reconstructs the ExceptionTable in a loop Summary: Construct the ExceptionTable only once, before the loop Reviewed-by: acorn, jiangli, coleenp, lfoltan
hotspot/src/share/vm/classfile/verifier.cpp
--- a/hotspot/src/share/vm/classfile/verifier.cpp	Wed Sep 17 06:55:12 2014 -0700
+++ b/hotspot/src/share/vm/classfile/verifier.cpp	Fri Sep 19 08:19:04 2014 -0400
@@ -1694,8 +1694,6 @@
   constantPoolHandle cp (THREAD, _method->constants());
 
   for(int i = 0; i < exlength; i++) {
-    //reacquire the table in case a GC happened
-    ExceptionTable exhandlers(_method());
     u2 start_pc = exhandlers.start_pc(i);
     u2 end_pc = exhandlers.end_pc(i);
     u2 handler_pc = exhandlers.handler_pc(i);
@@ -1803,8 +1801,6 @@
   ExceptionTable exhandlers(_method());
   int exlength = exhandlers.length();
   for(int i = 0; i < exlength; i++) {
-    //reacquire the table in case a GC happened
-    ExceptionTable exhandlers(_method());
     u2 start_pc = exhandlers.start_pc(i);
     u2 end_pc = exhandlers.end_pc(i);
     u2 handler_pc = exhandlers.handler_pc(i);