43 // be difficult to detect/recover from overflow or underflow conditions. 44 // Widening the type and making it signed will help detect these. 45 int32_t _code_length; 46 int32_t _frame_count; // Stackmap frame count 47 StackMapFrame** _frame_array; 48 49 public: 50 StackMapTable(StackMapReader* reader, StackMapFrame* init_frame, 51 u2 max_locals, u2 max_stack, 52 char* code_data, int code_len, TRAPS); 53 54 inline int32_t get_frame_count() const { return _frame_count; } 55 inline int get_offset(int index) const { 56 return _frame_array[index]->offset(); 57 } 58 59 // Match and/or update current_frame to the frame in stackmap table with 60 // specified offset. Return true if the two frames match. 61 bool match_stackmap( 62 StackMapFrame* current_frame, int32_t offset, 63 bool match, bool update, ErrorContext* ctx, TRAPS) const; 64 // Match and/or update current_frame to the frame in stackmap table with 65 // specified offset and frame index. Return true if the two frames match. 66 bool match_stackmap( 67 StackMapFrame* current_frame, int32_t offset, int32_t frame_index, 68 bool match, bool update, ErrorContext* ctx, TRAPS) const; 69 70 // Check jump instructions. Make sure there are no uninitialized 71 // instances on backward branch. 72 void check_jump_target(StackMapFrame* frame, int32_t target, TRAPS) const; 73 74 // The following methods are only used inside this class. 75 76 // Returns the frame array index where the frame with offset is stored. 77 int get_index_from_offset(int32_t offset) const; 78 79 // Make sure that there's no uninitialized object exist on backward branch. 80 void check_new_object( 81 const StackMapFrame* frame, int32_t target, TRAPS) const; 82 83 void print_on(outputStream* str) const; 84 }; 85 86 class StackMapStream : StackObj { 87 private: 88 Array<u1>* _data; | 43 // be difficult to detect/recover from overflow or underflow conditions. 44 // Widening the type and making it signed will help detect these. 45 int32_t _code_length; 46 int32_t _frame_count; // Stackmap frame count 47 StackMapFrame** _frame_array; 48 49 public: 50 StackMapTable(StackMapReader* reader, StackMapFrame* init_frame, 51 u2 max_locals, u2 max_stack, 52 char* code_data, int code_len, TRAPS); 53 54 inline int32_t get_frame_count() const { return _frame_count; } 55 inline int get_offset(int index) const { 56 return _frame_array[index]->offset(); 57 } 58 59 // Match and/or update current_frame to the frame in stackmap table with 60 // specified offset. Return true if the two frames match. 61 bool match_stackmap( 62 StackMapFrame* current_frame, int32_t offset, 63 bool match, bool update, bool handler, ErrorContext* ctx, TRAPS) const; 64 // Match and/or update current_frame to the frame in stackmap table with 65 // specified offset and frame index. Return true if the two frames match. 66 bool match_stackmap( 67 StackMapFrame* current_frame, int32_t offset, int32_t frame_index, 68 bool match, bool update, bool handler, ErrorContext* ctx, TRAPS) const; 69 70 // Check jump instructions. Make sure there are no uninitialized 71 // instances on backward branch. 72 void check_jump_target(StackMapFrame* frame, int32_t target, TRAPS) const; 73 74 // The following methods are only used inside this class. 75 76 // Returns the frame array index where the frame with offset is stored. 77 int get_index_from_offset(int32_t offset) const; 78 79 // Make sure that there's no uninitialized object exist on backward branch. 80 void check_new_object( 81 const StackMapFrame* frame, int32_t target, TRAPS) const; 82 83 void print_on(outputStream* str) const; 84 }; 85 86 class StackMapStream : StackObj { 87 private: 88 Array<u1>* _data; |