[m-rev.] diff: compiler_generated -> is_unify_or_compare_pred
Zoltan Somogyi
zs at cs.mu.OZ.AU
Mon Mar 17 17:42:41 AEDT 2003
compiler/*.m:
Change "compiler_generated" in predicate names and field names
to "is_unify_or_compare_pred", because that is the actual meaning
of those predicates and fields. Delete the XXXs warning about
the old misleading name.
Zoltan.
cvs diff: Diffing .
cvs diff: Diffing analysis
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/code_gen.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/code_gen.m,v
retrieving revision 1.109
diff -u -b -r1.109 code_gen.m
--- compiler/code_gen.m 14 Mar 2003 08:10:04 -0000 1.109
+++ compiler/code_gen.m 17 Mar 2003 03:58:02 -0000
@@ -414,7 +414,7 @@
GenBytecode = yes,
% We don't generate bytecode for __Unify__, __Compare__ etc
% Since we will assume this code is already correct
- \+ compiler_generated(PredInfo),
+ \+ is_unify_or_compare_pred(PredInfo),
% Don't generate bytecode for procs with foreign code
goal_has_foreign(Goal) = no
->
Index: compiler/dead_proc_elim.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/dead_proc_elim.m,v
retrieving revision 1.78
diff -u -b -r1.78 dead_proc_elim.m
--- compiler/dead_proc_elim.m 15 Mar 2003 03:08:44 -0000 1.78
+++ compiler/dead_proc_elim.m 17 Mar 2003 03:58:09 -0000
@@ -781,7 +781,7 @@
% Don't eliminate special preds since they won't
% be actually called from the HLDS until after
% polymorphism.
- compiler_generated(PredInfo)
+ is_unify_or_compare_pred(PredInfo)
;
% Don't eliminate preds from builtin modules,
% since later passes of the compiler may introduce
Index: compiler/det_report.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/det_report.m,v
retrieving revision 1.78
diff -u -b -r1.78 det_report.m
--- compiler/det_report.m 15 Mar 2003 03:08:44 -0000 1.78
+++ compiler/det_report.m 17 Mar 2003 03:58:12 -0000
@@ -213,7 +213,7 @@
% happen for the Unify pred for the unit type,
% if such types are not boxed (as they are not
% boxed for the IL backend).
- { \+ compiler_generated(PredInfo0) },
+ { \+ is_unify_or_compare_pred(PredInfo0) },
% Don't warn about predicates which are
% inferred erroneous when the appropiate
Index: compiler/hlds_out.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/hlds_out.m,v
retrieving revision 1.301
diff -u -b -r1.301 hlds_out.m
--- compiler/hlds_out.m 16 Mar 2003 09:28:37 -0000 1.301
+++ compiler/hlds_out.m 17 Mar 2003 03:58:15 -0000
@@ -813,7 +813,7 @@
% need that information to understand how the program
% has been transformed.
{ \+ string__contains_char(Verbose, 'U') },
- { compiler_generated(PredInfo) }
+ { is_unify_or_compare_pred(PredInfo) }
->
[]
;
Index: compiler/hlds_pred.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/hlds_pred.m,v
retrieving revision 1.120
diff -u -b -r1.120 hlds_pred.m
--- compiler/hlds_pred.m 15 Mar 2003 03:08:52 -0000 1.120
+++ compiler/hlds_pred.m 17 Mar 2003 03:57:43 -0000
@@ -2769,20 +2769,14 @@
% Predicates to deal with builtins.
:- interface.
- % compiler_generated(PredInfo) succeeds iff
+ % is_unify_or_compare_pred(PredInfo) succeeds iff
% the PredInfo is for a compiler generated instance of a
% type-specific special_pred (i.e. one of the __Unify__,
% __Index__, or __Compare__ predicates generated as a
% type-specific instance of unify/2, index/2, or compare/3).
- %
- % XXX The name of this predicate is misleading, because there
- % are other kinds of compiler-generated predicates, e.g. those
- % for lambda expressions, those generated by higher-order
- % specialization, ordinary type specialization, deforestation,
- % etc., for which this predicate does not succeed.
-:- pred compiler_generated(pred_info).
-:- mode compiler_generated(in) is semidet.
+:- pred is_unify_or_compare_pred(pred_info).
+:- mode is_unify_or_compare_pred(in) is semidet.
% Is the argument the pred_info for a builtin that can be
% generated inline?
@@ -2843,9 +2837,7 @@
:- pred prog_varset_init(prog_varset::out) is det.
prog_varset_init(VarSet) :- varset__init(VarSet).
- % XXX The name of this predicate is misleading -- see the comment
- % in the declaration.
-compiler_generated(PredInfo) :-
+is_unify_or_compare_pred(PredInfo) :-
pred_info_name(PredInfo, PredName),
pred_info_arity(PredInfo, PredArity),
special_pred_name_arity(_, _, PredName, PredArity).
Index: compiler/intermod.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/intermod.m,v
retrieving revision 1.135
diff -u -b -r1.135 intermod.m
--- compiler/intermod.m 15 Mar 2003 03:08:53 -0000 1.135
+++ compiler/intermod.m 17 Mar 2003 03:58:20 -0000
@@ -367,7 +367,7 @@
% Don't export builtins since they will be
% recreated in the importing module anyway.
- \+ compiler_generated(PredInfo),
+ \+ is_unify_or_compare_pred(PredInfo),
\+ pred_info_is_builtin(PredInfo),
% These will be recreated in the importing module.
@@ -609,7 +609,7 @@
% the `.opt' file, since they will be recreated every
% time anyway.
%
- { compiler_generated(PredInfo) }
+ { is_unify_or_compare_pred(PredInfo) }
->
{ DoWrite = yes }
;
Index: compiler/layout_out.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/layout_out.m,v
retrieving revision 1.20
diff -u -b -r1.20 layout_out.m
--- compiler/layout_out.m 16 Mar 2003 08:01:27 -0000 1.20
+++ compiler/layout_out.m 17 Mar 2003 06:22:24 -0000
@@ -380,10 +380,10 @@
{ BeingDefined = yes }
),
(
- { RttiProcLabel ^ is_special_pred_instance = yes },
+ { RttiProcLabel ^ is_unify_or_compare_pred = yes },
io__write_string("MR_Compiler_ProcStatic ")
;
- { RttiProcLabel ^ is_special_pred_instance = no },
+ { RttiProcLabel ^ is_unify_or_compare_pred = no },
io__write_string("MR_User_ProcStatic ")
),
output_layout_name(proc_static(RttiProcLabel)).
Index: compiler/modecheck_unify.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/modecheck_unify.m,v
retrieving revision 1.55
diff -u -b -r1.55 modecheck_unify.m
--- compiler/modecheck_unify.m 15 Mar 2003 03:09:02 -0000 1.55
+++ compiler/modecheck_unify.m 17 Mar 2003 03:58:23 -0000
@@ -988,7 +988,7 @@
PredInfo),
mode_info_get_instmap(ModeInfo3, InstMap0),
(
- ( compiler_generated(PredInfo)
+ ( is_unify_or_compare_pred(PredInfo)
; instmap__is_unreachable(InstMap0)
)
->
Index: compiler/post_typecheck.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/post_typecheck.m,v
retrieving revision 1.47
diff -u -b -r1.47 post_typecheck.m
--- compiler/post_typecheck.m 15 Mar 2003 03:09:06 -0000 1.47
+++ compiler/post_typecheck.m 17 Mar 2003 03:58:26 -0000
@@ -1242,7 +1242,7 @@
% a type ambiguity error, but compiler-generated
% predicates are not type-checked.)
%
- \+ compiler_generated(PredInfo0),
+ \+ is_unify_or_compare_pred(PredInfo0),
%
% We don't do this for the clause introduced by the
@@ -1333,7 +1333,7 @@
% We don't do this for compiler-generated predicates --
% they will never contain calls to field access functions.
%
- \+ compiler_generated(PredInfo0),
+ \+ is_unify_or_compare_pred(PredInfo0),
%
% If there is a constructor for which the argument types
Index: compiler/purity.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/purity.m,v
retrieving revision 1.55
diff -u -b -r1.55 purity.m
--- compiler/purity.m 15 Mar 2003 03:09:08 -0000 1.55
+++ compiler/purity.m 17 Mar 2003 03:58:33 -0000
@@ -880,7 +880,7 @@
;
% Don't require purity annotations on calls in
% compiler-generated code.
- { compiler_generated(PredInfo) }
+ { is_unify_or_compare_pred(PredInfo) }
->
[]
;
@@ -1078,7 +1078,7 @@
io__write_string(".\n"),
prog_out__write_context(Context),
{ pred_info_get_purity(PredInfo, DeclaredPurity) },
- ( { compiler_generated(PredInfo) } ->
+ ( { is_unify_or_compare_pred(PredInfo) } ->
io__write_string(" It must be pure.\n")
;
io__write_string(" It must be declared `"),
Index: compiler/rl_exprn.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/rl_exprn.m,v
retrieving revision 1.28
diff -u -b -r1.28 rl_exprn.m
--- compiler/rl_exprn.m 15 Mar 2003 03:09:09 -0000 1.28
+++ compiler/rl_exprn.m 17 Mar 2003 03:58:49 -0000
@@ -951,7 +951,7 @@
% in Aditi predicates so the types must be known.
\+ {
% `index/2' doesn't work in Aditi.
- compiler_generated(PredInfo),
+ is_unify_or_compare_pred(PredInfo),
\+ pred_info_name(PredInfo, "__Index__")
},
{ \+ pred_info_is_builtin(PredInfo) },
Index: compiler/rtti.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/rtti.m,v
retrieving revision 1.28
diff -u -b -r1.28 rtti.m
--- compiler/rtti.m 16 Mar 2003 08:01:30 -0000 1.28
+++ compiler/rtti.m 17 Mar 2003 04:00:05 -0000
@@ -437,7 +437,7 @@
% pred_info_is_imported/1,
% pred_info_is_pseudo_imported/1,
% procedure_is_exported/2, and
- % pred_info_is_compiler_generated/1
+ % is_unify_or_compare_pred/1
% respectively.
% We store booleans here, rather than storing the
% pred_info, to avoid retaining a reference to the
@@ -451,7 +451,7 @@
is_imported :: bool,
is_pseudo_imported :: bool,
is_exported :: bool,
- is_special_pred_instance :: bool
+ is_unify_or_compare_pred :: bool
).
%-----------------------------------------------------------------------------%
@@ -758,15 +758,15 @@
IsImported = (pred_info_is_imported(PredInfo) -> yes ; no),
IsPseudoImp = (pred_info_is_pseudo_imported(PredInfo) -> yes ; no),
IsExported = (procedure_is_exported(PredInfo, ProcId) -> yes ; no),
- IsSpecialPredInstance =
- (compiler_generated(PredInfo) -> yes ; no),
+ IsUnifyOrComparePred =
+ (is_unify_or_compare_pred(PredInfo) -> yes ; no),
ProcHeadVarsWithNames = list__map((func(Var) = Var - Name :-
Name = varset__lookup_name(ProcVarSet, Var)
), ProcHeadVars),
ProcLabel = rtti_proc_label(PredOrFunc, ThisModule, PredModule,
PredName, Arity, ArgTypes, PredId, ProcId,
ProcHeadVarsWithNames, ProcArgModes, ProcCodeModel,
- IsImported, IsPseudoImp, IsExported, IsSpecialPredInstance).
+ IsImported, IsPseudoImp, IsExported, IsUnifyOrComparePred).
rtti__proc_label_pred_proc_id(ProcLabel, PredId, ProcId) :-
ProcLabel = rtti_proc_label(_, _, _, _, _, _, PredId, ProcId,
Index: compiler/simplify.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/simplify.m,v
retrieving revision 1.115
diff -u -b -r1.115 simplify.m
--- compiler/simplify.m 15 Mar 2003 07:11:56 -0000 1.115
+++ compiler/simplify.m 17 Mar 2003 04:00:14 -0000
@@ -118,7 +118,7 @@
{
% Don't warn for compiler-generated procedures.
list__member(warn_simple_code, Simplifications0),
- compiler_generated(PredInfo0)
+ is_unify_or_compare_pred(PredInfo0)
->
list__delete_all(Simplifications0, warn_simple_code,
Simplifications)
Index: compiler/termination.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/termination.m,v
retrieving revision 1.26
diff -u -b -r1.26 termination.m
--- compiler/termination.m 15 Mar 2003 03:09:11 -0000 1.26
+++ compiler/termination.m 17 Mar 2003 04:00:18 -0000
@@ -720,7 +720,7 @@
;
ImportStatus = opt_exported
},
- { \+ compiler_generated(PredInfo) },
+ { \+ is_unify_or_compare_pred(PredInfo) },
% XXX These should be allowed, but the predicate
% declaration for the specialized predicate is not produced
Index: compiler/typecheck.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/typecheck.m,v
retrieving revision 1.333
diff -u -b -r1.333 typecheck.m
--- compiler/typecheck.m 15 Mar 2003 03:09:12 -0000 1.333
+++ compiler/typecheck.m 17 Mar 2003 04:00:50 -0000
@@ -333,9 +333,11 @@
% But, compiler-generated unify predicates are not guaranteed
% to be type-correct if they call a user-defined equality pred
% or if it is a special pred for an existentially typed data type.
- ( compiler_generated(!.PredInfo),
+ (
+ is_unify_or_compare_pred(!.PredInfo),
\+ special_pred_needs_typecheck(!.PredInfo, ModuleInfo0)
- ; pred_info_is_builtin(!.PredInfo)
+ ;
+ pred_info_is_builtin(!.PredInfo)
)
->
pred_info_clauses_info(!.PredInfo, ClausesInfo0),
@@ -4865,7 +4867,7 @@
typecheck_info_get_module_info(TypeCheckInfo, ModuleInfo),
module_info_pred_info(ModuleInfo, PredId, PredInfo),
\+ pred_info_get_goal_type(PredInfo, clauses_and_pragmas),
- \+ compiler_generated(PredInfo),
+ \+ is_unify_or_compare_pred(PredInfo),
\+ pred_info_import_status(PredInfo, opt_imported)
->
ConsTypeInfo = error(foreign_type_constructor(TypeCtor,
Index: compiler/unused_args.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/unused_args.m,v
retrieving revision 1.83
diff -u -b -r1.83 unused_args.m
--- compiler/unused_args.m 15 Mar 2003 03:09:14 -0000 1.83
+++ compiler/unused_args.m 17 Mar 2003 04:00:54 -0000
@@ -1561,7 +1561,7 @@
% Don't warn about builtins
% that have unused arguments.
\+ pred_info_is_builtin(PredInfo),
- \+ compiler_generated(PredInfo),
+ \+ is_unify_or_compare_pred(PredInfo),
% Don't warn about stubs for procedures
% with no clauses -- in that case,
% we *expect* that none of the arguments
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing java
cvs diff: Diffing java/library
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
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