daniel.smith at oracle.com
Fri Feb 7 22:39:08 UTC 2020
> On Feb 7, 2020, at 3:05 PM, Brian Goetz <brian.goetz at oracle.com> wrote:
> - Supertypes, methods (including static methods, and including the static "constructor" factory), and static fields are lifted onto the ref projection.
This deserves highlighting: in theory, there's nothing wrong with putting all of an inline class's methods in an abstract superclass. In practice, I'm curious to know whether we take a performance hit, and if so whether it's straightforward to optimize away.
(And if there *is* a significant performance penalty, is it so bad that it's impractical to *ever* make serious use of superclass or superinterface methods in performance-sensitive contexts? That may be okay, but it's something authors will want to understand.)
I also kind of wonder if there are some code paths in Hotspot that will never get seriously exercised if javac never invokes a method declared in an inline class. (Not really an argument against this strategy, just an observation.)
More information about the valhalla-spec-observers