+2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
+
+ * sem_ch6.adb: Remove obsolete comment.
+
+2014-10-31 Olivier Hainque <hainque@adacore.com>
+
+ * g-allein.ads: bind vec_sld for pixels to 8hi vsldoi instead
+ of 4si, as pixels are short.
+
+2014-10-31 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_res.adb (Resolve_Call): Do not reject a call to a protected
+ operation in the spec of a protected type, when the call appears
+ in a pre/postcondition for another protected operation.
+
+2014-10-31 Tristan Gingold <gingold@adacore.com>
+
+ * prj-conf.adb: Locate_Runtime: Always search the runtime in
+ project path.
+
+2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
+
+ * inline.adb (Check_Package_Body_For_Inlining): Adjust previous
+ change to use correct idiom for back-end inlining.
+
2014-10-31 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Freeze_Record_Type): Do not check component size
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2014, 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- --
C : c_int) return vector_pixel;
pragma Import
- (LL_Altivec, vec_sld_vx_vx_cint_r_vx, "__builtin_altivec_vsldoi_4si");
+ (LL_Altivec, vec_sld_vx_vx_cint_r_vx, "__builtin_altivec_vsldoi_8hi");
function vec_sld_vsc_vsc_cint_r_vsc
(A : vector_signed_char;
OK : Boolean;
begin
- if Front_End_Inlining
+ -- Legacy implementation (relying on frontend inlining)
+
+ if not Back_End_Inlining
and then Is_Compilation_Unit (P)
and then not Is_Generic_Instance (P)
then
E := First_Entity (P);
while Present (E) loop
- if Has_Pragma_Inline (E) then
+ if Has_Pragma_Inline_Always (E)
+ or else (Has_Pragma_Inline (E) and Front_End_Inlining)
+ then
if not Is_Loaded (Bname) then
Load_Needed_Body (N, OK);
with Makeutl; use Makeutl;
with MLib.Tgt;
with Opt; use Opt;
-with Osint; use Osint;
with Output; use Output;
with Prj.Env;
with Prj.Err;
(Language : Name_Id;
Env : Prj.Tree.Environment)
is
- function Is_Base_Name (Path : String) return Boolean;
- -- Returns True if Path has no directory separator
+ function Is_RTS_Directory (Path : String) return Boolean;
+ -- Returns True if Path is a directory for a runtime. This simply check
+ -- that Path has a "adalib" subdirectoy, which is a property for
+ -- runtimes on the project path.
- ------------------
- -- Is_Base_Name --
- ------------------
+ ----------------------
+ -- Is_RTS_Directory --
+ ----------------------
- function Is_Base_Name (Path : String) return Boolean is
+ function Is_RTS_Directory (Path : String) return Boolean is
begin
- for J in Path'Range loop
- if Is_Directory_Separator (Path (J)) then
- return False;
- end if;
- end loop;
-
- return True;
- end Is_Base_Name;
+ return Is_Directory (Path & Directory_Separator & "adalib");
+ end Is_RTS_Directory;
-- Local declarations
function Find_Rts_In_Path is new Prj.Env.Find_Name_In_Path
- (Check_Filename => Is_Directory);
+ (Check_Filename => Is_RTS_Directory);
RTS_Name : constant String := Runtime_Name_For (Language);
-- Start of processing for Locate_Runtime
begin
- if not Is_Base_Name (RTS_Name) then
- Full_Path :=
- Find_Rts_In_Path (Env.Project_Path, RTS_Name);
-
- if Full_Path = null then
- Raise_Invalid_Config ("cannot find RTS " & RTS_Name);
- end if;
+ Full_Path := Find_Rts_In_Path (Env.Project_Path, RTS_Name);
+ if Full_Path /= null then
Set_Runtime_For (Language, Normalize_Pathname (Full_Path.all));
Free (Full_Path);
end if;
Build_Body_To_Inline (N, Spec_Id);
end if;
- -- New implementation (relying on backend inlining). Enabled by
- -- debug flag gnatd.z for testing
+ -- New implementation (relying on backend inlining)
else
if Has_Pragma_Inline_Always (Spec_Id)
end if;
-- A protected function cannot be called within the definition of the
- -- enclosing protected type.
+ -- enclosing protected type, unless it is part of a pre/postcondition
+ -- on another protected operation.
if Is_Protected_Type (Scope (Nam))
and then In_Open_Scopes (Scope (Nam))
and then not Has_Completion (Scope (Nam))
+ and then not In_Spec_Expression
then
Error_Msg_NE
("& cannot be called before end of protected definition", N, Nam);