On Thu, 24 Dec 2020 20:42:01 GMT, Xin Liu <x...@openjdk.org> wrote: >> src/hotspot/share/opto/node.hpp line 1458: >> >>> 1456: // initialize to garbage >>> 1457: >>> 1458: DUIterator_Last (const DUIterator_Last& that) : >>> DUIterator_Fast(that) {} >> >> Since DUIterator_Last is just delegating both the copy constructor and >> assignment operator to the base class, their copy constructor and >> assignment operator would be better as the default (either implicit or >> explicit using `=default`) rather than explicit code. > > Agree. c2 actually never uses the assignment operator of DUIterator_Last. > It needs the copy constructor in this line. > https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/node.hpp#L1499 > > you can delete the following code or leave it =default. > - void operator=(const DUIterator_Last& that) > - { DUIterator_Fast::operator=(that); }
Thanks for your comments. Will remove the assignment operator of DUIterator_Last. ------------- PR: https://git.openjdk.java.net/jdk/pull/1874