src/share/vm/classfile/verifier.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File bug_8050485_4 Cdiff src/share/vm/classfile/verifier.hpp

src/share/vm/classfile/verifier.hpp

Print this page

        

*** 28,37 **** --- 28,38 ---- #include "classfile/verificationType.hpp" #include "memory/gcLocker.hpp" #include "oops/klass.hpp" #include "oops/method.hpp" #include "runtime/handles.hpp" + #include "utilities/growableArray.hpp" #include "utilities/exceptions.hpp" // The verifier class class Verifier : AllStatic { public:
*** 301,310 **** --- 302,343 ---- void verify_invoke_init( RawBytecodeStream* bcs, u2 ref_index, VerificationType ref_class_type, 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<u4> *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<u4> *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<u4> *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<u4>* 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, constantPoolHandle cp, TRAPS);
src/share/vm/classfile/verifier.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File