r278302 - in /branches/c++-coroutines: ChangeLo...
iains@gcc.gnu.org
iains@gcc.gnu.org
Fri Nov 15 15:45:00 GMT 2019
Author: iains
Date: Fri Nov 15 15:45:45 2019
New Revision: 278302
URL: https://gcc.gnu.org/viewcvs?rev=278302&root=gcc&view=rev
Log:
c++-coroutines - Move the coroutine state to a local hash map.
This deals with a FIXME by removing the coroutine state from the
function decl.
2019-11-15 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (coro_promise_type_found_p): New.
(get_coroutine_promise_type): New.
(get_coroutine_handle_type): New.
(get_coroutine_self_handle_proxy): New.
(get_coroutine_promise_proxy): New.
(lookup_promise_member): Use local hash map state instead of
the function decl.
(coro_function_valid_p): Likewise.
(build_co_await): Likewise.
(finish_co_await_expr): Likewise.
(finish_co_yield_expr): Likewise.
(finish_co_return_stmt): Likewise.
(build_actor_fn): Likewise.
(build_init_or_final_await): Likewise.
(morph_fn_to_coro): Likewise.
* cp-tree.h (struct GTY): Remove coroutine state fields.
(DECL_COROUTINE_HANDLE_TYPE): Remove.
(DECL_COROUTINE_SELF_H_PROXY): Remove.
(DECL_COROUTINE_PROMISE_TYPE): Remove.
(DECL_COROUTINE_PROMISE_PROXY): Remove.
(DECL_COROUTINE_FIRST_KEYWD_LOC): Remove.
Modified:
branches/c++-coroutines/ChangeLog.coroutines
branches/c++-coroutines/gcc/cp/coroutines.cc
branches/c++-coroutines/gcc/cp/cp-tree.h
More information about the Gcc-cvs
mailing list