--- old/src/share/vm/classfile/verifier.hpp 2014-07-29 09:17:48.460401000 -0400 +++ new/src/share/vm/classfile/verifier.hpp 2014-07-29 09:17:45.619336000 -0400 @@ -30,6 +30,7 @@ #include "oops/klass.hpp" #include "oops/method.hpp" #include "runtime/handles.hpp" +#include "utilities/growableArray.hpp" #include "utilities/exceptions.hpp" // The verifier class @@ -306,6 +307,32 @@ StackMapFrame* current_frame, u4 code_length, bool* this_uninit, constantPoolHandle cp, TRAPS); + // Used by ends_in_athrow() to save bytecode intervals. + void push_bci_offsets(GrowableArray *bci_stack_ptr, + u4 start_offset, u4 end_offset) { + bci_stack_ptr->push(start_offset); + bci_stack_ptr->push(end_offset); + } + + // Used by ends_in_athrow() to retrieve start of saved bytecode interval. + u4 pop_bci_start_offset(GrowableArray *bci_stack_ptr) { + assert(!bci_stack_ptr->is_empty(), "Stack should not be empty"); + assert(bci_stack_ptr->length() % 2 == 1, + "Stack should have odd number of entries"); + return bci_stack_ptr->pop(); + } + + // Used by ends_in_athrow() to retrieve end of saved bytecode interval. + u4 pop_bci_end_offset(GrowableArray *bci_stack_ptr) { + assert(!bci_stack_ptr->is_empty(), "Stack should not be empty"); + assert(bci_stack_ptr->length() % 2 == 0, + "Stack should have even number of entries"); + return bci_stack_ptr->pop(); + } + + // Returns true if all paths thru the specified bytecode stream end in athrow. + bool ends_in_athrow(u4 start_bc_offset, u4 end_bc_offset); + void verify_invoke_instructions( RawBytecodeStream* bcs, u4 code_length, StackMapFrame* current_frame, bool* this_uninit, VerificationType return_type,