On Fri, 31 Oct 2025 04:55:31 GMT, Joe Darcy <[email protected]> wrote:
> Initial draft of a partial set of methods wrapping primitive operators to get > feedback on the class providing this functionality. I definitely like to see easier ways to construct method handles for specific operators, mainly the mathematical ones. Some you've currently included are already present in `MethodHandles`, e.g., `arrayElementGetter` and `arrayElementSetter` for the array store and load bytecodes. `throwException` exists as well. You could also argue that `zero(void.class)` can be used as a nop. The increment and decrement bytecodes are also somewhat weird, because you can't really observe them this way. The conversion opcodes (x2y) can also be represented using `identity(x)` + `asType((x)y)`, but more explicit representation of that might be interesting. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28081#issuecomment-3473950733
