trivial diff: pragma(c_code, ...) -> pragma c_code(...)
Fergus Henderson
fjh at cs.mu.OZ.AU
Sun Jan 25 17:03:44 AEDT 1998
Estimated hours taken: 0.5
Miscellaneous minor clean-ups.
compiler/bytecode.m:
Use the new syntax `pragma c_code(..., will_not_call_mercury, ...)'
rather than the obsolete syntax `pragma(c_code, ...)'.
compiler/llds.m:
compiler/hlds_out.m:
compiler/hlds_goal.m:
compiler/hlds_pred.m:
compiler/llds_out.m:
compiler/mercury_compile.m:
compiler/module_qual.m:
compiler/unused_args.m:
Trivial changes to the comments (either in the source code or
in the output C code or HLDS dump), e.g. replace the obsolete
syntax `pragma(c_code, ...)' with `pragma c_code(...)'.
cvs diff compiler/bytecode.m compiler/hlds_goal.m compiler/hlds_out.m compiler/hlds_pred.m compiler/llds.m compiler/llds_out.m compiler/mercury_compile.m compiler/module_qual.m compiler/unused_args.m
Index: compiler/bytecode.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/bytecode.m,v
retrieving revision 1.33
diff -u -r1.33 bytecode.m
--- bytecode.m 1998/01/24 05:44:12 1.33
+++ bytecode.m 1998/01/25 04:56:03
@@ -1220,9 +1220,10 @@
:- pred float_to_float64_bytes(float::in,
int::out, int::out, int::out, int::out,
int::out, int::out, int::out, int::out) is det.
-:- pragma(c_code,
+:- pragma c_code(
float_to_float64_bytes(FloatVal::in, B0::out, B1::out, B2::out, B3::out,
B4::out, B5::out, B6::out, B7::out),
+ will_not_call_mercury,
"
{
Index: compiler/hlds_goal.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/hlds_goal.m,v
retrieving revision 1.46
diff -u -r1.46 hlds_goal.m
--- hlds_goal.m 1998/01/13 10:12:12 1.46
+++ hlds_goal.m 1998/01/24 06:06:20
@@ -152,7 +152,7 @@
% information.
)
- % C code from a pragma(c_code, ...) decl.
+ % C code from a pragma c_code(...) decl.
; pragma_c_code(
may_call_mercury,
Index: compiler/hlds_out.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/hlds_out.m,v
retrieving revision 1.182
diff -u -r1.182 hlds_out.m
--- hlds_out.m 1998/01/24 05:44:15 1.182
+++ hlds_out.m 1998/01/25 05:09:21
@@ -1123,7 +1123,7 @@
hlds_out__write_goal_2(pragma_c_code(_, _, _, ArgVars, ArgNames, _,
PragmaCode), _, _, _, Indent, Follow, _) -->
hlds_out__write_indent(Indent),
- io__write_string("$pragma(c_code, ["),
+ io__write_string("$pragma_c_code(["),
hlds_out__write_varnum_list(ArgVars),
io__write_string("], ["),
{ get_pragma_c_var_names(ArgNames, Names) },
Index: compiler/hlds_pred.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/hlds_pred.m,v
retrieving revision 1.43
diff -u -r1.43 hlds_pred.m
--- hlds_pred.m 1998/01/23 12:56:34 1.43
+++ hlds_pred.m 1998/01/24 06:04:33
@@ -107,13 +107,13 @@
% The type of goals that have been given for a pred.
-:- type goal_type ---> pragmas % pragma(c_code, ...)
+:- type goal_type ---> pragmas % pragma c_code(...)
; clauses
; none.
% Note: `liveness' and `liveness_info' record liveness in the sense
% used by code generation. This is *not* the same thing as the notion
- % of liveness used by mode analysis! See compiler/notes/GLOSSARY.
+ % of liveness used by mode analysis! See compiler/notes/glossary.html.
:- type liveness_info == set(var). % The live variables
@@ -229,8 +229,8 @@
% will terminate for all (finite?) input
; does_not_terminate
% States that this predicate does not
- % terminate. This is useful for pragma c
- % code, which the compiler assumes to be
+ % terminate. This is useful for pragma
+ % c_code, which the compiler assumes to be
% terminating.
; check_termination
% The user requires the compiler to guarantee
@@ -370,15 +370,15 @@
:- pred pred_info_set_goal_type(pred_info, goal_type, pred_info).
:- mode pred_info_set_goal_type(in, in, out) is det.
- % Succeeds if there was a `:- pragma(inline, ...)' declaration
+ % Succeeds if there was a `:- pragma inline(...)' declaration
% for this predicate. Note that the compiler may decide
- % to inline a predicate even if there was no pragma(inline, ...)
+ % to inline a predicate even if there was no pragma inline(...)
% declaration for that predicate.
:- pred pred_info_requested_inlining(pred_info).
:- mode pred_info_requested_inlining(in) is semidet.
- % Succeeds if there was a `:- pragma(no_inline, ...)' declaration
+ % Succeeds if there was a `:- pragma no_inline(...)' declaration
% for this predicate.
:- pred pred_info_requested_no_inlining(pred_info).
@@ -495,7 +495,7 @@
% or in the variable type assignments
goal_type, % whether the goals seen so far for
% this pred are clauses,
- % pragma(c_code, ...) decs, or none
+ % pragma c_code(...) decs, or none
pred_markers, % various boolean flags
pred_or_func, % whether this "predicate" was really
% a predicate or a function
Index: compiler/llds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/llds.m,v
retrieving revision 1.219
diff -u -r1.219 llds.m
--- llds.m 1998/01/13 10:12:36 1.219
+++ llds.m 1998/01/25 05:07:57
@@ -59,7 +59,7 @@
% Used by dead_proc_elim.
)
- % some C code from a pragma(c_code) declaration
+ % some C code from a `pragma c_code' declaration
; c_code(
string, % C code
term__context % source code location
Index: compiler/llds_out.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/llds_out.m,v
retrieving revision 1.70
diff -u -r1.70 llds_out.m
--- llds_out.m 1998/01/24 05:44:17 1.70
+++ llds_out.m 1998/01/25 04:56:23
@@ -467,7 +467,7 @@
( { PrintComments = yes } ->
io__write_string("/* "),
prog_out__write_context(Context),
- io__write_string(" pragma(c_code) */\n")
+ io__write_string(" pragma c_code */\n")
;
[]
),
Index: compiler/mercury_compile.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.72
diff -u -r1.72 mercury_compile.m
--- mercury_compile.m 1998/01/23 12:36:11 1.72
+++ mercury_compile.m 1998/01/24 17:26:58
@@ -314,7 +314,8 @@
globals__io_lookup_bool_option(make_optimization_interface,
MakeOptInt),
( { Intermod = yes, MakeOptInt = no } ->
- % Eliminate unnecessary clauses from `.opt' files.
+ % Eliminate unnecessary clauses from `.opt' files,
+ % to speed up compilation.
{ dead_pred_elim(HLDS0, HLDS1) }
;
{ HLDS1 = HLDS0 }
Index: compiler/module_qual.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/module_qual.m,v
retrieving revision 1.29
diff -u -r1.29 module_qual.m
--- module_qual.m 1998/01/13 10:13:03 1.29
+++ module_qual.m 1998/01/25 04:56:31
@@ -627,7 +627,7 @@
Info = Info2
}.
- % Qualify the modes in a pragma(c_code, ...) decl.
+ % Qualify the modes in a pragma c_code(...) decl.
:- pred qualify_pragma((pragma_type)::in, (pragma_type)::out,
mq_info::in, mq_info::out, io__state::di, io__state::uo) is det.
Index: compiler/unused_args.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/unused_args.m,v
retrieving revision 1.41
diff -u -r1.41 unused_args.m
--- unused_args.m 1998/01/13 10:13:57 1.41
+++ unused_args.m 1998/01/25 05:17:09
@@ -443,7 +443,7 @@
traverse_goal(_, class_method_call(PredVar,_,Args,_,_,_), UseInf0, UseInf) :-
set_list_vars_used(UseInf0, [PredVar|Args], UseInf).
-% handle pragma(c_code, ...) - pragma_c_code uses all its args
+% handle pragma c_code(...) - pragma_c_code uses all its args
traverse_goal(_, pragma_c_code(_, _, _, Args, _, _, _), UseInf0, UseInf) :-
set_list_vars_used(UseInf0, Args, UseInf).
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list