[code-reflection] RFR: Obtain parent code element from code element
Paul Sandoz
psandoz at openjdk.org
Wed Mar 6 22:33:10 UTC 2024
`CodeElement` allows access to its children but not its parent. We can add a method to support that.
Subclasses `Op`, `Body`, and `Block` have duplicate methods for accessing their parent and children (the subclasses have covariant overrides of the `CodeElement` methods) e.g., `CodeElement::parent` and Op::parentBlock, `CodeElement::children` and `Op::bodies`. We may not require the subclass specific methods, but i am leaving there for now.
-------------
Commit messages:
- Obtain parent code element from code element
Changes: https://git.openjdk.org/babylon/pull/35/files
Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=35&range=00
Stats: 146 lines in 4 files changed: 92 ins; 50 del; 4 mod
Patch: https://git.openjdk.org/babylon/pull/35.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/35/head:pull/35
PR: https://git.openjdk.org/babylon/pull/35
More information about the babylon-dev
mailing list