]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++, coroutines: Remove unused suspend point state [NFC].
authorIain Sandoe <iain@sandoe.co.uk>
Tue, 30 Jul 2024 07:58:42 +0000 (08:58 +0100)
committerIain Sandoe <iains@gcc.gnu.org>
Fri, 2 Aug 2024 10:39:40 +0000 (11:39 +0100)
commitffd521d8dcddcd4cfe1f0f10890a2cb8b6e6493f
tree97aa66dd1119a17659b7ac64e688e4afa2996ac5
parent370a0dee5556941c215c2b3fc61a8bcc40ae4942
c++, coroutines: Remove unused suspend point state [NFC].

We maintain state on the progress of await analysis in an object that
is passed to the various tree walks used.  Some of the state had become
stale (i.e. unused members).  Remove those and provide a CTOR so that
updates are localised.

Remove the file scope hash_map used to collect the final state for the
actor function and make that part of the suspend point state.

gcc/cp/ChangeLog:

* coroutines.cc (struct susp_frame_data): Remove unused members,
provide a CTOR.
(morph_fn_to_coro): Use susp_frame_data CTOR, and make the suspend
state hash map local to the morph function.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/coroutines.cc