Bring these modules up to date with our current code style.

Estimated hours taken: 4
Branches: main

compiler/code_util.m:
compiler/fact_table.m:
compiler/make_tags.m:
compiler/type_ctor_info.m:
compiler/unify_proc.m:
	Bring these modules up to date with our current code style.

	Use predmode declarations and state variable syntax where appropriate,
	and reorder arguments where this is needed to use state variable
	syntax.

	Break up excessively large and/or excessively indented predicates.
	Factor out common code and fix indentation.

	Use error_util to print error messages where appropriate.

	In fact_util.m, change predicates that took I/O state arguments to
	print error messages to return a list of error reports instead,
	to be printed by an ancestor. This makes it clearer which parts of the
	module actually have file I/O as part of their main job.

compiler/special_pred.m:
	Shorten an excessively long predicate name, since without this some of
	the above modules cannot be indented properly.

compiler/make_hlds.m:
	Use the new shorter predicate name.

compiler/code_gen.m:
compiler/ml_code_util.m:
	Fix indentation.

compiler/hlds_out.m:
	Add a predicate for use by the new version of fact_table.m
This commit is contained in:
Zoltan Somogyi
2004-03-23 06:56:42 +00:00
parent b4197eadbd
commit 6ac84aac9f
10 changed files with 2139 additions and 2254 deletions

View File

@@ -1,5 +1,5 @@
%---------------------------------------------------------------------------%
% Copyright (C) 1994-2003 The University of Melbourne.
% Copyright (C) 1994-2004 The University of Melbourne.
% This file may only be copied under the terms of the GNU General
% Public License - see the file COPYING in the Mercury distribution.
%---------------------------------------------------------------------------%
@@ -504,7 +504,8 @@ generate_category_code(model_det, Goal, ResumePoint, TraceSlotInfo, Code,
TraceCallLabel, _, TraceCallCode)
;
MaybeCallExternalInfo = no,
error("generate_category_code: call events suppressed")
error("generate_category_code: " ++
"call events suppressed")
),
MaybeTraceCallLabel = yes(TraceCallLabel)
;