Commit 88f7d2d1 by Arnaud Charlet

[multiple changes]

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.

From-SVN: r216958
parent 1335a8ca
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> 2014-10-31 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Freeze_Record_Type): Do not check component size * freeze.adb (Freeze_Record_Type): Do not check component size
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- 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 -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -830,7 +830,7 @@ package GNAT.Altivec.Low_Level_Interface is ...@@ -830,7 +830,7 @@ package GNAT.Altivec.Low_Level_Interface is
C : c_int) return vector_pixel; C : c_int) return vector_pixel;
pragma Import 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 function vec_sld_vsc_vsc_cint_r_vsc
(A : vector_signed_char; (A : vector_signed_char;
......
...@@ -1981,7 +1981,9 @@ package body Inline is ...@@ -1981,7 +1981,9 @@ package body Inline is
OK : Boolean; OK : Boolean;
begin begin
if Front_End_Inlining -- Legacy implementation (relying on frontend inlining)
if not Back_End_Inlining
and then Is_Compilation_Unit (P) and then Is_Compilation_Unit (P)
and then not Is_Generic_Instance (P) and then not Is_Generic_Instance (P)
then then
...@@ -1989,7 +1991,9 @@ package body Inline is ...@@ -1989,7 +1991,9 @@ package body Inline is
E := First_Entity (P); E := First_Entity (P);
while Present (E) loop 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 if not Is_Loaded (Bname) then
Load_Needed_Body (N, OK); Load_Needed_Body (N, OK);
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
with Makeutl; use Makeutl; with Makeutl; use Makeutl;
with MLib.Tgt; with MLib.Tgt;
with Opt; use Opt; with Opt; use Opt;
with Osint; use Osint;
with Output; use Output; with Output; use Output;
with Prj.Env; with Prj.Env;
with Prj.Err; with Prj.Err;
...@@ -1553,28 +1552,24 @@ package body Prj.Conf is ...@@ -1553,28 +1552,24 @@ package body Prj.Conf is
(Language : Name_Id; (Language : Name_Id;
Env : Prj.Tree.Environment) Env : Prj.Tree.Environment)
is is
function Is_Base_Name (Path : String) return Boolean; function Is_RTS_Directory (Path : String) return Boolean;
-- Returns True if Path has no directory separator -- 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 begin
for J in Path'Range loop return Is_Directory (Path & Directory_Separator & "adalib");
if Is_Directory_Separator (Path (J)) then end Is_RTS_Directory;
return False;
end if;
end loop;
return True;
end Is_Base_Name;
-- Local declarations -- Local declarations
function Find_Rts_In_Path is new Prj.Env.Find_Name_In_Path 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); RTS_Name : constant String := Runtime_Name_For (Language);
...@@ -1583,14 +1578,9 @@ package body Prj.Conf is ...@@ -1583,14 +1578,9 @@ package body Prj.Conf is
-- Start of processing for Locate_Runtime -- Start of processing for Locate_Runtime
begin begin
if not Is_Base_Name (RTS_Name) then Full_Path := Find_Rts_In_Path (Env.Project_Path, RTS_Name);
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;
if Full_Path /= null then
Set_Runtime_For (Language, Normalize_Pathname (Full_Path.all)); Set_Runtime_For (Language, Normalize_Pathname (Full_Path.all));
Free (Full_Path); Free (Full_Path);
end if; end if;
......
...@@ -3595,8 +3595,7 @@ package body Sem_Ch6 is ...@@ -3595,8 +3595,7 @@ package body Sem_Ch6 is
Build_Body_To_Inline (N, Spec_Id); Build_Body_To_Inline (N, Spec_Id);
end if; end if;
-- New implementation (relying on backend inlining). Enabled by -- New implementation (relying on backend inlining)
-- debug flag gnatd.z for testing
else else
if Has_Pragma_Inline_Always (Spec_Id) if Has_Pragma_Inline_Always (Spec_Id)
......
...@@ -6022,11 +6022,13 @@ package body Sem_Res is ...@@ -6022,11 +6022,13 @@ package body Sem_Res is
end if; end if;
-- A protected function cannot be called within the definition of the -- 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)) if Is_Protected_Type (Scope (Nam))
and then In_Open_Scopes (Scope (Nam)) and then In_Open_Scopes (Scope (Nam))
and then not Has_Completion (Scope (Nam)) and then not Has_Completion (Scope (Nam))
and then not In_Spec_Expression
then then
Error_Msg_NE Error_Msg_NE
("& cannot be called before end of protected definition", N, Nam); ("& cannot be called before end of protected definition", N, Nam);
......
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