RFR: 8266789: devirtualize find_node and remove of LinkedList

Xin Liu xliu at openjdk.java.net
Mon May 10 13:35:36 UTC 2021


On Mon, 10 May 2021 07:49:49 GMT, Xin Liu <xliu at openjdk.org> wrote:

> Devirtualize find, find_node and remove. This patch make both LinkedListImpl
> and SortedLinkedList more generic. If the client doesn't use those member functions,
> it's not necessary to define equals() for the user-defined class E.
> 
> Remove those 3 member functions from the pure interface LinkedList. subclasses
> implement them using regular member functions.

src/hotspot/share/utilities/linkedlist.hpp line 405:

> 403:   // unhide base class's the overloaded member function
> 404:   // remove(LinkedListNode<E>* node), which has no reference.
> 405:   // remove the using statement we delete boo remove(LinkedListNode<E>* node).

Should be bool* remove here. 
actually, bool remove(LinkedListNode<E>* node) is a dead member function. no reference at all. 
I am not sure I should remove it or keep it.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3944


More information about the hotspot-dev mailing list