Question on layer/peeling

Brian Goetz brian.goetz at oracle.com
Tue Jan 6 22:36:46 UTC 2015


Great progress!  Can you enumerate the methods or code paths that you 
had to #ifref out, and why?  Then it can form a sort of "scoreboard", 
where we can burn down on the list of accidental hacks as we improve the 
implementation, eventually converging on the desired (hack-free) result.

On 1/6/2015 5:31 PM, Michael Barker wrote:
>     I suppose the workaround for #3 would be to take a Hasher<T> (or
>     whatever name you pick) instance as a ctor arg; this would provide
>     equals/hashCode for your type T.
>
> Cheers, this worked.  I now have a working specialised HashMap[1].  When
> some of the "implementation by parts" makes an appearance, I'll rework
> to see if I can remove the custom Hashers.
>
> [1] modulo null problems mentioned earlier and not implementing some of
> the j.u.Map methods, e.g. keySet(), entrySet().



More information about the valhalla-dev mailing list