[code-reflection] RFR: Externalizable operations
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed May 1 11:35:13 UTC 2024
On Thu, 25 Apr 2024 23:19:26 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
> Rename `OpWithDefinition` to `ExternalizableOp` and specify as an operation whose contents may be externalized.
> Rename `OpDefintion` to `ExternalOpContents`, an instance of which represents the external contents of an operation.
> An externaliziable operation may be constructed from its external contents, for example by using an operation factory.
>
> The method `Op::attributes` is removed, and the method is defined on `ExternalizableOp`. The attribute map returned by the method is the external representation of specific contents of an operation.
Probably similar treatment for TypeDefinition?
src/java.base/share/classes/java/lang/reflect/code/op/ExternalOpContent.java line 48:
> 46: * thereby separating the specifics of deserializing from construction.
> 47: */
> 48: public record ExternalOpContent(String name,
Wouldn't `ExternalizedOp` or `SerializedOp` be better - e.g. more akin to `SerializedLambda` ?
-------------
Marked as reviewed by mcimadamore (Reviewer).
PR Review: https://git.openjdk.org/babylon/pull/62#pullrequestreview-2033481556
PR Review Comment: https://git.openjdk.org/babylon/pull/62#discussion_r1586207219
More information about the babylon-dev
mailing list