+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
@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;
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;
-- 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 --
---------------------------
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
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;
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
-- 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
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
"-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)
S_Metric_Subdirs 'Access,
S_Metric_Syntax 'Access,
S_Metric_Suppress 'Access,
+ S_Metric_Time 'Access,
S_Metric_Verbose 'Access,
S_Metric_XMLout 'Access);
-- 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
-- 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 " &
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,
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);