Commit ee2e3f6b by Arnaud Charlet

[multiple changes]

2011-08-29  Robert Dewar  <dewar@adacore.com>

	* sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
	exp_dist.adb: Minor code reorganization.
	Minor reformatting.

2011-08-29  Thomas Quinot  <quinot@adacore.com>

	* sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
	primitive operation must support external streaming if it is not a
	controlling access result.

From-SVN: r178199
parent 646e2823
2011-08-29 Robert Dewar <dewar@adacore.com>
* sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
exp_dist.adb: Minor code reorganization.
Minor reformatting.
2011-08-29 Thomas Quinot <quinot@adacore.com>
* sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
primitive operation must support external streaming if it is not a
controlling access result.
2011-08-29 Thomas Quinot <quinot@adacore.com> 2011-08-29 Thomas Quinot <quinot@adacore.com>
* sinfo.ads, sem_ch7.adb: Minor reformatting. * sinfo.ads, sem_ch7.adb: Minor reformatting.
......
...@@ -10539,6 +10539,7 @@ package body Exp_Dist is ...@@ -10539,6 +10539,7 @@ package body Exp_Dist is
Expr := Expr :=
Make_Integer_Literal (Loc, J); Make_Integer_Literal (Loc, J);
end if; end if;
Set_Etype (Expr, Disc_Type); Set_Etype (Expr, Disc_Type);
Append_To (Union_TC_Params, Append_To (Union_TC_Params,
Build_To_Any_Call (Expr, Decls)); Build_To_Any_Call (Expr, Decls));
...@@ -10566,8 +10567,9 @@ package body Exp_Dist is ...@@ -10566,8 +10567,9 @@ package body Exp_Dist is
(RTE (RE_TA_I32), Loc), (RTE (RE_TA_I32), Loc),
Parameter_Associations => Parameter_Associations =>
New_List ( New_List (
Make_Integer_Literal Make_Integer_Literal (Loc,
(Loc, Choice_Index))); Intval => Choice_Index)));
begin begin
Insert_Before Insert_Before
(Default_Node, New_Default_Node); (Default_Node, New_Default_Node);
......
...@@ -1229,13 +1229,13 @@ package body Exp_Intr is ...@@ -1229,13 +1229,13 @@ package body Exp_Intr is
-- Generate a test of whether any earlier finalization raised an -- Generate a test of whether any earlier finalization raised an
-- exception, and in that case raise Program_Error with the previous -- exception, and in that case raise Program_Error with the previous
-- exception occurrence. -- exception occurrence.
--
-- Generate: -- Generate:
-- if Raised then -- if Raised and then not Abort then
-- Reraise_Occurrence (E); -- for .NET and -- Reraise_Occurrence (E); -- for .NET and
-- -- restricted RTS -- -- restricted RTS
-- <or> -- <or>
-- Raise_From_Controlled_Operation (E, Abort); -- all other cases -- Raise_From_Controlled_Operation (E); -- all other cases
-- end if; -- end if;
if Present (Raised_Id) then if Present (Raised_Id) then
......
...@@ -6111,8 +6111,9 @@ package body Make is ...@@ -6111,8 +6111,9 @@ package body Make is
case Targparm.VM_Target is case Targparm.VM_Target is
when Targparm.JVM_Target => when Targparm.JVM_Target =>
-- Do not check for an object file (".o") when compiling to -- Do not check for an object file (".o") when compiling
-- JVM machine since ".class" files are generated instead. -- to JVM machine since ".class" files are generated
-- instead.
Check_Object_Consistency := False; Check_Object_Consistency := False;
Gcc := new String'("jvm-gnatcompile"); Gcc := new String'("jvm-gnatcompile");
......
...@@ -1391,6 +1391,10 @@ package body Sem_Cat is ...@@ -1391,6 +1391,10 @@ package body Sem_Cat is
if Ekind (Subp) = E_Function then if Ekind (Subp) = E_Function then
Rtyp := Etype (Subp); Rtyp := Etype (Subp);
-- AI05-0101 (Binding Interpretation): The result type of a remote
-- function must either support external streaming or be a
-- controlling access result type.
if Has_Controlling_Result (Subp) then if Has_Controlling_Result (Subp) then
null; null;
...@@ -1406,11 +1410,9 @@ package body Sem_Cat is ...@@ -1406,11 +1410,9 @@ package body Sem_Cat is
("limited return type must have Read and Write attributes", ("limited return type must have Read and Write attributes",
Parent (Subp)); Parent (Subp));
Explain_Limited_Type (Rtyp, Parent (Subp)); Explain_Limited_Type (Rtyp, Parent (Subp));
end if;
-- Check that the return type supports external streaming. -- Check that the return type supports external streaming
-- Note that the language of the standard (E.2.2(14)) does not
-- explicitly mention that case, but it really does not make
-- sense to return a value containing a local access type.
elsif No_External_Streaming (Rtyp) elsif No_External_Streaming (Rtyp)
and then not Error_Posted (Rtyp) and then not Error_Posted (Rtyp)
...@@ -1420,7 +1422,6 @@ package body Sem_Cat is ...@@ -1420,7 +1422,6 @@ package body Sem_Cat is
Parent (Subp)); Parent (Subp));
end if; end if;
end if; end if;
end if;
Param := First_Formal (Subp); Param := First_Formal (Subp);
while Present (Param) loop while Present (Param) loop
...@@ -1674,13 +1675,8 @@ package body Sem_Cat is ...@@ -1674,13 +1675,8 @@ package body Sem_Cat is
then then
return True; return True;
-- A limited interface is not currently a legal ancestor for the -- AI05-0060 (Binding Interpretation): A limited interface is a legal
-- designated type of an RACW type, because a type that implements -- ancestor for the designated type of an RACW type.
-- such an interface need not be limited. However, the ARG seems to
-- incline towards allowing an access to classwide limited interface
-- type as a remote access type, as resolved in AI05-060. But note
-- that the expansion circuitry for RACWs that designate classwide
-- interfaces is not complete yet.
elsif Is_Limited_Record (E) and then Is_Limited_Interface (E) then elsif Is_Limited_Record (E) and then Is_Limited_Interface (E) then
return True; return True;
......
...@@ -1196,7 +1196,7 @@ package body Sem_Ch7 is ...@@ -1196,7 +1196,7 @@ package body Sem_Ch7 is
-- Check on incomplete types -- Check on incomplete types
-- AI05-0213: a formal incomplete type has no completion -- AI05-0213: A formal incomplete type has no completion
if Ekind (E) = E_Incomplete_Type if Ekind (E) = E_Incomplete_Type
and then No (Full_View (E)) and then No (Full_View (E))
......
...@@ -4387,6 +4387,7 @@ package body Sem_Res is ...@@ -4387,6 +4387,7 @@ package body Sem_Res is
declare declare
Discr : constant Entity_Id := Discr : constant Entity_Id :=
Defining_Identifier (Associated_Node_For_Itype (Typ)); Defining_Identifier (Associated_Node_For_Itype (Typ));
begin begin
-- Ada 2012 AI05-0052: If the designated type of the allocator -- Ada 2012 AI05-0052: If the designated type of the allocator
-- is limited, then the allocator shall not be used to define -- is limited, then the allocator shall not be used to define
......
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