RFR: 8336492: Regression in lambda serialization [v3]

Maurizio Cimadamore mcimadamore at openjdk.org
Mon Jul 29 09:46:33 UTC 2024


On Fri, 26 Jul 2024 15:59:15 GMT, Vicente Romero <vromero at openjdk.org> wrote:

> not sure that this is semantically the same as before

Yeah, this is a bit tricky. Basically, the issue with type annotations is that they are encoded in different places depending on the case. E.g. a local variable inside a static/instance initializer has the type annotation recorded in the _class symbol_ (!!). There's also different methods to fetch type annotations, depending on whether it was a normal type annotation, or one in a static/instance initializer.

The general idea is that we try to figure out the symbol that "owns" the type annotation while visiting, and then move all lambda annotations from that owner onto the new lambda method symbol.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20349#discussion_r1694924545


More information about the compiler-dev mailing list