On Mon, 4 Sep 2023 07:26:36 GMT, Jorn Vernee <jver...@openjdk.org> wrote:
> Sorry for the delay, I've been on vacation. No problem. Hope you had a good time! Thanks for your feedback. > src/java.base/share/classes/jdk/internal/foreign/abi/Binding.java line 398: > >> 396: bindings.add(Binding.cast(type, int.class)); >> 397: type = int.class; >> 398: } > > Part of the casts are handled here with explicit cast bindings, but the > widening from int -> long, and narrowing from long -> int are handled > implicitly as part of the ShiftLeft implementation. I'd much prefer if all > the type conversions are handled with explicit cast bindings. This would also > semantically simplify the shift operator, since it would just handle the > actual shifting. I guess we would need to add additional bindings for that? Is is worth adding more just for a big endian corner case? Or can that be done with the existing ones? ------------- PR Comment: https://git.openjdk.org/jdk/pull/15417#issuecomment-1705174117 PR Review Comment: https://git.openjdk.org/jdk/pull/15417#discussion_r1314874972