einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
2015-05-22 Eric Botcazou <ebotcazou@adacore.com> * einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section. * xeinfo.adb: Replace a-einfo.h with einfo.h throughout. Add pattern to translate "or else" into "||". From-SVN: r223562
This commit is contained in:
parent
57abdadd18
commit
5c0c1090a7
@ -1,3 +1,9 @@
|
|||||||
|
2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
* einfo.ads (Is_Atomic_Or_VFA): Move to XEINFO INLINES section.
|
||||||
|
* xeinfo.adb: Replace a-einfo.h with einfo.h throughout.
|
||||||
|
Add pattern to translate "or else" into "||".
|
||||||
|
|
||||||
2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
|
2015-05-22 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* einfo.ads (Has_Volatile_Full_Access): Rename into...
|
* einfo.ads (Has_Volatile_Full_Access): Rename into...
|
||||||
|
@ -8313,6 +8313,7 @@ package Einfo is
|
|||||||
pragma Inline (Is_Assignable);
|
pragma Inline (Is_Assignable);
|
||||||
pragma Inline (Is_Asynchronous);
|
pragma Inline (Is_Asynchronous);
|
||||||
pragma Inline (Is_Atomic);
|
pragma Inline (Is_Atomic);
|
||||||
|
pragma Inline (Is_Atomic_Or_VFA);
|
||||||
pragma Inline (Is_Bit_Packed_Array);
|
pragma Inline (Is_Bit_Packed_Array);
|
||||||
pragma Inline (Is_Called);
|
pragma Inline (Is_Called);
|
||||||
pragma Inline (Is_Character_Type);
|
pragma Inline (Is_Character_Type);
|
||||||
@ -9054,7 +9055,6 @@ package Einfo is
|
|||||||
-- be handled by xeinfo.
|
-- be handled by xeinfo.
|
||||||
|
|
||||||
pragma Inline (Base_Type);
|
pragma Inline (Base_Type);
|
||||||
pragma Inline (Is_Atomic_Or_VFA);
|
|
||||||
pragma Inline (Is_Base_Type);
|
pragma Inline (Is_Base_Type);
|
||||||
pragma Inline (Is_Package_Or_Generic_Package);
|
pragma Inline (Is_Package_Or_Generic_Package);
|
||||||
pragma Inline (Is_Packed_Array);
|
pragma Inline (Is_Packed_Array);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
-- --
|
-- --
|
||||||
-- B o d y --
|
-- B o d y --
|
||||||
-- --
|
-- --
|
||||||
-- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
|
-- Copyright (C) 1992-2015, 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- --
|
||||||
@ -23,10 +23,10 @@
|
|||||||
-- --
|
-- --
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
-- Program to construct C header file a-einfo.h (C version of einfo.ads spec)
|
-- Program to construct C header file einfo.h (C version of einfo.ads spec)
|
||||||
-- for use by Gigi. This header file contains all definitions and access
|
-- for use by Gigi. This header file contains all definitions and access
|
||||||
-- functions, but does not contain set procedures, since Gigi is not allowed
|
-- functions, but does not contain set procedures, since Gigi is not allowed
|
||||||
-- to modify the GNAT tree)
|
-- to modify the GNAT tree.
|
||||||
|
|
||||||
-- Input files:
|
-- Input files:
|
||||||
|
|
||||||
@ -35,12 +35,12 @@
|
|||||||
|
|
||||||
-- Output files:
|
-- Output files:
|
||||||
|
|
||||||
-- a-einfo.h Corresponding c header file
|
-- einfo.h corresponding C header file
|
||||||
|
|
||||||
-- Note: It is assumed that the input files have been compiled without errors
|
-- Note: It is assumed that the input files have been compiled without errors
|
||||||
|
|
||||||
-- An optional argument allows the specification of an output file name to
|
-- An optional argument allows the specification of an output file name to
|
||||||
-- override the default a-einfo.h file name for the generated output file.
|
-- override the default einfo.h file name for the generated output file.
|
||||||
|
|
||||||
-- Most, but not all of the functions in Einfo can be inlined in the C header.
|
-- Most, but not all of the functions in Einfo can be inlined in the C header.
|
||||||
-- They are the functions identified by pragma Inline in the spec. Functions
|
-- They are the functions identified by pragma Inline in the spec. Functions
|
||||||
@ -129,6 +129,7 @@ procedure XEinfo is
|
|||||||
Get_B1 : constant Pattern := BreakX (' ') * A & " in " & Rest * B;
|
Get_B1 : constant Pattern := BreakX (' ') * A & " in " & Rest * B;
|
||||||
Get_B2 : constant Pattern := BreakX (' ') * A & " = " & Rest * B;
|
Get_B2 : constant Pattern := BreakX (' ') * A & " = " & Rest * B;
|
||||||
Get_B3 : constant Pattern := BreakX (' ') * A & " /= " & Rest * B;
|
Get_B3 : constant Pattern := BreakX (' ') * A & " /= " & Rest * B;
|
||||||
|
Get_B4 : constant Pattern := BreakX (' ') * A & " or else " & Rest * B;
|
||||||
To_Paren : constant Pattern := wsp * Filler & '(';
|
To_Paren : constant Pattern := wsp * Filler & '(';
|
||||||
Get_Fml : constant Pattern := Break (" :") * Formal & wsp & ':' & wsp
|
Get_Fml : constant Pattern := Break (" :") * Formal & wsp & ':' & wsp
|
||||||
& BreakX (" );") * Formaltyp;
|
& BreakX (" );") * Formaltyp;
|
||||||
@ -253,7 +254,7 @@ begin
|
|||||||
if Argument_Count > 0 then
|
if Argument_Count > 0 then
|
||||||
Create (Ofile, Out_File, Argument (1));
|
Create (Ofile, Out_File, Argument (1));
|
||||||
else
|
else
|
||||||
Create (Ofile, Out_File, "a-einfo.h");
|
Create (Ofile, Out_File, "einfo.h");
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
Open (InB, In_File, "einfo.adb");
|
Open (InB, In_File, "einfo.adb");
|
||||||
@ -489,6 +490,8 @@ begin
|
|||||||
Replace (M, A & " == " & B);
|
Replace (M, A & " == " & B);
|
||||||
Match (Expr, Get_B3, M);
|
Match (Expr, Get_B3, M);
|
||||||
Replace (M, A & " != " & B);
|
Replace (M, A & " != " & B);
|
||||||
|
Match (Expr, Get_B4, M);
|
||||||
|
Replace (M, A & " || " & B);
|
||||||
Put_Line (Ofile, "");
|
Put_Line (Ofile, "");
|
||||||
Sethead (Fline, "");
|
Sethead (Fline, "");
|
||||||
Put_Line (Ofile, C & " { return " & Expr & "; }");
|
Put_Line (Ofile, C & " { return " & Expr & "; }");
|
||||||
|
Loading…
Reference in New Issue
Block a user