Commit 7e8ed0a6 by Arnaud Charlet

[multiple changes]

2009-04-16  Jerome Lambourg  <lambourg@adacore.com>

	* sem_prag.adb (Process_Import_Or_Interface): With .NET,
	Access_Subprogram types can also be imported.
	(Check_Form_Of_Interface_Name): Accept '/' character in entity CIL
	names.

2009-04-16  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
	preserve homonym chain when the declaration is rewritten into a
	renaming declaration, in order to preserve visibility structure.

From-SVN: r146169
parent 54634841
2009-04-16 Jerome Lambourg <lambourg@adacore.com> 2009-04-16 Jerome Lambourg <lambourg@adacore.com>
* sem_prag.adb (Process_Import_Or_Interface): With .NET,
Access_Subprogram types can also be imported.
(Check_Form_Of_Interface_Name): Accept '/' character in entity CIL
names.
2009-04-16 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
preserve homonym chain when the declaration is rewritten into a
renaming declaration, in order to preserve visibility structure.
2009-04-16 Jerome Lambourg <lambourg@adacore.com>
* sem_prag.adb (Analyze_Pragma): Make sure that pragma pack is not * sem_prag.adb (Analyze_Pragma): Make sure that pragma pack is not
taken into account for VM targets. taken into account for VM targets.
...@@ -5588,7 +5588,7 @@ package body Exp_Ch6 is ...@@ -5588,7 +5588,7 @@ package body Exp_Ch6 is
-- in current scope). The Next_Entity links of the two entities also -- in current scope). The Next_Entity links of the two entities also
-- have to be swapped since the entities are part of the return -- have to be swapped since the entities are part of the return
-- scope's entity list and the list structure would otherwise be -- scope's entity list and the list structure would otherwise be
-- corrupted. -- corrupted. Finally, the homonym chain must be preserved as well.
declare declare
Renaming_Def_Id : constant Entity_Id := Renaming_Def_Id : constant Entity_Id :=
...@@ -5602,6 +5602,7 @@ package body Exp_Ch6 is ...@@ -5602,6 +5602,7 @@ package body Exp_Ch6 is
Set_Next_Entity (Renaming_Def_Id, Next_Entity (Obj_Def_Id)); Set_Next_Entity (Renaming_Def_Id, Next_Entity (Obj_Def_Id));
Set_Next_Entity (Obj_Def_Id, Next_Entity_Temp); Set_Next_Entity (Obj_Def_Id, Next_Entity_Temp);
Set_Homonym (Renaming_Def_Id, Homonym (Obj_Def_Id));
Exchange_Entities (Renaming_Def_Id, Obj_Def_Id); Exchange_Entities (Renaming_Def_Id, Obj_Def_Id);
end; end;
......
...@@ -3531,13 +3531,14 @@ package body Sem_Prag is ...@@ -3531,13 +3531,14 @@ package body Sem_Prag is
end loop; end loop;
-- When the convention is Java or CIL, we also allow Import to be -- When the convention is Java or CIL, we also allow Import to be
-- given for packages, generic packages, exceptions, and record -- given for packages, generic packages, exceptions, record
-- components. -- components, and access to subprograms.
elsif (C = Convention_Java or else C = Convention_CIL) elsif (C = Convention_Java or else C = Convention_CIL)
and then and then
(Is_Package_Or_Generic_Package (Def_Id) (Is_Package_Or_Generic_Package (Def_Id)
or else Ekind (Def_Id) = E_Exception or else Ekind (Def_Id) = E_Exception
or else Ekind (Def_Id) = E_Access_Subprogram_Type
or else Nkind (Parent (Def_Id)) = N_Component_Declaration) or else Nkind (Parent (Def_Id)) = N_Component_Declaration)
then then
Set_Imported (Def_Id); Set_Imported (Def_Id);
...@@ -3931,16 +3932,17 @@ package body Sem_Prag is ...@@ -3931,16 +3932,17 @@ package body Sem_Prag is
-- For all cases except external names on CLI target, -- For all cases except external names on CLI target,
-- commas, spaces and slashes are dubious (in CLI, we use -- commas, spaces and slashes are dubious (in CLI, we use
-- spaces and commas in external names to specify assembly -- spaces and commas in external names to specify assembly
-- version and public key). -- version and public key, while slashes can be used in
-- names to mark nested classes).
or else ((not Ext_Name_Case or else VM_Target /= CLI_Target) or else ((not Ext_Name_Case or else VM_Target /= CLI_Target)
and then (Get_Character (C) = ' ' and then (Get_Character (C) = ' '
or else or else
Get_Character (C) = ',' Get_Character (C) = ','
or else or else
Get_Character (C) = '/'
or else
Get_Character (C) = '\')) Get_Character (C) = '\'))
or else (VM_Target /= CLI_Target
and then Get_Character (C) = '/')
then then
Error_Msg Error_Msg
("?interface name contains illegal character", ("?interface name contains illegal character",
......
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