[code-reflection] RFR: Remove op name state from Op
Paul Sandoz
psandoz at openjdk.org
Fri Sep 19 23:01:01 UTC 2025
The operation's name should only be used for writing to and parsing from text, or more generally when externalizing the operation. Otherwise, it should not generally be relied upon since the class itself should be sufficient (although there currently are a few areas, namely the interpreter that should be updated in a separate PR to remove its dependence on that).
- `Op` no longer has an instance field holding the operation name
- `Op.opName` is named to `Op.externalizeOpName`
- By default the method `Op.externalizeOpName` returns `this.getClass().getName()`, which may be overridden.
Also cleaned up `Op`, making more methods final and grouping methods more appropriately.
-------------
Commit messages:
- Clean up Op
- Rename opName to externalizeOpName
- Doc update.
- Clean ups
- Remove op name state from Op.
Changes: https://git.openjdk.org/babylon/pull/577/files
Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=577&range=00
Stats: 539 lines in 34 files changed: 194 ins; 90 del; 255 mod
Patch: https://git.openjdk.org/babylon/pull/577.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/577/head:pull/577
PR: https://git.openjdk.org/babylon/pull/577
More information about the babylon-dev
mailing list