mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 18:14:38 +02:00
8145628: hotspot metadata classes shouldn't use HeapWordSize or heap related macros like align_object_size
Use align_metadata_size, align_metadata_offset and is_metadata_aligned for metadata rather than align_object_size, etc. Use wordSize rather than HeapWordSize for metadata. Use align_ptr_up rather than align_pointer_up (all the related functions are ptr). Reviewed-by: hseigel, jmasa, cjplummer
This commit is contained in:
parent
ec7fb4ee2b
commit
97e169ac77
36 changed files with 108 additions and 106 deletions
|
@ -170,12 +170,9 @@ class vtableEntry VALUE_OBJ_CLASS_SPEC {
|
|||
|
||||
public:
|
||||
// size in words
|
||||
static int size() {
|
||||
return sizeof(vtableEntry) / sizeof(HeapWord);
|
||||
}
|
||||
static int size_in_bytes() {
|
||||
return sizeof(vtableEntry);
|
||||
}
|
||||
static int size() { return sizeof(vtableEntry) / wordSize; }
|
||||
static int size_in_bytes() { return sizeof(vtableEntry); }
|
||||
|
||||
static int method_offset_in_bytes() { return offset_of(vtableEntry, _method); }
|
||||
Method* method() const { return _method; }
|
||||
|
||||
|
@ -226,7 +223,7 @@ class itableOffsetEntry VALUE_OBJ_CLASS_SPEC {
|
|||
void initialize(Klass* interf, int offset) { _interface = interf; _offset = offset; }
|
||||
|
||||
// Static size and offset accessors
|
||||
static int size() { return sizeof(itableOffsetEntry) / HeapWordSize; } // size in words
|
||||
static int size() { return sizeof(itableOffsetEntry) / wordSize; } // size in words
|
||||
static int interface_offset_in_bytes() { return offset_of(itableOffsetEntry, _interface); }
|
||||
static int offset_offset_in_bytes() { return offset_of(itableOffsetEntry, _offset); }
|
||||
|
||||
|
@ -246,7 +243,7 @@ class itableMethodEntry VALUE_OBJ_CLASS_SPEC {
|
|||
void initialize(Method* method);
|
||||
|
||||
// Static size and offset accessors
|
||||
static int size() { return sizeof(itableMethodEntry) / HeapWordSize; } // size in words
|
||||
static int size() { return sizeof(itableMethodEntry) / wordSize; } // size in words
|
||||
static int method_offset_in_bytes() { return offset_of(itableMethodEntry, _method); }
|
||||
|
||||
friend class klassItable;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue