diff --git a/src/hotspot/share/opto/node.hpp b/src/hotspot/share/opto/node.hpp index 32f1cc02cadce..0731c324c4991 100644 --- a/src/hotspot/share/opto/node.hpp +++ b/src/hotspot/share/opto/node.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1330,6 +1330,9 @@ class DUIterator : public DUIterator_Common { DUIterator() { /*initialize to garbage*/ debug_only(_vdui = false); } + DUIterator(const DUIterator& that) + { _idx = that._idx; debug_only(_vdui = false; reset(that)); } + void operator++(int dummy_to_specify_postfix_op) { _idx++; VDUI_ONLY(verify_increment()); } @@ -1392,6 +1395,9 @@ class DUIterator_Fast : public DUIterator_Common { DUIterator_Fast() { /*initialize to garbage*/ debug_only(_vdui = false); } + DUIterator_Fast(const DUIterator_Fast& that) + { _outp = that._outp; debug_only(_vdui = false; reset(that)); } + void operator++(int dummy_to_specify_postfix_op) { _outp++; VDUI_ONLY(verify(_node, true)); } @@ -1452,6 +1458,8 @@ class DUIterator_Last : private DUIterator_Fast { DUIterator_Last() { } // initialize to garbage + DUIterator_Last(const DUIterator_Last& that) = default; + void operator--() { _outp--; VDUI_ONLY(verify_step(1)); } @@ -1464,8 +1472,7 @@ class DUIterator_Last : private DUIterator_Fast { return _outp >= limit._outp; } - void operator=(const DUIterator_Last& that) - { DUIterator_Fast::operator=(that); } + DUIterator_Last& operator=(const DUIterator_Last& that) = default; }; DUIterator_Last Node::last_outs(DUIterator_Last& imin) const {