mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8143014: Access PtrQueue member offsets through derived classes
Moved accessors to derived classes and updated callers. Reviewed-by: tschatzl, jmasa, twisti
This commit is contained in:
parent
bf4eef4903
commit
e8c5bc2024
19 changed files with 157 additions and 88 deletions
|
@ -140,19 +140,27 @@ public:
|
|||
}
|
||||
|
||||
// To support compiler.
|
||||
|
||||
protected:
|
||||
template<typename Derived>
|
||||
static ByteSize byte_offset_of_index() {
|
||||
return byte_offset_of(PtrQueue, _index);
|
||||
return byte_offset_of(Derived, _index);
|
||||
}
|
||||
|
||||
static ByteSize byte_width_of_index() { return in_ByteSize(sizeof(size_t)); }
|
||||
|
||||
template<typename Derived>
|
||||
static ByteSize byte_offset_of_buf() {
|
||||
return byte_offset_of(PtrQueue, _buf);
|
||||
return byte_offset_of(Derived, _buf);
|
||||
}
|
||||
|
||||
static ByteSize byte_width_of_buf() { return in_ByteSize(sizeof(void*)); }
|
||||
|
||||
template<typename Derived>
|
||||
static ByteSize byte_offset_of_active() {
|
||||
return byte_offset_of(PtrQueue, _active);
|
||||
return byte_offset_of(Derived, _active);
|
||||
}
|
||||
|
||||
static ByteSize byte_width_of_active() { return in_ByteSize(sizeof(bool)); }
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue