[code-reflection] RFR: Add and/or/xor operations to code model

Hannes Greule hgreule at openjdk.org
Wed Feb 14 09:01:02 UTC 2024


On Tue, 13 Feb 2024 16:38:15 GMT, Hannes Greule <hgreule at openjdk.org> wrote:

> Adds Ops for `&`, `|`, an `^`. I added some very basic tests for the interpreter and the bytecode.
> 
> I also added other missing methds to `InvokableLeafOps`, namely `mod` for floating point types and eq/neq for boolean.
> 
> I also noticed that `AddOp` currently models String concatenation, and the Interpreter also has a method for it, but that doesn't work because the method type is erased to Object, so that might require some more work in future.
> 
> There are also shifts and some unary operations missing for now, I can work on them in future if you want.

Thanks. I think it would be good to have a more systematic approach to test *all* binary/unary ops with *all* allowed types for both the Interpreter and BytecodeGenerator. Do you think it would make sense to work on that? (e.g. generating the code model for specific operations from one template or from scratch, comparing the results of the interpreter and the bytecode...)

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

PR Comment: https://git.openjdk.org/babylon/pull/21#issuecomment-1943329016


More information about the babylon-dev mailing list