src/hotspot/share/code/exceptionHandlerTable.hpp
changeset 55293 d19dc5b10fbb
parent 53244 9807daeb47c4
equal deleted inserted replaced
55292:f4b2d5b83ebf 55293:d19dc5b10fbb
   144   uint _size;
   144   uint _size;
   145   uint _len;
   145   uint _len;
   146   implicit_null_entry *_data;
   146   implicit_null_entry *_data;
   147   implicit_null_entry *adr( uint idx ) const { return &_data[2*idx]; }
   147   implicit_null_entry *adr( uint idx ) const { return &_data[2*idx]; }
   148   ReallocMark          _nesting;  // assertion check for reallocations
   148   ReallocMark          _nesting;  // assertion check for reallocations
       
   149 
   149 public:
   150 public:
   150   ImplicitExceptionTable( ) :  _size(0), _len(0), _data(0) { }
   151   ImplicitExceptionTable( ) :  _size(0), _len(0), _data(0) { }
   151   // (run-time) construction from nmethod
   152   // (run-time) construction from nmethod
   152   ImplicitExceptionTable( const nmethod *nm );
   153   ImplicitExceptionTable( const CompiledMethod *nm );
   153 
   154 
   154   void set_size( uint size );
   155   void set_size( uint size );
   155   void append( uint exec_off, uint cont_off );
   156   void append( uint exec_off, uint cont_off );
   156   uint at( uint exec_off ) const;
   157 
       
   158 #if INCLUDE_JVMCI
       
   159   void add_deoptimize(uint exec_off) {
       
   160     // Use the same offset as a marker value for deoptimization
       
   161     append(exec_off, exec_off);
       
   162   }
       
   163 #endif
       
   164 
       
   165   // Returns the offset to continue execution at.  If the returned
       
   166   // value equals exec_off then the dispatch is expected to be a
       
   167   // deoptimization instead.
       
   168   uint continuation_offset( uint exec_off ) const;
   157 
   169 
   158   uint len() const { return _len; }
   170   uint len() const { return _len; }
       
   171 
       
   172   uint get_exec_offset(uint i) { assert(i < _len, "oob"); return *adr(i); }
       
   173   uint get_cont_offset(uint i) { assert(i < _len, "oob"); return *(adr(i) + 1); }
       
   174 
   159   int size_in_bytes() const { return len() == 0 ? 0 : ((2 * len() + 1) * sizeof(implicit_null_entry)); }
   175   int size_in_bytes() const { return len() == 0 ? 0 : ((2 * len() + 1) * sizeof(implicit_null_entry)); }
   160 
   176 
   161   void copy_to(nmethod* nm);
   177   void copy_to(nmethod* nm);
       
   178   void copy_bytes_to(address addr, int size);
   162   void print(address base) const;
   179   void print(address base) const;
   163   void verify(nmethod *nm) const;
   180   void verify(nmethod *nm) const;
   164 };
   181 };
   165 
   182 
   166 #endif // SHARE_CODE_EXCEPTIONHANDLERTABLE_HPP
   183 #endif // SHARE_CODE_EXCEPTIONHANDLERTABLE_HPP