737 // On-stack replacement support 738 nmethod* osr_nmethods_head() const { return _osr_nmethods_head; }; 739 void set_osr_nmethods_head(nmethod* h) { _osr_nmethods_head = h; }; 740 void add_osr_nmethod(nmethod* n); 741 void remove_osr_nmethod(nmethod* n); 742 nmethod* lookup_osr_nmethod(const Method* m, int bci, int level, bool match_level) const; 743 744 // Breakpoint support (see methods on Method* for details) 745 BreakpointInfo* breakpoints() const { return _breakpoints; }; 746 void set_breakpoints(BreakpointInfo* bps) { _breakpoints = bps; }; 747 748 // support for stub routines 749 static ByteSize init_state_offset() { return in_ByteSize(offset_of(InstanceKlass, _init_state)); } 750 TRACE_DEFINE_OFFSET; 751 static ByteSize init_thread_offset() { return in_ByteSize(offset_of(InstanceKlass, _init_thread)); } 752 753 // subclass/subinterface checks 754 bool implements_interface(Klass* k) const; 755 bool is_same_or_direct_interface(Klass* k) const; 756 757 // Access to the implementor of an interface. 758 Klass* implementor() const 759 { 760 Klass** k = adr_implementor(); 761 if (k == NULL) { 762 return NULL; 763 } else { 764 return *k; 765 } 766 } 767 768 void set_implementor(Klass* k) { 769 assert(is_interface(), "not interface"); 770 Klass** addr = adr_implementor(); 771 assert(addr != NULL, "null addr"); 772 if (addr != NULL) { 773 *addr = k; 774 } 775 } 776 | 737 // On-stack replacement support 738 nmethod* osr_nmethods_head() const { return _osr_nmethods_head; }; 739 void set_osr_nmethods_head(nmethod* h) { _osr_nmethods_head = h; }; 740 void add_osr_nmethod(nmethod* n); 741 void remove_osr_nmethod(nmethod* n); 742 nmethod* lookup_osr_nmethod(const Method* m, int bci, int level, bool match_level) const; 743 744 // Breakpoint support (see methods on Method* for details) 745 BreakpointInfo* breakpoints() const { return _breakpoints; }; 746 void set_breakpoints(BreakpointInfo* bps) { _breakpoints = bps; }; 747 748 // support for stub routines 749 static ByteSize init_state_offset() { return in_ByteSize(offset_of(InstanceKlass, _init_state)); } 750 TRACE_DEFINE_OFFSET; 751 static ByteSize init_thread_offset() { return in_ByteSize(offset_of(InstanceKlass, _init_thread)); } 752 753 // subclass/subinterface checks 754 bool implements_interface(Klass* k) const; 755 bool is_same_or_direct_interface(Klass* k) const; 756 757 #ifdef ASSERT 758 // check whether this class or one of its superclasses was redefined 759 bool has_redefined_super() const; 760 #endif 761 762 // Access to the implementor of an interface. 763 Klass* implementor() const 764 { 765 Klass** k = adr_implementor(); 766 if (k == NULL) { 767 return NULL; 768 } else { 769 return *k; 770 } 771 } 772 773 void set_implementor(Klass* k) { 774 assert(is_interface(), "not interface"); 775 Klass** addr = adr_implementor(); 776 assert(addr != NULL, "null addr"); 777 if (addr != NULL) { 778 *addr = k; 779 } 780 } 781 |