< prev index next > src/hotspot/share/code/exceptionHandlerTable.hpp
Print this page
// nmethod (for lookup purposes) in which case the table cannot be
// modified.
class nmethod;
class ExceptionHandlerTable {
+ friend class SCCache;
+ friend class SCCReader;
+
private:
HandlerTableEntry* _table; // the table
int _length; // the current length of the table
int _size; // the number of allocated entries
ReallocMark _nesting; // assertion check for reallocations
+ int length() const { return _length; }
+ void set_length(int length) { _length = length; }
public:
// add the entry & grow the table if needed
void add_entry(HandlerTableEntry entry);
HandlerTableEntry* subtable_for(int catch_pco) const;
// the lookup; zero (or null GrowableArray) indicates
// innermost scope
GrowableArray<intptr_t>* handler_pcos // pc offsets for the compiled handlers
);
+ HandlerTableEntry* table() const { return _table; }
// nmethod support
int size_in_bytes() const { return align_up(_length * (int)sizeof(HandlerTableEntry), oopSize); }
void copy_to(nmethod* nm);
void copy_bytes_to(address addr);
// Use 32-bit representation for offsets
typedef uint implicit_null_entry;
class ImplicitExceptionTable {
+ friend class SCCache;
+ friend class SCCReader;
+ private:
uint _size;
uint _len;
implicit_null_entry *_data;
implicit_null_entry *adr( uint idx ) const { return &_data[2*idx]; }
ReallocMark _nesting; // assertion check for reallocations
+ void set_len(int length) { _len = length; }
+
public:
ImplicitExceptionTable( ) : _size(0), _len(0), _data(nullptr) { }
// (run-time) construction from nmethod
ImplicitExceptionTable(const nmethod *nm);
// value equals exec_off then the dispatch is expected to be a
// deoptimization instead.
uint continuation_offset( uint exec_off ) const;
uint len() const { return _len; }
+
+ implicit_null_entry* data() const { return _data; }
uint get_exec_offset(uint i) { assert(i < _len, "oob"); return *adr(i); }
uint get_cont_offset(uint i) { assert(i < _len, "oob"); return *(adr(i) + 1); }
int size_in_bytes() const { return len() == 0 ? 0 : ((2 * len() + 1) * (int)sizeof(implicit_null_entry)); }
< prev index next >