RFR(S): 8239066: make LinkedList<T> more generic

David Holmes david.holmes at oracle.com
Mon Feb 17 06:29:05 UTC 2020


Hi,

On 15/02/2020 7:21 am, Liu, Xin wrote:
> Hi,
> 
> 1.  Could I get reviewed for this patch?  I ran into some problems when I reuse this data structure. It’s a prerequisite of JDK-8229517<https://bugs.openjdk.java.net/browse/JDK-8229517>.
> 2.
> Webrev: https://cr.openjdk.java.net/~xliu/8239066/webrev.00/webrev/
> Bugs: https://bugs.openjdk.java.net/browse/JDK-8239066
> 
> Currently, we can’t instantiate it using basic types such as int or arbitrary type.  It’s because E::equals is too intrusive.
> I move out find/remove and provide them like <algorithm>.  Usage is almost same as original because of template parameter type inference.

Just a comment on find/remove. I don't like them being added to the 
global namespace that way. I prefer the existing object-oriented 
approach where these are member functions. At the very least I would 
want to see these "algorithms" accessed as LinkedList::find/remove.

Thanks,
David

> 
> I also fix some minor issues mentioned in JDK-8239066.  I think we can implement CompileQueue, G1BufferNodeList in the future.
> 
> Thanks,
> --lx
> 
> 
> 


More information about the hotspot-runtime-dev mailing list