RFR: 8238863: Refactor out static initialization from Dict constructors

Dean Long dean.long at oracle.com
Tue Feb 11 17:43:35 UTC 2020


How about if non-product or debug builds verify the pre-built table 
using the old algorithm?  That should catch the case where someone 
changes shft[] but not xsum[].
I'm not proposing it, but it seems like this table could also be 
generated at build time using awk :-)

dl

On 2/11/20 6:24 AM, Claes Redestad wrote:
> Hi,
>
> I stumbled upon some static initialization in Dict and after reading it
> twice I think we would be better off by spelling it out as a constant
> rather than calculating it at runtime.
>
> Webrev: http://cr.openjdk.java.net/~redestad/8238863/open.00/
> Bug:    https://bugs.openjdk.java.net/browse/JDK-8238863
>
> Testing: tier1+2
>
> /Claes



More information about the hotspot-compiler-dev mailing list