src/share/vm/oops/methodOop.hpp

Print this page




 267 
 268   int  interpreter_throwout_count() const        { return _interpreter_throwout_count; }
 269   void set_interpreter_throwout_count(int count) { _interpreter_throwout_count = count; }
 270 
 271   // size of parameters
 272   int  size_of_parameters() const                { return _size_of_parameters; }
 273 
 274   bool has_stackmap_table() const {
 275     return constMethod()->has_stackmap_table();
 276   }
 277 
 278   typeArrayOop stackmap_data() const {
 279     return constMethod()->stackmap_data();
 280   }
 281 
 282   void set_stackmap_data(typeArrayOop sd) {
 283     constMethod()->set_stackmap_data(sd);
 284   }
 285 
 286   // exception handler table
 287   typeArrayOop exception_table() const
 288                                    { return constMethod()->exception_table(); }
 289   void set_exception_table(typeArrayOop e)
 290                                      { constMethod()->set_exception_table(e); }
 291   bool has_exception_handler() const
 292                              { return constMethod()->has_exception_handler(); }




 293 
 294   // Finds the first entry point bci of an exception handler for an
 295   // exception of klass ex_klass thrown at throw_bci. A value of NULL
 296   // for ex_klass indicates that the exception klass is not known; in
 297   // this case it matches any constraint class. Returns -1 if the
 298   // exception cannot be handled in this method. The handler
 299   // constraint classes are loaded if necessary. Note that this may
 300   // throw an exception if loading of the constraint classes causes
 301   // an IllegalAccessError (bugid 4307310) or an OutOfMemoryError.
 302   // If an exception is thrown, returns the bci of the
 303   // exception handler which caused the exception to be thrown, which
 304   // is needed for proper retries. See, for example,
 305   // InterpreterRuntime::exception_handler_for_exception.
 306   int fast_exception_handler_bci_for(KlassHandle ex_klass, int throw_bci, TRAPS);
 307 
 308   // method data access
 309   methodDataOop method_data() const              {
 310     return _method_data;
 311   }
 312   void set_method_data(methodDataOop data)       {


 822   void        set_orig_bytecode(Bytecodes::Code code) { _orig_bytecode = code; }
 823   int         bci()                                   { return _bci; }
 824 
 825   BreakpointInfo*          next() const               { return _next; }
 826   void                 set_next(BreakpointInfo* n)    { _next = n; }
 827 
 828   // helps for searchers
 829   bool match(const methodOopDesc* m, int bci) {
 830     return bci == _bci && match(m);
 831   }
 832 
 833   bool match(const methodOopDesc* m) {
 834     return _name_index == m->name_index() &&
 835       _signature_index == m->signature_index();
 836   }
 837 
 838   void set(methodOop method);
 839   void clear(methodOop method);
 840 };
 841 






























































 842 #endif // SHARE_VM_OOPS_METHODOOP_HPP


 267 
 268   int  interpreter_throwout_count() const        { return _interpreter_throwout_count; }
 269   void set_interpreter_throwout_count(int count) { _interpreter_throwout_count = count; }
 270 
 271   // size of parameters
 272   int  size_of_parameters() const                { return _size_of_parameters; }
 273 
 274   bool has_stackmap_table() const {
 275     return constMethod()->has_stackmap_table();
 276   }
 277 
 278   typeArrayOop stackmap_data() const {
 279     return constMethod()->stackmap_data();
 280   }
 281 
 282   void set_stackmap_data(typeArrayOop sd) {
 283     constMethod()->set_stackmap_data(sd);
 284   }
 285 
 286   // exception handler table




 287   bool has_exception_handler() const
 288                              { return constMethod()->has_exception_handler(); }
 289   int exception_table_length() const
 290                              { return constMethod()->exception_table_length(); }
 291   ExceptionTableElement* exception_table_start() const
 292                              { return constMethod()->exception_table_start(); }
 293 
 294   // Finds the first entry point bci of an exception handler for an
 295   // exception of klass ex_klass thrown at throw_bci. A value of NULL
 296   // for ex_klass indicates that the exception klass is not known; in
 297   // this case it matches any constraint class. Returns -1 if the
 298   // exception cannot be handled in this method. The handler
 299   // constraint classes are loaded if necessary. Note that this may
 300   // throw an exception if loading of the constraint classes causes
 301   // an IllegalAccessError (bugid 4307310) or an OutOfMemoryError.
 302   // If an exception is thrown, returns the bci of the
 303   // exception handler which caused the exception to be thrown, which
 304   // is needed for proper retries. See, for example,
 305   // InterpreterRuntime::exception_handler_for_exception.
 306   int fast_exception_handler_bci_for(KlassHandle ex_klass, int throw_bci, TRAPS);
 307 
 308   // method data access
 309   methodDataOop method_data() const              {
 310     return _method_data;
 311   }
 312   void set_method_data(methodDataOop data)       {


 822   void        set_orig_bytecode(Bytecodes::Code code) { _orig_bytecode = code; }
 823   int         bci()                                   { return _bci; }
 824 
 825   BreakpointInfo*          next() const               { return _next; }
 826   void                 set_next(BreakpointInfo* n)    { _next = n; }
 827 
 828   // helps for searchers
 829   bool match(const methodOopDesc* m, int bci) {
 830     return bci == _bci && match(m);
 831   }
 832 
 833   bool match(const methodOopDesc* m) {
 834     return _name_index == m->name_index() &&
 835       _signature_index == m->signature_index();
 836   }
 837 
 838   void set(methodOop method);
 839   void clear(methodOop method);
 840 };
 841 
 842 // Utility class for access exception handlers
 843 class ExceptionTable : public StackObj {
 844  private:
 845   ExceptionTableElement* _table;
 846   u2  _length;
 847 
 848  public:
 849   ExceptionTable(methodOop m) {
 850     if (m->has_exception_handler()) {
 851       _table = m->exception_table_start();
 852       _length = m->exception_table_length();
 853     } else {
 854       _table = NULL;
 855       _length = 0;
 856     }
 857   }
 858 
 859   int length() const {
 860     return _length;
 861   }
 862 
 863   u2 start_pc(int idx) const {
 864     assert(idx < _length, "out of bounds");
 865     return _table[idx].start_pc;
 866   }
 867 
 868   void set_start_pc(int idx, u2 value) {
 869     assert(idx < _length, "out of bounds");
 870     _table[idx].start_pc = value;
 871   }
 872 
 873   u2 end_pc(int idx) const {
 874     assert(idx < _length, "out of bounds");
 875     return _table[idx].end_pc;
 876   }
 877 
 878   void set_end_pc(int idx, u2 value) {
 879     assert(idx < _length, "out of bounds");
 880     _table[idx].end_pc = value;
 881   }
 882 
 883   u2 handler_pc(int idx) const {
 884     assert(idx < _length, "out of bounds");
 885     return _table[idx].handler_pc;
 886   }
 887 
 888   void set_handler_pc(int idx, u2 value) {
 889     assert(idx < _length, "out of bounds");
 890     _table[idx].handler_pc = value;
 891   }
 892 
 893   u2 catch_type_index(int idx) const {
 894     assert(idx < _length, "out of bounds");
 895     return _table[idx].catch_type_index;
 896   }
 897 
 898   void set_catch_type_index(int idx, u2 value) {
 899     assert(idx < _length, "out of bounds");
 900     _table[idx].catch_type_index = value;
 901   }
 902 };
 903 
 904 #endif // SHARE_VM_OOPS_METHODOOP_HPP