1 /*
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
816
817 // maintenance of deoptimization dependencies
818 int mark_dependent_nmethods(DepChange& changes);
819 void add_dependent_nmethod(nmethod* nm);
820 void remove_dependent_nmethod(nmethod* nm, bool delete_immediately);
821
822 // On-stack replacement support
823 nmethod* osr_nmethods_head() const { return _osr_nmethods_head; };
824 void set_osr_nmethods_head(nmethod* h) { _osr_nmethods_head = h; };
825 void add_osr_nmethod(nmethod* n);
826 void remove_osr_nmethod(nmethod* n);
827 int mark_osr_nmethods(const Method* m);
828 nmethod* lookup_osr_nmethod(const Method* m, int bci, int level, bool match_level) const;
829
830 // Breakpoint support (see methods on Method* for details)
831 BreakpointInfo* breakpoints() const { return _breakpoints; };
832 void set_breakpoints(BreakpointInfo* bps) { _breakpoints = bps; };
833
834 // support for stub routines
835 static ByteSize init_state_offset() { return in_ByteSize(offset_of(InstanceKlass, _init_state)); }
836 TRACE_DEFINE_OFFSET;
837 static ByteSize init_thread_offset() { return in_ByteSize(offset_of(InstanceKlass, _init_thread)); }
838
839 // subclass/subinterface checks
840 bool implements_interface(Klass* k) const;
841 bool is_same_or_direct_interface(Klass* k) const;
842
843 #ifdef ASSERT
844 // check whether this class or one of its superclasses was redefined
845 bool has_redefined_this_or_super() const;
846 #endif
847
848 // Access to the implementor of an interface.
849 Klass* implementor() const
850 {
851 Klass** k = adr_implementor();
852 if (k == NULL) {
853 return NULL;
854 } else {
855 return *k;
856 }
|
1 /*
2 * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
816
817 // maintenance of deoptimization dependencies
818 int mark_dependent_nmethods(DepChange& changes);
819 void add_dependent_nmethod(nmethod* nm);
820 void remove_dependent_nmethod(nmethod* nm, bool delete_immediately);
821
822 // On-stack replacement support
823 nmethod* osr_nmethods_head() const { return _osr_nmethods_head; };
824 void set_osr_nmethods_head(nmethod* h) { _osr_nmethods_head = h; };
825 void add_osr_nmethod(nmethod* n);
826 void remove_osr_nmethod(nmethod* n);
827 int mark_osr_nmethods(const Method* m);
828 nmethod* lookup_osr_nmethod(const Method* m, int bci, int level, bool match_level) const;
829
830 // Breakpoint support (see methods on Method* for details)
831 BreakpointInfo* breakpoints() const { return _breakpoints; };
832 void set_breakpoints(BreakpointInfo* bps) { _breakpoints = bps; };
833
834 // support for stub routines
835 static ByteSize init_state_offset() { return in_ByteSize(offset_of(InstanceKlass, _init_state)); }
836 TRACE_DEFINE_KLASS_TRACE_ID_OFFSET;
837 static ByteSize init_thread_offset() { return in_ByteSize(offset_of(InstanceKlass, _init_thread)); }
838
839 // subclass/subinterface checks
840 bool implements_interface(Klass* k) const;
841 bool is_same_or_direct_interface(Klass* k) const;
842
843 #ifdef ASSERT
844 // check whether this class or one of its superclasses was redefined
845 bool has_redefined_this_or_super() const;
846 #endif
847
848 // Access to the implementor of an interface.
849 Klass* implementor() const
850 {
851 Klass** k = adr_implementor();
852 if (k == NULL) {
853 return NULL;
854 } else {
855 return *k;
856 }
|