Commit 7bfff488 by Arnaud Charlet

[multiple changes]

2014-07-31  Robert Dewar  <dewar@adacore.com>

	* inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
	s-traceb-mastop.adb: Minor reformatting.

2014-07-31  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
	expansion, to handle properly visibility of selected components
	in instance bodies.

From-SVN: r213337
parent aa3efecd
2014-07-31 Robert Dewar <dewar@adacore.com> 2014-07-31 Robert Dewar <dewar@adacore.com>
* inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
s-traceb-mastop.adb: Minor reformatting.
2014-07-31 Ed Schonberg <schonberg@adacore.com>
* exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
expansion, to handle properly visibility of selected components
in instance bodies.
2014-07-31 Robert Dewar <dewar@adacore.com>
* par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends. * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
* par-ch2.adb (P_Pragma): Set Inside_Depends. * par-ch2.adb (P_Pragma): Set Inside_Depends.
* par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
......
...@@ -4588,8 +4588,10 @@ package body Exp_Ch3 is ...@@ -4588,8 +4588,10 @@ package body Exp_Ch3 is
begin begin
-- Expand_Record_Extension is called directly from the semantics, so -- Expand_Record_Extension is called directly from the semantics, so
-- we must check to see whether expansion is active before proceeding -- we must check to see whether expansion is active before proceeding
-- Because this affects the visibility of selected components in bodies
-- of instances, it must also be called in ASIS mode.
if not Expander_Active then if not (Expander_Active or ASIS_Mode) then
return; return;
end if; end if;
......
...@@ -1968,10 +1968,13 @@ package body Inline is ...@@ -1968,10 +1968,13 @@ package body Inline is
--------------------------- ---------------------------
function Has_Excluded_Contract return Boolean is function Has_Excluded_Contract return Boolean is
function Check_Excluded_Contracts (E : Entity_Id) return Boolean; function Check_Excluded_Contracts (E : Entity_Id) return Boolean;
-- Return True if the subprogram E has unsupported contracts -- Return True if the subprogram E has unsupported contracts
------------------------------
-- Check_Excluded_Contracts --
------------------------------
function Check_Excluded_Contracts (E : Entity_Id) return Boolean is function Check_Excluded_Contracts (E : Entity_Id) return Boolean is
Items : constant Node_Id := Contract (E); Items : constant Node_Id := Contract (E);
...@@ -1990,8 +1993,13 @@ package body Inline is ...@@ -1990,8 +1993,13 @@ package body Inline is
return False; return False;
end Check_Excluded_Contracts; end Check_Excluded_Contracts;
-- Local declarations
Decl : Node_Id; Decl : Node_Id;
P_Id : Pragma_Id; P_Id : Pragma_Id;
-- Start of processing for Has_Excluded_Contract
begin begin
if Check_Excluded_Contracts (Spec_Id) if Check_Excluded_Contracts (Spec_Id)
or else Check_Excluded_Contracts (Body_Id) or else Check_Excluded_Contracts (Body_Id)
......
...@@ -196,8 +196,8 @@ package body System.Memory is ...@@ -196,8 +196,8 @@ package body System.Memory is
end if; end if;
Timestamp := System.OS_Primitives.Clock; Timestamp := System.OS_Primitives.Clock;
Call_Chain (Tracebk, Max_Call_Stack, Num_Calls, Call_Chain
Skip_Frames => 2); (Tracebk, Max_Call_Stack, Num_Calls, Skip_Frames => 2);
fputc (Character'Pos ('A'), Gmemfile); fputc (Character'Pos ('A'), Gmemfile);
fwrite (Result'Address, Address_Size, 1, Gmemfile); fwrite (Result'Address, Address_Size, 1, Gmemfile);
fwrite (Actual_Size'Address, size_t'Max_Size_In_Storage_Elements, 1, fwrite (Actual_Size'Address, size_t'Max_Size_In_Storage_Elements, 1,
...@@ -262,8 +262,8 @@ package body System.Memory is ...@@ -262,8 +262,8 @@ package body System.Memory is
Gmem_Initialize; Gmem_Initialize;
end if; end if;
Call_Chain (Tracebk, Max_Call_Stack, Num_Calls, Call_Chain
Skip_Frames => 2); (Tracebk, Max_Call_Stack, Num_Calls, Skip_Frames => 2);
Timestamp := System.OS_Primitives.Clock; Timestamp := System.OS_Primitives.Clock;
fputc (Character'Pos ('D'), Gmemfile); fputc (Character'Pos ('D'), Gmemfile);
fwrite (Addr'Address, Address_Size, 1, Gmemfile); fwrite (Addr'Address, Address_Size, 1, Gmemfile);
...@@ -345,8 +345,8 @@ package body System.Memory is ...@@ -345,8 +345,8 @@ package body System.Memory is
if Needs_Init then if Needs_Init then
Gmem_Initialize; Gmem_Initialize;
end if; end if;
Call_Chain (Tracebk, Max_Call_Stack, Num_Calls, Call_Chain
Skip_Frames => 2); (Tracebk, Max_Call_Stack, Num_Calls, Skip_Frames => 2);
Timestamp := System.OS_Primitives.Clock; Timestamp := System.OS_Primitives.Clock;
fputc (Character'Pos ('D'), Gmemfile); fputc (Character'Pos ('D'), Gmemfile);
fwrite (Addr'Address, Address_Size, 1, Gmemfile); fwrite (Addr'Address, Address_Size, 1, Gmemfile);
......
...@@ -618,8 +618,11 @@ package body System.Traceback is ...@@ -618,8 +618,11 @@ package body System.Traceback is
begin begin
Call_Chain Call_Chain
(Traceback'Address, Max_Len, Len, (Traceback'Address, Max_Len, Len,
Exclude_Min, Exclude_Max, Skip_Frames + 1); Exclude_Min, Exclude_Max,
-- Skip one extra frame so we skip the other Call_Chain as well
-- Skip one extra frame to skip the other Call_Chain entry as well
Skip_Frames => Skip_Frames + 1);
end Call_Chain; end Call_Chain;
end System.Traceback; end System.Traceback;
...@@ -114,8 +114,11 @@ package body System.Traceback is ...@@ -114,8 +114,11 @@ package body System.Traceback is
begin begin
Call_Chain Call_Chain
(Traceback'Address, Max_Len, Len, (Traceback'Address, Max_Len, Len,
Exclude_Min, Exclude_Max, Skip_Frames + 1); Exclude_Min, Exclude_Max,
-- Skip one extra frame so we skip the other Call_Chain as well
-- Skip one extra frame to skip the other Call_Chain entry as well
Skip_Frames => Skip_Frames + 1);
end Call_Chain; end Call_Chain;
------------------ ------------------
......
...@@ -109,8 +109,11 @@ package body System.Traceback is ...@@ -109,8 +109,11 @@ package body System.Traceback is
begin begin
Call_Chain Call_Chain
(Traceback'Address, Max_Len, Len, (Traceback'Address, Max_Len, Len,
Exclude_Min, Exclude_Max, Skip_Frames + 1); Exclude_Min, Exclude_Max,
-- Skip one extra frame so we skip the other Call_Chain as well
-- Skip one extra frame to skip the other Call_Chain entry as well
Skip_Frames => Skip_Frames + 1);
end Call_Chain; end Call_Chain;
end System.Traceback; end System.Traceback;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment