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 *
23 */
24
25 #ifndef SHARE_VM_OOPS_KLASSVTABLE_HPP
26 #define SHARE_VM_OOPS_KLASSVTABLE_HPP
27
28 #include "memory/allocation.hpp"
29 #include "oops/oopsHierarchy.hpp"
30 #include "runtime/handles.hpp"
31 #include "utilities/growableArray.hpp"
32
33 // A klassVtable abstracts the variable-length vtable that is embedded in InstanceKlass
34 // and ArrayKlass. klassVtable objects are used just as convenient transient accessors to the vtable,
35 // not to actually hold the vtable data.
36 // Note: the klassVtable should not be accessed before the class has been verified
37 // (until that point, the vtable is uninitialized).
38
39 // Currently a klassVtable contains a direct reference to the vtable data, and is therefore
40 // not preserved across GCs.
41
42 class vtableEntry;
43
44 class klassVtable {
45 Klass* _klass; // my klass
46 int _tableOffset; // offset of start of vtable data within klass
47 int _length; // length of vtable (number of entries)
48 #ifndef PRODUCT
|
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 *
23 */
24
25 #ifndef SHARE_VM_OOPS_KLASSVTABLE_HPP
26 #define SHARE_VM_OOPS_KLASSVTABLE_HPP
27
28 #include "oops/oopsHierarchy.hpp"
29 #include "runtime/handles.hpp"
30 #include "utilities/growableArray.hpp"
31
32 // A klassVtable abstracts the variable-length vtable that is embedded in InstanceKlass
33 // and ArrayKlass. klassVtable objects are used just as convenient transient accessors to the vtable,
34 // not to actually hold the vtable data.
35 // Note: the klassVtable should not be accessed before the class has been verified
36 // (until that point, the vtable is uninitialized).
37
38 // Currently a klassVtable contains a direct reference to the vtable data, and is therefore
39 // not preserved across GCs.
40
41 class vtableEntry;
42
43 class klassVtable {
44 Klass* _klass; // my klass
45 int _tableOffset; // offset of start of vtable data within klass
46 int _length; // length of vtable (number of entries)
47 #ifndef PRODUCT
|