code_util__predinfo_is_builtin

Christopher Rodd SPEIRS crs at students.cs.mu.oz.au
Thu Feb 20 12:13:28 AEDT 1997


Fergus, I have now changed code_util__predinfo_is_builtin/2 into
code_util__predinfo_is_builtin/1.  Here are the changes for your reviewing.

The first argument of code_util__predinfo_is_builtin/2 was unused, so it has
been replaced by code_util__predinfo_is_builtin/1

compiler/code_util.m:
	changed code_util__predinfo_is_builtin(_ModuleInfo, PredInfo)
	to      code_util__predinfo_is_builtin(PredInfo).

compiler/unused_args.m:
compiler/typecheck.m:
compiler/make_hlds.m:
compiler/intermod.m:
	Fixed each usage of code_util__predinfo_is_builtin.



Index: unused_args.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/unused_args.m,v
retrieving revision 1.24
diff -u -r1.24 unused_args.m
--- 1.24	1997/01/27 07:45:40
+++ unused_args.m	1997/02/20 00:55:42
@@ -182,7 +182,7 @@
 		OptProcList0, OptProcList) :-
 	map__lookup(PredTable, PredId, PredInfo),
 		% The builtins use all their arguments.
-	( code_util__predinfo_is_builtin(ModuleInfo, PredInfo) ->
+	( code_util__predinfo_is_builtin(PredInfo) ->
 		VarUsage1 = VarUsage0,
 		setup_local_var_usage(ModuleInfo, PredTable, PredIds,
 			UnusedArgInfo, VarUsage1, VarUsage, PredProcList0,
@@ -1369,8 +1369,7 @@
 			\+ pred_info_is_imported(PredInfo),
 				% Don't warn about builtins
 				% that have unused arguments.
-			\+ code_util__predinfo_is_builtin(ModuleInfo,
-				PredInfo),
+			\+ code_util__predinfo_is_builtin(PredInfo),
 			\+ code_util__compiler_generated(PredInfo),
 				% Don't warn about lambda expressions
 				% not using arguments. (The warning
Index: typecheck.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/typecheck.m,v
retrieving revision 1.186
diff -u -r1.186 typecheck.m
--- 1.186	1997/02/17 01:27:06
+++ typecheck.m	1997/02/20 00:56:11
@@ -265,7 +265,7 @@
 	    % Compiler-generated predicates are created already type-correct,
 	    % there's no need to typecheck them.  Same for builtins.
 	    ( code_util__compiler_generated(PredInfo0)
-	    ; code_util__predinfo_is_builtin(ModuleInfo, PredInfo0)
+	    ; code_util__predinfo_is_builtin(PredInfo0)
 	    )
 	->
 	    pred_info_clauses_info(PredInfo0, ClausesInfo0),
Index: make_hlds.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/make_hlds.m,v
retrieving revision 1.220
diff -u -r1.220 make_hlds.m
--- 1.220	1997/02/18 05:17:46
+++ make_hlds.m	1997/02/20 00:57:25
@@ -1048,8 +1048,7 @@
 			{ predicate_table_insert(PredicateTable0, PredInfo0, 
 					PredId, PredicateTable1) },
 			( 
-				{ code_util__predinfo_is_builtin(Module1, 
-						PredInfo0) }
+				{ code_util__predinfo_is_builtin(PredInfo0) }
 			->
 				{ add_builtin(PredId, Types,
 					PredInfo0, PredInfo) },
Index: intermod.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/intermod.m,v
retrieving revision 1.15
diff -u -r1.15 intermod.m
--- 1.15	1997/02/03 04:43:07
+++ intermod.m	1997/02/20 00:58:52
@@ -174,8 +174,7 @@
 			% Don't export builtins since they will be
 			% recreated in the importing module anyway.
 			{ \+ code_util__compiler_generated(PredInfo0) },
-			{ \+ code_util__predinfo_is_builtin(ModuleInfo0,
-					PredInfo0) },
+			{ \+ code_util__predinfo_is_builtin(PredInfo0) },
 			(
 				{ inlining__is_simple_goal(Goal,
 						InlineThreshold) }
Index: code_util.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/code_util.m,v
retrieving revision 1.79
diff -u -r1.79 code_util.m
--- 1.79	1997/02/17 01:26:27
+++ code_util.m	1997/02/20 00:45:13
@@ -86,8 +86,8 @@
 :- pred code_util__compiler_generated(pred_info).
 :- mode code_util__compiler_generated(in) is semidet.
 
-:- pred code_util__predinfo_is_builtin(module_info, pred_info).
-:- mode code_util__predinfo_is_builtin(in, in) is semidet.
+:- pred code_util__predinfo_is_builtin(pred_info).
+:- mode code_util__predinfo_is_builtin(in) is semidet.
 
 :- pred code_util__builtin_state(module_info, pred_id, proc_id, builtin_state).
 :- mode code_util__builtin_state(in, in, in, out) is det.
@@ -314,7 +314,7 @@
 
 %-----------------------------------------------------------------------------%
 
-code_util__predinfo_is_builtin(_ModuleInfo, PredInfo) :-
+code_util__predinfo_is_builtin(PredInfo) :-
 	pred_info_module(PredInfo, ModuleName),
 	pred_info_name(PredInfo, PredName),
 %	code_util__translate_builtin(ModuleName, PredName, _, _, _, _).



More information about the developers mailing list