2014-02-06 Sergey Rybin <rybin@adacore.com frybin>

* gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
	gnatmetric/gnatpp.

2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_prag.adb (Analyze_Abstract_State): Update
	all calls to Create_Abstract_State to pass the proper state
	"declaration".
	(Create_Abstract_State): Add new formal parameter
	State_Decl along with comment on usage. Establish a link between
	the abstract state entity and the state declaration.

From-SVN: r207557
This commit is contained in:
Arnaud Charlet 2014-02-06 15:11:59 +01:00
parent 428684fd1c
commit c3b266d690
4 changed files with 88 additions and 12 deletions

View File

@ -1,3 +1,17 @@
2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
* gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
gnatmetric/gnatpp.
2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Abstract_State): Update
all calls to Create_Abstract_State to pass the proper state
"declaration".
(Create_Abstract_State): Add new formal parameter
State_Decl along with comment on usage. Establish a link between
the abstract state entity and the state declaration.
2014-02-06 Robert Dewar <dewar@adacore.com>
* sem_attr.adb (Analyze_Attribute, case Max): Check for improper

View File

@ -14638,6 +14638,17 @@ line breaks. You can use this switch more than once in the same call to
@command{gnatpp}. You also can combine this switch with an explicit list of
files.
@item ^-j^/PROCESSES=^@var{n}
@cindex @option{^-j^/PROCESSES^} (@command{gnatpp})
Use @var{n} processes to carry out the tree creations (internal representations
of the argument sources). On a multiprocessor machine this speeds up processing
of big sets of argument sources. If @var{n} is 0, then the maximum number of
parallel tree creations is the number of core processors on the platform.
@cindex @option{^-t^/TIME^} (@command{gnatpp})
@item ^-t^/TIME^
Print out execution time.
@item ^-v^/VERBOSE^
@cindex @option{^-v^/VERBOSE^} (@code{gnatpp})
Verbose mode;
@ -16630,6 +16641,10 @@ of the argument sources). On a multiprocessor machine this speeds up processing
of big sets of argument sources. If @var{n} is 0, then the maximum number of
parallel tree creations is the number of core processors on the platform.
@cindex @option{^-t^/TIME^} (@command{gnatmetric})
@item ^-t^/TIME^
Print out execution time.
@item ^-v^/VERBOSE^
@cindex @option{^-v^/VERBOSE^} (@command{gnatmetric})
Verbose mode;

View File

@ -9991,11 +9991,14 @@ package body Sem_Prag is
-- Opt is not a duplicate property and sets the flag Status.
procedure Create_Abstract_State
(State_Nam : Name_Id;
Is_Null : Boolean := False);
(State_Nam : Name_Id;
State_Decl : Node_Id;
Is_Null : Boolean := False);
-- Generate an abstract state entity with name State_Nam and
-- enter it into visibility. Flag Is_Null should be set when
-- the associated Abstract_State pragma defines a null state.
-- enter it into visibility. State_Decl is the "declaration"
-- of the state as it appears in pragma Abstract_State. Flag
-- Is_Null should be set when the associated Abstract_State
-- pragma defines a null state.
-----------------------------
-- Analyze_External_Option --
@ -10245,8 +10248,9 @@ package body Sem_Prag is
---------------------------
procedure Create_Abstract_State
(State_Nam : Name_Id;
Is_Null : Boolean := False)
(State_Nam : Name_Id;
State_Decl : Node_Id;
Is_Null : Boolean := False)
is
begin
-- The generated state abstraction reuses the same chars
@ -10266,10 +10270,19 @@ package body Sem_Prag is
Set_Refinement_Constituents (State_Id, New_Elmt_List);
Set_Part_Of_Constituents (State_Id, New_Elmt_List);
-- Every non-null state must be nameable and resolvable the
-- same way a constant is.
-- Establish a link between the state declaration and the
-- abstract state entity. Note that a null state remains as
-- N_Null and does not carry any linkages.
if not Is_Null then
if Present (State_Decl) then
Set_Entity (State_Decl, State_Id);
Set_Etype (State_Decl, Standard_Void_Type);
end if;
-- Every non-null state must be nameable and resolvable
-- the same way a constant is.
Push_Scope (Pack_Id);
Enter_Name (State_Id);
Pop_Scope;
@ -10295,8 +10308,9 @@ package body Sem_Prag is
elsif Nkind (State) = N_Null then
Create_Abstract_State
(State_Nam => New_Internal_Name ('S'),
Is_Null => True);
(State_Nam => New_Internal_Name ('S'),
State_Decl => Empty,
Is_Null => True);
Null_Seen := True;
-- Catch a case where a null state appears in a list of
@ -10311,7 +10325,9 @@ package body Sem_Prag is
-- Simple state declaration
elsif Nkind (State) = N_Identifier then
Create_Abstract_State (Chars (State));
Create_Abstract_State
(State_Nam => Chars (State),
State_Decl => State);
Non_Null_Seen := True;
-- State declaration with various options. This construct
@ -10319,7 +10335,9 @@ package body Sem_Prag is
elsif Nkind (State) = N_Extension_Aggregate then
if Nkind (Ancestor_Part (State)) = N_Identifier then
Create_Abstract_State (Chars (Ancestor_Part (State)));
Create_Abstract_State
(State_Nam => Chars (Ancestor_Part (State)),
State_Decl => Ancestor_Part (State));
Non_Null_Seen := True;
else
Error_Msg_N

