Updated State of the Specialization

Gustav Åkesson gustav.r.akesson at gmail.com
Sun Dec 21 15:54:24 UTC 2014


I'm going through the nitty-gritty details of this super exciting proposal,
but one question came to mind which I couldn't find an explanation for in
the proposal. If we have...

class Summerizer<any T> {

     int sumHashCodes(T ... entries) {

       // Sum hash code values for all entries using ::hashCode()



...then how will the specialized class for Summerizer<int> know that the
same semantics as Integer::hashCode() should be inferred here? Same goes
for the other primitive types.

I'm thinking of e.g. equals as well. Using synchronized on the type could
be prohibited (as stated by the Language restriction section), but what
above methods inherited from Object?

Best Regards,

Gustav Åkesson

On Fri, Dec 19, 2014 at 10:31 PM, Brian Goetz <brian.goetz at oracle.com>

> I've updated the State of the Specialization here:
>   http://cr.openjdk.java.net/~briangoetz/valhalla/specialization.html
> The old version is here:
>   http://cr.openjdk.java.net/~briangoetz/valhalla/specialization-1.html

More information about the valhalla-dev mailing list