aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_res.adb
diff options
context:
space:
mode:
authorYannick Moy <moy@adacore.com>2011-08-02 15:28:12 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-02 17:28:12 +0200
commit83f331504ee98ff8a88d47bb91ea0feafd3f97b2 (patch)
tree71a15c33ec39eead3557d27d7b766e39978f5307 /gcc/ada/sem_res.adb
parent7b98672ff9bc9b1096b604e9f900eb1692ea8bd3 (diff)
downloadgcc-83f331504ee98ff8a88d47bb91ea0feafd3f97b2.zip
gcc-83f331504ee98ff8a88d47bb91ea0feafd3f97b2.tar.gz
gcc-83f331504ee98ff8a88d47bb91ea0feafd3f97b2.tar.bz2
sem_ch3.adb, [...]: Protect call to Current_Subprogram which might be costly when repeated.
2011-08-02 Yannick Moy <moy@adacore.com> * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb, sem_ch11.adb: Protect call to Current_Subprogram which might be costly when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into Mark_Non_ALFA_Subprogram_Body. Split body of Mark_Non_ALFA_Subprogram_Body to get body small and inlined. From-SVN: r177182
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r--gcc/ada/sem_res.adb8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index 893faf3..faf20d6 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -5964,12 +5964,12 @@ package body Sem_Res is
-- types or array types except String.
if Is_Boolean_Type (T) then
- Current_Subprogram_Body_Is_Not_In_ALFA;
+ Mark_Non_ALFA_Subprogram_Body;
Check_SPARK_Restriction
("comparison is not defined on Boolean type", N);
elsif Is_Array_Type (T) then
- Current_Subprogram_Body_Is_Not_In_ALFA;
+ Mark_Non_ALFA_Subprogram_Body;
if Base_Type (T) /= Standard_String then
Check_SPARK_Restriction
@@ -6828,7 +6828,7 @@ package body Sem_Res is
-- operands have equal static bounds.
if Is_Array_Type (T) then
- Current_Subprogram_Body_Is_Not_In_ALFA;
+ Mark_Non_ALFA_Subprogram_Body;
-- Protect call to Matching_Static_Array_Bounds to avoid costly
-- operation if not needed.
@@ -7378,7 +7378,7 @@ package body Sem_Res is
if Is_Array_Type (B_Typ)
and then Nkind (N) in N_Binary_Op
then
- Current_Subprogram_Body_Is_Not_In_ALFA;
+ Mark_Non_ALFA_Subprogram_Body;
declare
Left_Typ : constant Node_Id := Etype (Left_Opnd (N));