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
--- 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);