mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
Merge
This commit is contained in:
commit
40c4fe8573
192 changed files with 4253 additions and 2003 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -673,6 +673,28 @@ void Klass::oop_verify_on(oop obj, outputStream* st) {
|
|||
guarantee(obj->klass()->is_klass(), "klass field is not a klass");
|
||||
}
|
||||
|
||||
klassVtable* Klass::vtable() const {
|
||||
return new klassVtable(this, start_of_vtable(), vtable_length() / vtableEntry::size());
|
||||
}
|
||||
|
||||
vtableEntry* Klass::start_of_vtable() const {
|
||||
return (vtableEntry*) ((address)this + in_bytes(vtable_start_offset()));
|
||||
}
|
||||
|
||||
Method* Klass::method_at_vtable(int index) {
|
||||
#ifndef PRODUCT
|
||||
assert(index >= 0, "valid vtable index");
|
||||
if (DebugVtables) {
|
||||
verify_vtable_index(index);
|
||||
}
|
||||
#endif
|
||||
return start_of_vtable()[index].method();
|
||||
}
|
||||
|
||||
ByteSize Klass::vtable_start_offset() {
|
||||
return in_ByteSize(InstanceKlass::header_size() * wordSize);
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
||||
bool Klass::verify_vtable_index(int i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue