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

Hannes Greule hgreule at openjdk.org
Tue Feb 13 16:42:25 UTC 2024


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.

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

Commit messages:
 - Add and/or/xor operations to code model

Changes: https://git.openjdk.org/babylon/pull/21/files
 Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=21&range=00
  Stats: 304 lines in 6 files changed: 301 ins; 1 del; 2 mod
  Patch: https://git.openjdk.org/babylon/pull/21.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/21/head:pull/21

PR: https://git.openjdk.org/babylon/pull/21


More information about the babylon-dev mailing list