This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r273644 - in /branches/c++-coroutines: ChangeLo...
- From: iains at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Sun, 21 Jul 2019 19:33:28 -0000
- Subject: r273644 - in /branches/c++-coroutines: ChangeLo...
Author: iains
Date: Sun Jul 21 19:33:27 2019
New Revision: 273644
URL: https://gcc.gnu.org/viewcvs?rev=273644&root=gcc&view=rev
Log:
c++-coroutines - Remove prototype check for suspended.
In Köln, we decided that the ABI would not contain any formal statement about
checking for suspended state, but that an implementation would be permitted to
have some mechanism that works in "debug" mode.
This patch removes the prototype callback added to determine suspended state
and the internal frame state matching. It is still possible to flag suspended
state in this implementation by setting the "destroy()" function pointer to
NULL when the routine is running and making it point to the destroy machinery
when suspended. This is similar to the "done" flag (but carries more overhead
in that it is an action on each state switch).
The __builtin_coro_is_suspended is left in place and re-implemented as a check
for non-null on the destroy pointer (this means that it wil trivially report
that all coros are suspended if they don't implement the switch of destroy to
NULL).
2019-07-21 Iain Sandoe <iain@sandoe.co.uk>
gcc/
* coroutine-passes.c (lower_coro_builtin): Revert changes to handle
three callback pointers. Reimplement the is_suspended check to be a
test for non-null on the destroy() function pointer field.
gcc/cp/
* coroutines.cc (build_actor_fn): Remove support for the "is_suspended"
test.
(build_suspended_fn): Likewise.
(register_local_var_uses): Likewise.
(morph_fn_to_coro): Likewise.
* cp-tree.h (morph_fn_to_coro): Likewise.
* decl.c (finish_function): Likewise.
Modified:
branches/c++-coroutines/ChangeLog.coroutines
branches/c++-coroutines/gcc/coroutine-passes.c
branches/c++-coroutines/gcc/cp/coroutines.cc
branches/c++-coroutines/gcc/cp/cp-tree.h
branches/c++-coroutines/gcc/cp/decl.c