[multiple changes]
2009-11-30 Javier Miranda <miranda@adacore.com> * exp_ch6.adb, sem_scil.adb (Adjust_SCIL_Node): Add missing management of N_Unchecked_Type_Conversion nodes when searching for SCIL nodes. (Expand_Call): Adjust decoration of SCIL node associated with relocated function call. 2009-11-30 Emmanuel Briot <briot@adacore.com> * prj-env.adb (Add_To_Source_Path): Preserve casing of directories 2009-11-30 Vincent Celier <celier@adacore.com> * opt.ads (No_Split_Units): New flag initialized to False 2009-11-30 Jerome Lambourg <lambourg@adacore.com> * exp_ch7.adb (Needs_Finalization): Add comments. * exp_ch3.adb (Make_Predefined_Primitive_Specs): Improve handling of CIL Value types. From-SVN: r154809
This commit is contained in:
parent
637da456be
commit
90e9a6bef6
|
@ -1,3 +1,24 @@
|
|||
2009-11-30 Javier Miranda <miranda@adacore.com>
|
||||
|
||||
* exp_ch6.adb, sem_scil.adb (Adjust_SCIL_Node): Add missing management
|
||||
of N_Unchecked_Type_Conversion nodes when searching for SCIL nodes.
|
||||
(Expand_Call): Adjust decoration of SCIL node associated with relocated
|
||||
function call.
|
||||
|
||||
2009-11-30 Emmanuel Briot <briot@adacore.com>
|
||||
|
||||
* prj-env.adb (Add_To_Source_Path): Preserve casing of directories
|
||||
|
||||
2009-11-30 Vincent Celier <celier@adacore.com>
|
||||
|
||||
* opt.ads (No_Split_Units): New flag initialized to False
|
||||
|
||||
2009-11-30 Jerome Lambourg <lambourg@adacore.com>
|
||||
|
||||
* exp_ch7.adb (Needs_Finalization): Add comments.
|
||||
* exp_ch3.adb (Make_Predefined_Primitive_Specs): Improve handling of
|
||||
CIL Value types.
|
||||
|
||||
2009-11-30 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* osint.adb, a-rttiev.adb: Minor reformatting.
|
||||
|
|
|
@ -8104,6 +8104,11 @@ package body Exp_Ch3 is
|
|||
elsif Restriction_Active (No_Finalization) then
|
||||
null;
|
||||
|
||||
-- We skip these for CIL Value types (why???)
|
||||
|
||||
elsif Is_Value_Type (Tag_Typ) then
|
||||
null;
|
||||
|
||||
elsif Etype (Tag_Typ) = Tag_Typ
|
||||
or else Needs_Finalization (Tag_Typ)
|
||||
|
||||
|
@ -8121,9 +8126,7 @@ package body Exp_Ch3 is
|
|||
and then not Is_Limited_Interface (Tag_Typ)
|
||||
and then Is_Limited_Interface (Etype (Tag_Typ)))
|
||||
then
|
||||
if not Is_Limited_Type (Tag_Typ)
|
||||
and then not Is_Value_Type (Tag_Typ)
|
||||
then
|
||||
if not Is_Limited_Type (Tag_Typ) then
|
||||
Append_To (Res,
|
||||
Predef_Deep_Spec (Loc, Tag_Typ, TSS_Deep_Adjust));
|
||||
end if;
|
||||
|
|
|
@ -2779,6 +2779,19 @@ package body Exp_Ch6 is
|
|||
Unchecked_Convert_To (Parent_Typ,
|
||||
Relocate_Node (Actual)));
|
||||
|
||||
-- If the relocated node is a function call then it
|
||||
-- can be part of the expansion of the predefined
|
||||
-- equality operator of a tagged type and we may
|
||||
-- need to adjust its SCIL dispatching node.
|
||||
|
||||
if Generate_SCIL
|
||||
and then Nkind (Actual) /= N_Null
|
||||
and then Nkind (Expression (Actual))
|
||||
= N_Function_Call
|
||||
then
|
||||
Adjust_SCIL_Node (Actual, Expression (Actual));
|
||||
end if;
|
||||
|
||||
Analyze (Actual);
|
||||
Resolve (Actual, Parent_Typ);
|
||||
end if;
|
||||
|
|
|
@ -3287,18 +3287,29 @@ package body Exp_Ch7 is
|
|||
-- Start of processing for Needs_Finalization
|
||||
|
||||
begin
|
||||
-- Class-wide types must be treated as controlled because they may
|
||||
-- contain an extension that has controlled components.
|
||||
return
|
||||
|
||||
-- We can skip this if finalization is not available.
|
||||
-- or if it is a value type (because ???)
|
||||
-- Class-wide types must be treated as controlled and therefore
|
||||
-- requiring finalization (because they may be extended with an
|
||||
-- extension that has controlled components.
|
||||
|
||||
(Is_Class_Wide_Type (T)
|
||||
|
||||
-- However, avoid treating class-wide types as controlled if
|
||||
-- finalization is not available and in particular CIL value
|
||||
-- types never have finalization).
|
||||
|
||||
and then not In_Finalization_Root (T)
|
||||
and then not Restriction_Active (No_Finalization)
|
||||
and then not Is_Value_Type (Etype (T)))
|
||||
|
||||
-- Controlled types always need finalization
|
||||
|
||||
return (Is_Class_Wide_Type (T)
|
||||
and then not In_Finalization_Root (T)
|
||||
and then not Restriction_Active (No_Finalization)
|
||||
and then not Is_Value_Type (Etype (T)))
|
||||
or else Is_Controlled (T)
|
||||
or else Has_Some_Controlled_Component (T)
|
||||
|
||||
-- For concurrent types, test the corresponding record type
|
||||
|
||||
or else (Is_Concurrent_Type (T)
|
||||
and then Present (Corresponding_Record_Type (T))
|
||||
and then Needs_Finalization (Corresponding_Record_Type (T)));
|
||||
|
|
|
@ -861,6 +861,12 @@ package Opt is
|
|||
-- This flag is set True if a No_Run_Time pragma is encountered. See
|
||||
-- spec of Rtsfind for a full description of handling of this pragma.
|
||||
|
||||
No_Split_Units : Boolean := False;
|
||||
-- GPRBUILD
|
||||
-- Set to True with switch --no-split-units. When True, unit sources, spec,
|
||||
-- body and subunits, must all be in the same project.This is checked after
|
||||
-- each compilation.
|
||||
|
||||
No_Stdinc : Boolean := False;
|
||||
-- GNAT, GNATBIND, GNATMAKE, GNATFIND, GNATXREF
|
||||
-- Set to True if no default source search dirs added to search list
|
||||
|
|
|
@ -410,7 +410,7 @@ package body Prj.Env is
|
|||
end loop;
|
||||
|
||||
if Add_It then
|
||||
Source_Path_Table.Append (Source_Paths, Source_Dir.Value);
|
||||
Source_Path_Table.Append (Source_Paths, Source_Dir.Display_Value);
|
||||
end if;
|
||||
|
||||
-- Next source directory
|
||||
|
|
|
@ -74,7 +74,9 @@ package body Sem_SCIL is
|
|||
-- Type conversions may involve dispatching calls to functions whose
|
||||
-- associated SCIL dispatching node needs adjustment.
|
||||
|
||||
elsif Nkind (Old_Node) = N_Type_Conversion then
|
||||
elsif Nkind_In (Old_Node, N_Type_Conversion,
|
||||
N_Unchecked_Type_Conversion)
|
||||
then
|
||||
null;
|
||||
|
||||
-- Relocated subprogram call
|
||||
|
|
Loading…
Reference in New Issue