--- old/src/share/vm/classfile/verifier.hpp 2014-08-08 08:40:40.362857000 -0400 +++ new/src/share/vm/classfile/verifier.hpp 2014-08-08 08:40:38.080624000 -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 @@ -303,6 +304,38 @@ 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(); + } + + // Used by ends_in_athrow() to push all handlers that contain bci onto the + // handler_stack, if the handler is not already on the stack. + void push_handlers(ExceptionTable* exhandlers, + GrowableArray* handler_stack, + u4 bci); + + // Returns true if all paths starting with start_bc_offset end in athrow. + bool ends_in_athrow(u4 start_bc_offset); + void verify_invoke_instructions( RawBytecodeStream* bcs, u4 code_length, StackMapFrame* current_frame, bool* this_uninit, VerificationType return_type,