diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2020-06-30 07:26:51 +0100 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-17 13:15:27 -0300 |
commit | f08b1d53d03e94ba2f3da096c3d3438eeb047eeb (patch) | |
tree | 0c18f2bab5ab1bca5697c5bfdfa4bea7bcdb5100 /gcc/fortran | |
parent | 03fe2aba778a4254eaa87f236a6784edd6247ce3 (diff) | |
download | gcc-f08b1d53d03e94ba2f3da096c3d3438eeb047eeb.zip gcc-f08b1d53d03e94ba2f3da096c3d3438eeb047eeb.tar.gz gcc-f08b1d53d03e94ba2f3da096c3d3438eeb047eeb.tar.bz2 |
coroutines: Collect the function body rewrite code.
The standard describes a rewrite of the body of the user-authored
function (which wraps it in a try-catch block and provides the
initial and final suspend expressions). The exact arrangement of
this was still in flux right up until the DIS and as a consequence
was a bit of a moving target.
The net result was a fragmented implementation of the parts of
the rewrite which is now impeding progress in fixing other issues.
This patch collates the rewrite action into a single function and
carries this out earlier.
gcc/cp/ChangeLog:
* coroutines.cc (expand_one_await_expression): Remove
code dealing with initial suspend.
(build_actor_fn): Remove code special-casing initial
and final suspend. Handle the final suspend and marking
of the coroutine as done.
(coro_rewrite_function_body): New.
(bind_expr_find_in_subtree): Remove.
(coro_body_contains_bind_expr_p): Remove.
(morph_fn_to_coro): Split the rewrite of the original
function into coro_rewrite_function_body and call it.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions