diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2023-11-20 17:44:56 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-12-19 15:27:47 +0100 |
commit | 54d049b2815a03d1f58dee4df1c4cc0b0faddcc1 (patch) | |
tree | 35216d42edfced67e87da073ad367c0fcadf01d6 /gcc/btfout.cc | |
parent | 71bc7c6fa116dec13ca0c636c2755d26f3341b33 (diff) | |
download | gcc-54d049b2815a03d1f58dee4df1c4cc0b0faddcc1.zip gcc-54d049b2815a03d1f58dee4df1c4cc0b0faddcc1.tar.gz gcc-54d049b2815a03d1f58dee4df1c4cc0b0faddcc1.tar.bz2 |
ada: Further cleanup in finalization machinery
This streamlines the submachinery that makes it so that the finalization of
temporaries created for EWAs and conditional expressions is deferred to the
enclosing context.
The original implementation was using a deep tree traversal for EWAs, which
was later restricted to immediate subexpressions; this further flattens it
to the traversal of the immediate list of actions of the EWA in keeping with
the implementation for conditional expressions.
This should not change anything because the enclosing context found by the
machinery is the same, whatever the starting position in a nest of EWAs or
conditional expressions.
gcc/ada/
* exp_ch4.adb (Process_If_Case_Statements): Rename into...
(Process_Transients_In_Expression): ...this and beef up comment.
(Expand_N_Case_Expression): Call Process_Transients_In_Expression
unconditionally on the list of actions of each alternative.
(Expand_N_Expression_With_Actions): Do not deal with actions in
nested subexpressions, but call Process_Transients_In_Expression
on the list of actions only.
(Expand_N_If_Expression): Adjust to above renaming. Add missing
calls to Process_Transients_In_Expression in the case when an EWA
is not used because of Minimize_Expression_With_Actions.
Diffstat (limited to 'gcc/btfout.cc')
0 files changed, 0 insertions, 0 deletions