for review: ignore clauses for builtins

Simon Taylor stayl at cs.mu.OZ.AU
Fri Mar 12 10:27:32 AEDT 1999


Estimated hours taken: 0.1

compiler/make_hlds.m:
	Ignore (with a warning) clauses for builtins.
	This will make it easier to bootstrap a future change
	to add checking for the integer shift operations.


Index: make_hlds.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/make_hlds.m,v
retrieving revision 1.283
diff -u -u -r1.283 make_hlds.m
--- make_hlds.m	1999/02/19 19:47:33	1.283
+++ make_hlds.m	1999/03/11 23:25:12
@@ -2356,6 +2356,15 @@
 		io__write_string("  with `:- pragma c_code' declaration preceding.\n"),
 		{ Info = Info0 }
 	;
+		% Ignore clauses for builtins. This makes bootstrapping
+		% easier when redefining builtins to use normal Mercury code.
+		{ code_util__predinfo_is_builtin(PredInfo1) }
+	->
+		prog_out__write_context(Context),
+		report_warning("Warning: clause for builtin.\n"),
+		{ ModuleInfo = ModuleInfo0 },
+		{ Info = Info0 }
+	;
 		{
 		pred_info_clauses_info(PredInfo1, Clauses0),
 		pred_info_typevarset(PredInfo1, TVarSet0),



More information about the developers mailing list