public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-177] [Ada] Remove repeated analysis of attribute prefixes
@ 2022-05-09 9:30 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-05-09 9:30 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:9a9d06f7115d18d57fa603d6b80a53912607a703
commit r13-177-g9a9d06f7115d18d57fa603d6b80a53912607a703
Author: Piotr Trojanek <trojanek@adacore.com>
Date: Mon Jan 10 21:08:04 2022 +0100
[Ada] Remove repeated analysis of attribute prefixes
At the beginning of Analyze_Attribute routine we analyze the attribute
prefix. There is no need to repeat this analysis in branches for
individual attributes.
Code cleanup related to various Analyze/Resolve routines.
gcc/ada/
* sem_attr.adb (Analyze_Attribute): Remove calls to Analyze for
attributes Identity, Priority, Ref, Restriction_Set, To_Address
and for tasking-related attributes Callable, Terminated and
Storage_Size.
Diff:
---
gcc/ada/sem_attr.adb | 8 --------
1 file changed, 8 deletions(-)
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index ca841d3f40f..47485676c74 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -2693,8 +2693,6 @@ package body Sem_Attr is
procedure Check_Task_Prefix is
begin
- Analyze (P);
-
-- Ada 2005 (AI-345): Attribute 'Terminated can be applied to
-- task interface class-wide types.
@@ -4301,7 +4299,6 @@ package body Sem_Attr is
when Attribute_Identity =>
Check_E0;
- Analyze (P);
if Etype (P) = Standard_Exception_Type then
Set_Etype (N, RTE (RE_Exception_Id));
@@ -5505,8 +5502,6 @@ package body Sem_Attr is
-- The prefix must be a protected object (AARM D.5.2 (2/2))
- Analyze (P);
-
if Is_Protected_Type (Etype (P))
or else (Is_Access_Type (Etype (P))
and then Is_Protected_Type (Designated_Type (Etype (P))))
@@ -5846,7 +5841,6 @@ package body Sem_Attr is
when Attribute_Ref =>
Check_E1;
- Analyze (P);
if Nkind (P) /= N_Expanded_Name
or else not Is_RTE (P_Type, RE_Address)
@@ -5874,7 +5868,6 @@ package body Sem_Attr is
begin
Check_E1;
- Analyze (P);
Check_System_Prefix;
-- No_Dependence case
@@ -6456,7 +6449,6 @@ package body Sem_Attr is
Val : Uint;
begin
Check_E1;
- Analyze (P);
Check_System_Prefix;
Generate_Reference (RTE (RE_Address), P);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-09 9:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09 9:30 [gcc r13-177] [Ada] Remove repeated analysis of attribute prefixes Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).