[m-rev.] trivial diff: minor reorg of prog_data.m
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Jan 10 21:58:08 AEDT 2003
Estimated hours taken: 0.25
Branches: main
compiler/prog_data.m:
Order the declarations of the different pragma types into
logically related groups. Add some comments.
Workspace: /home/ceres/fjh/mercury
Index: compiler/prog_data.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/prog_data.m,v
retrieving revision 1.87
diff -u -d -r1.87 prog_data.m
--- compiler/prog_data.m 24 Oct 2002 04:36:53 -0000 1.87
+++ compiler/prog_data.m 10 Jan 2003 10:54:23 -0000
@@ -156,6 +156,9 @@
%
:- type pragma_type
+ %
+ % Foreign language interfacing pragmas
+ %
% a foreign language declaration, such as C
% header code.
---> foreign_decl(foreign_language, string)
@@ -196,7 +199,9 @@
% whether or not the foreign code may call Mercury,
% whether or not the foreign code is thread-safe
% foreign function name.
-
+ %
+ % Optimization pragmas
+ %
; type_spec(sym_name, sym_name, arity, maybe(pred_or_func),
maybe(list(mode)), type_subst, tvarset, set(item_id))
% PredName, SpecializedPredName, Arity,
@@ -211,12 +216,6 @@
; no_inline(sym_name, arity)
% Predname, Arity
- ; obsolete(sym_name, arity)
- % Predname, Arity
-
- ; source_file(string)
- % Source file name.
-
; unused_args(pred_or_func, sym_name, arity,
mode_num, list(int))
% PredName, Arity, Mode number, Optimized pred name,
@@ -224,9 +223,31 @@
% Used for inter-module unused argument
% removal, should only appear in .opt files.
+ %
+ % Diagnostics pragmas (pragmas related to compiler warnings/errors)
+ %
+
+ ; obsolete(sym_name, arity)
+ % Predname, Arity
+
+ ; source_file(string)
+ % Source file name.
+
+ %
+ % Evaluation method pragmas
+ %
+
+ ; tabled(eval_method, sym_name, int, maybe(pred_or_func),
+ maybe(list(mode)))
+ % Tabling type, Predname, Arity, PredOrFunc?, Mode?
+
; fact_table(sym_name, arity, string)
% Predname, Arity, Fact file name.
+
+ %
+ % Aditi pragmas
+ %
; aditi(sym_name, arity)
% Predname, Arity
@@ -266,9 +287,9 @@
; owner(sym_name, arity, string)
% PredName, Arity, String.
- ; tabled(eval_method, sym_name, int, maybe(pred_or_func),
- maybe(list(mode)))
- % Tabling type, Predname, Arity, PredOrFunc?, Mode?
+ %
+ % Purity pragmas
+ %
; promise_pure(sym_name, arity)
% Predname, Arity
@@ -276,6 +297,10 @@
; promise_semipure(sym_name, arity)
% Predname, Arity
+ %
+ % Termination analysis pragmas
+ %
+
; termination_info(pred_or_func, sym_name, list(mode),
maybe(pragma_arg_size_info),
maybe(pragma_termination_info))
@@ -290,15 +315,15 @@
% termination_info pragmas are used in opt and
% trans_opt files.
-
; terminates(sym_name, arity)
% Predname, Arity
; does_not_terminate(sym_name, arity)
% Predname, Arity
- ; check_termination(sym_name, arity).
+ ; check_termination(sym_name, arity)
% Predname, Arity
+ .
%
% Stuff for the foreign interfacing pragmas.
@@ -683,6 +708,14 @@
:- type pragma_foreign_proc_extra_attributes ==
list(pragma_foreign_proc_extra_attribute).
+ % Convert the foreign code attributes to their source code
+ % representations suitable for placing in the attributes list of
+ % the pragma (not all attributes have one).
+ % In particular, the foreign language attribute needs to be
+ % handled separately as it belongs at the start of the pragma.
+:- pred attributes_to_strings(pragma_foreign_proc_attributes::in,
+ list(string)::out) is det.
+
%-----------------------------------------------------------------------------%
%
% Goals
@@ -1080,14 +1113,6 @@
:- type need_qualifier
---> must_be_qualified
; may_be_unqualified.
-
- % Convert the foreign code attributes to their source code
- % representations suitable for placing in the attributes list of
- % the pragma (not all attributes have one).
- % In particular, the foreign language attribute needs to be
- % handled separately as it belongs at the start of the pragma.
-:- pred attributes_to_strings(pragma_foreign_proc_attributes::in,
- list(string)::out) is det.
%-----------------------------------------------------------------------------%
%-----------------------------------------------------------------------------%
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list