RFR: 8329433: Reduce nmethod header size [v3]
Vladimir Kozlov
kvn at openjdk.org
Wed Apr 17 21:16:48 UTC 2024
On Wed, 17 Apr 2024 20:27:53 GMT, Dean Long <dlong at openjdk.org> wrote:
>> Okay. But I will put above code under `#ifdef ASSERT` then.
>
> The ASSERT block above looks unnecessary, now that field assignments below are using checked_cast.
Agree, but I need to change how I use checked_cast below to get the same check as above. I will do it in next update:
_dependencies_offset = _metadata_offset + checked_cast<uint16_t>(align_up(code_buffer->total_metadata_size(), wordSize));
_scopes_pcs_offset = _dependencies_offset + checked_cast<uint16_t>(align_up((int)dependencies->size_in_bytes(), oopSize));
---
_dependencies_offset = checked_cast<uint16_t>(_metadata_offset + align_up(code_buffer->total_metadata_size(), wordSize));
_scopes_pcs_offset = checked_cast<uint16_t>(_dependencies_offset + align_up((int)dependencies->size_in_bytes(), oopSize));
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18768#discussion_r1569563003
More information about the graal-dev
mailing list