RFR: JDK-8241798: Allow enums to have more constants

Brian Goetz brian.goetz at oracle.com
Tue Mar 31 21:27:57 UTC 2020


Yep, I'm with Maurizio on this one too.  Keep the "bytecode golf" idea 
for later :)

On 3/31/2020 11:42 AM, Maurizio Cimadamore wrote:
>
> On 31/03/2020 07:40, Liam Miller-Cushon wrote:
>> I think that limits this strategy to enums that don't declare 
>> constructors with non-mandated parameters. I'd still be happy to have 
>> support for that many constants in 'simple' enums, but needing 
>> different code generation strategies for different kinds of enum does 
>> change the return-on-complexity a bit.
>
> I agree - your first patch has a simplicity to it that is appealing.
>
> If we go down more complex paths which require different generation 
> strategies, I'm not sure whether the trade off is justified - as that 
> has consequence on testing and all.
>
> Maurizio
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20200331/4ecef0fb/attachment.htm>


More information about the compiler-dev mailing list