r278875 - in /branches/c++-coroutines: ChangeLo...
iains@gcc.gnu.org
iains@gcc.gnu.org
Sat Nov 30 15:47:00 GMT 2019
Author: iains
Date: Sat Nov 30 15:47:21 2019
New Revision: 278875
URL: https://gcc.gnu.org/viewcvs?rev=278875&root=gcc&view=rev
Log:
c++-coroutines - Address review comments, rework identifiers.
There are quite a lot of identifiers for coroutines; including the main
ones for the trait etc. and those for the promise methods and awaitables.
We decided to make these local to the coroutines implementation and to
initialize them lazily on the first coroutine encountered.
2019-11-30 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (lookup_promise_member): Remove.
(coro_init_identifiers): New.
(coro_promise_type_found_p): Initialize the coroutines state
and identifiers lazily.
(lookup_promise_method): New.
(build_co_await): Use pre-built identifiers for coroutine,
promise and awaiter names.
(finish_co_await_expr): Likewise.
(finish_co_yield_expr): Likewise.
(finish_co_return_stmt): Likewise.
(co_await_expander): Likewise.
(build_actor_fn): Likewise.
(build_init_or_final_await): Likewise.
(morph_fn_to_coro): Likewise.
* cp-tree.h (enum cp_tree_index): Remove coroutine identifiers.
* decl.c (initialize_predefined_identifiers): Likewise.
Modified:
branches/c++-coroutines/ChangeLog.coroutines
branches/c++-coroutines/gcc/cp/coroutines.cc
branches/c++-coroutines/gcc/cp/cp-tree.h
branches/c++-coroutines/gcc/cp/decl.c
More information about the Gcc-cvs
mailing list