From: Arnaud Charlet Date: Tue, 12 Oct 2010 13:19:36 +0000 (+0200) Subject: [multiple changes] X-Git-Tag: upstream/12.2.0~89435 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d80ee77c1eff34e01d2110cd29d450d8f8427ac8;p=platform%2Fupstream%2Fgcc.git [multiple changes] 2010-10-12 Thomas Quinot * rtsfind.ads, exp_dist.adb, exp_dist.ads (Build_General_Calling_Stubs, PolyORB case): Request is now a controlled type: we can declare the request on the stack, and we do not need explicit cleanup actions anymore. 2010-10-12 Bob Duff * s-rident.ads (Profile_Info): This variable is now constant. From-SVN: r165376 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 016c208..efc18bd 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,14 @@ +2010-10-12 Thomas Quinot + + * rtsfind.ads, exp_dist.adb, exp_dist.ads (Build_General_Calling_Stubs, + PolyORB case): Request is now a controlled type: we can declare the + request on the stack, and we do not need explicit cleanup actions + anymore. + +2010-10-12 Bob Duff + + * s-rident.ads (Profile_Info): This variable is now constant. + 2010-10-12 Emmanuel Briot * g-comlin.adb, g-comlin.ads (Define_Switch): Put back (unused) diff --git a/gcc/ada/exp_dist.adb b/gcc/ada/exp_dist.adb index 06f32d9..b8feb09 100644 --- a/gcc/ada/exp_dist.adb +++ b/gcc/ada/exp_dist.adb @@ -7103,7 +7103,7 @@ package body Exp_Dist is (RE : RE_Id; Actuals : List_Id := New_List) return Node_Id; -- Generate a procedure call statement calling RE with the given - -- actuals. Request is appended to the list. + -- actuals. Request'Access is appended to the list. --------------------------- -- Make_Request_RTE_Call -- @@ -7114,7 +7114,10 @@ package body Exp_Dist is Actuals : List_Id := New_List) return Node_Id is begin - Append_To (Actuals, New_Occurrence_Of (Request, Loc)); + Append_To (Actuals, + Make_Attribute_Reference (Loc, + Prefix => New_Occurrence_Of (Request, Loc), + Attribute_Name => Name_Access)); return Make_Procedure_Call_Statement (Loc, Name => New_Occurrence_Of (RTE (RE), Loc), @@ -7174,9 +7177,9 @@ package body Exp_Dist is Append_To (Decls, Make_Object_Declaration (Loc, Defining_Identifier => Request, - Aliased_Present => False, + Aliased_Present => True, Object_Definition => - New_Occurrence_Of (RTE (RE_Request_Access), Loc))); + New_Occurrence_Of (RTE (RE_Request), Loc))); Result := Make_Temporary (Loc, 'R'); @@ -7410,13 +7413,16 @@ package body Exp_Dist is Append_List_To (Statements, Extra_Formal_Statements); Append_To (Statements, - Make_Request_RTE_Call (RE_Request_Create, New_List ( - Target_Object, - Subprogram_Id, - New_Occurrence_Of (Arguments, Loc), - New_Occurrence_Of (Result, Loc), - New_Occurrence_Of - (RTE (RE_Nil_Exc_List), Loc)))); + Make_Procedure_Call_Statement (Loc, + Name => + New_Occurrence_Of (RTE (RE_Request_Setup), Loc), + Parameter_Associations => New_List ( + New_Occurrence_Of (Request, Loc), + Target_Object, + Subprogram_Id, + New_Occurrence_Of (Arguments, Loc), + New_Occurrence_Of (Result, Loc), + New_Occurrence_Of (RTE (RE_Nil_Exc_List), Loc)))); pragma Assert (not (Is_Known_Non_Asynchronous and Is_Known_Asynchronous)); @@ -7447,8 +7453,7 @@ package body Exp_Dist is -- Asynchronous case if not Is_Known_Non_Asynchronous then - Asynchronous_Statements := - New_List (Make_Request_RTE_Call (RE_Request_Destroy)); + Asynchronous_Statements := New_List (Make_Null_Statement (Loc)); end if; -- Non-asynchronous case @@ -7465,10 +7470,6 @@ package body Exp_Dist is New_Occurrence_Of (Request, Loc)))); if Is_Function then - - Append_To (Non_Asynchronous_Statements, - Make_Request_RTE_Call (RE_Request_Destroy)); - -- If this is a function call, read the value and return it Append_To (Non_Asynchronous_Statements, @@ -7486,9 +7487,6 @@ package body Exp_Dist is -- Case of a procedure: deal with IN OUT and OUT formals Append_List_To (Non_Asynchronous_Statements, After_Statements); - - Append_To (Non_Asynchronous_Statements, - Make_Request_RTE_Call (RE_Request_Destroy)); end if; end if; diff --git a/gcc/ada/exp_dist.ads b/gcc/ada/exp_dist.ads index ff1c343..382f77a 100644 --- a/gcc/ada/exp_dist.ads +++ b/gcc/ada/exp_dist.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -35,7 +35,7 @@ package Exp_Dist is PCS_Version_Number : constant array (PCS_Names) of Int := (Name_No_DSA => 1, Name_GARLIC_DSA => 1, - Name_PolyORB_DSA => 3); + Name_PolyORB_DSA => 4); -- PCS interface version. This is used to check for consistency between the -- compiler used to generate distribution stubs and the PCS implementation. -- It must be incremented whenever a change is made to the generated code diff --git a/gcc/ada/rtsfind.ads b/gcc/ada/rtsfind.ads index ca61bd1..959a580 100644 --- a/gcc/ada/rtsfind.ads +++ b/gcc/ada/rtsfind.ads @@ -1135,6 +1135,7 @@ package Rtsfind is RE_Raise_Program_Error_Unknown_Tag, -- System.Partition_Interface RE_Register_Passive_Package, -- System.Partition_Interface RE_Register_Receiving_Stub, -- System.Partition_Interface + RE_Request, -- System.Partition_Interface RE_Request_Access, -- System.Partition_Interface RE_RCI_Locator, -- System.Partition_Interface RE_RCI_Subp_Info, -- System.Partition_Interface @@ -1174,12 +1175,11 @@ package Rtsfind is RE_NVList_Ref, -- System.Partition_Interface RE_NVList_Create, -- System.Partition_Interface RE_NVList_Add_Item, -- System.Partition_Interface - RE_Request_Create, -- System.Partition_Interface - RE_Request_Invoke, -- System.Partition_Interface RE_Request_Arguments, -- System.Partition_Interface - RE_Request_Set_Out, -- System.Partition_Interface + RE_Request_Invoke, -- System.Partition_Interface RE_Request_Raise_Occurrence, -- System.Partition_Interface - RE_Request_Destroy, -- System.Partition_Interface + RE_Request_Set_Out, -- System.Partition_Interface + RE_Request_Setup, -- System.Partition_Interface RE_Nil_Exc_List, -- System.Partition_Interface RE_Servant, -- System.Partition_Interface RE_Move_Any_Value, -- System.Partition_Interface @@ -2308,6 +2308,7 @@ package Rtsfind is RE_Raise_Program_Error_Unknown_Tag => System_Partition_Interface, RE_Register_Passive_Package => System_Partition_Interface, RE_Register_Receiving_Stub => System_Partition_Interface, + RE_Request => System_Partition_Interface, RE_Request_Access => System_Partition_Interface, RE_RCI_Locator => System_Partition_Interface, RE_RCI_Subp_Info => System_Partition_Interface, @@ -2338,12 +2339,11 @@ package Rtsfind is RE_NVList_Ref => System_Partition_Interface, RE_NVList_Create => System_Partition_Interface, RE_NVList_Add_Item => System_Partition_Interface, - RE_Request_Create => System_Partition_Interface, - RE_Request_Invoke => System_Partition_Interface, RE_Request_Arguments => System_Partition_Interface, - RE_Request_Set_Out => System_Partition_Interface, + RE_Request_Invoke => System_Partition_Interface, RE_Request_Raise_Occurrence => System_Partition_Interface, - RE_Request_Destroy => System_Partition_Interface, + RE_Request_Set_Out => System_Partition_Interface, + RE_Request_Setup => System_Partition_Interface, RE_Nil_Exc_List => System_Partition_Interface, RE_Servant => System_Partition_Interface, RE_Move_Any_Value => System_Partition_Interface, diff --git a/gcc/ada/s-rident.ads b/gcc/ada/s-rident.ads index 972a3e8..da8868e 100644 --- a/gcc/ada/s-rident.ads +++ b/gcc/ada/s-rident.ads @@ -329,7 +329,7 @@ package System.Rident is -- value of the parameter permitted by the profile. end record; - Profile_Info : array (Profile_Name_Actual) of Profile_Data := + Profile_Info : constant array (Profile_Name_Actual) of Profile_Data := -- Restricted Profile