View File

@ -5850,6 +5850,13 @@ package VMS_Data is
"-nolocal ";
-- NODOC (see /COMPLEXITY_METRICS /NO_LOCAL_DETAILS /NO_EXITS_AS_GOTOS)
S_Metric_Time : aliased constant S := "/TIME " &
"-t";
-- /NOTIME (D)
-- /TIME
--
-- Print out execution time
S_Metric_Verbose : aliased constant S := "/VERBOSE " &
"-v";
-- /NOVERBOSE (D)
@ -5889,6 +5896,7 @@ package VMS_Data is
S_Metric_Subdirs 'Access,
S_Metric_Syntax 'Access,
S_Metric_Suppress 'Access,
S_Metric_Time 'Access,
S_Metric_Verbose 'Access,
S_Metric_XMLout 'Access);
@ -6655,6 +6663,18 @@ package VMS_Data is
-- LOWER_CASE
-- UPPER_CASE
S_Pretty_Processes : aliased constant S := "/PROCESSES=#" &
"-j#";
-- /NOPROCESSES (D)
-- /PROCESSES=NNN
--
-- Use NNN processes to carry out the tree creations (internal
-- representations of the argument sources). On a multiprocessor machine
-- this speeds up processing of big sets of argument sources. If NNN is 0,
-- then the maximum number of parallel tree creations is the number of
-- core processors on the platform.
S_Pretty_Project : aliased constant S := "/PROJECT_FILE=<" &
"-P>";
-- /PROJECT_FILE=filename
@ -6707,6 +6727,13 @@ package VMS_Data is
-- of the directory specified in the project file. If the subdirectory
-- does not exist, it is created automatically.
S_Pretty_Time : aliased constant S := "/TIME " &
"-t";
-- /NOTIME (D)
-- /TIME
--
-- Print out execution time
S_Pretty_Types : aliased constant S := "/TYPE_CASING=" &
"AS_DECLARED " &
"-ntD " &
@ -6784,6 +6811,7 @@ package VMS_Data is
S_Pretty_Pragma 'Access,
S_Pretty_Replace 'Access,
S_Pretty_Replace_No_Backup'Access,
S_Pretty_Processes 'Access,
S_Pretty_Project 'Access,
S_Pretty_RTS 'Access,
S_Pretty_Search 'Access,
@ -6795,6 +6823,7 @@ package VMS_Data is
S_Pretty_Stnm_On_Nw_Line 'Access,
S_Pretty_Specific 'Access,
S_Pretty_Standard 'Access,
S_Pretty_Time 'Access,
S_Pretty_Types 'Access,
S_Pretty_Verbose 'Access,
S_Pretty_Warnings 'Access);