On Wed, 16 Aug 2023 13:43:34 GMT, Coleen Phillimore <cole...@openjdk.org> wrote:

>> I've quickly skimmed through the usages of `read_uleb128`. We only seem to 
>> be reading either directly into a proper `uint64_t` or we are reading 4 
>> bytes (i.e. `check_size = 4`). In the latter case, we could either:
>> - add a `static_cast` for the read value when storing it into a 32 bit 
>> field, as for example for `isa` above (i.e. `_state->_isa = 
>> static_cast<uint32_t>(isa)`).
>> - provide a 32 bit `read_uleb128()` version that hides the casting.
>> 
>> I guess it's fine to just go with a `static_cast` when storing to a field 
>> for the few cases we have.
>
> Thanks Christian.  I'll revert to use the static cast.  One of the cases has 
> a comment why.

That looks good!

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15233#discussion_r1296820975

Reply via email to