diff options
author | Robert Dewar <dewar@adacore.com> | 2008-05-27 12:44:21 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-05-27 12:44:21 +0200 |
commit | 9a3c99402709de5921e18fc18f3a48f71db3b476 (patch) | |
tree | 13f37c41f2ec345b0316a95404fb6281de178a42 /gcc/ada/s-stausa.adb | |
parent | 6ba6b1e33331f89ae41ce79e4edf3aee5b744f9c (diff) | |
download | gcc-9a3c99402709de5921e18fc18f3a48f71db3b476.zip gcc-9a3c99402709de5921e18fc18f3a48f71db3b476.tar.gz gcc-9a3c99402709de5921e18fc18f3a48f71db3b476.tar.bz2 |
makeutl.adb: Minor reformatting
2008-05-27 Robert Dewar <dewar@adacore.com>
* makeutl.adb: Minor reformatting
* prj-nmsc.adb: Minor reformatting
* s-stausa.adb: Minor reformatting
* s-stausa.ads: Minor reformatting
* sem_ch6.adb: Minor reformatting
From-SVN: r136005
Diffstat (limited to 'gcc/ada/s-stausa.adb')
-rw-r--r-- | gcc/ada/s-stausa.adb | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/gcc/ada/s-stausa.adb b/gcc/ada/s-stausa.adb index 71474dd..07668da 100644 --- a/gcc/ada/s-stausa.adb +++ b/gcc/ada/s-stausa.adb @@ -259,21 +259,24 @@ package body System.Stack_Usage is -- likely to happen. Current_Stack_Level : aliased Integer; + begin -- Reajust the pattern size. When we arrive in this function, there is -- already a given amount of stack used, that we won't analyze. - Analyzer.Stack_Used_When_Filling := Stack_Size - (Analyzer.Bottom_Of_Stack, - To_Stack_Address (Current_Stack_Level'Address)) - + Natural (Current_Stack_Level'Size); + Analyzer.Stack_Used_When_Filling := + Stack_Size + (Analyzer.Bottom_Of_Stack, + To_Stack_Address (Current_Stack_Level'Address)) + + Natural (Current_Stack_Level'Size); - Analyzer.Pattern_Size := Analyzer.Pattern_Size - - Analyzer.Stack_Used_When_Filling; + Analyzer.Pattern_Size := + Analyzer.Pattern_Size - Analyzer.Stack_Used_When_Filling; declare Stack : aliased Stack_Slots - (1 .. Analyzer.Pattern_Size / Bytes_Per_Pattern); + (1 .. Analyzer.Pattern_Size / Bytes_Per_Pattern); + begin Stack := (others => Analyzer.Pattern); @@ -318,8 +321,7 @@ package body System.Stack_Usage is Analyzer.Task_Name := (others => ' '); - -- Compute the task name, and truncate it if it's bigger than - -- Task_Name_Length + -- Compute the task name, and truncate if bigger than Task_Name_Length if Task_Name'Length <= Task_Name_Length then Analyzer.Task_Name (1 .. Task_Name'Length) := Task_Name; @@ -538,16 +540,18 @@ package body System.Stack_Usage is procedure Report_Result (Analyzer : Stack_Analyzer) is Measure : constant Natural := - Stack_Size - (Analyzer.Topmost_Touched_Mark, - Analyzer.Bottom_Of_Stack) - + Analyzer.Stack_Used_When_Filling; - Result : constant Task_Result := - (Task_Name => Analyzer.Task_Name, - Max_Size => Analyzer.Stack_Size, - Min_Measure => Measure, - Max_Measure => Measure + Analyzer.Stack_Size - - Analyzer.Pattern_Size); + Stack_Size + (Analyzer.Topmost_Touched_Mark, + Analyzer.Bottom_Of_Stack) + + Analyzer.Stack_Used_When_Filling; + + Result : constant Task_Result := + (Task_Name => Analyzer.Task_Name, + Max_Size => Analyzer.Stack_Size, + Min_Measure => Measure, + Max_Measure => Measure + Analyzer.Stack_Size + - Analyzer.Pattern_Size); + begin if Analyzer.Result_Id in Result_Array'Range then |