Use sub-modules to structure the modules in the Mercury compiler directory.

The main aim of this change is to make the overall, high-level structure
of the compiler clearer, and to encourage better encapsulation of the
major components.

compiler/libs.m:
compiler/backend_libs.m:
compiler/parse_tree.m:
compiler/hlds.m:
compiler/check_hlds.m:
compiler/transform_hlds.m:
compiler/bytecode_backend.m:
compiler/aditi_backend.m:
compiler/ml_backend.m:
compiler/ll_backend.m:
compiler/top_level.m:
	New files.  One module for each of the major components of the
	Mercury compiler.  These modules contain (as separate sub-modules)
	all the other modules in the Mercury compiler, except gcc.m and
	mlds_to_gcc.m.

Mmakefile:
compiler/Mmakefile:
	Handle the fact that the top-level module is now `top_level',
	not `mercury_compile' (since `mercury_compile' is a sub-module
	of `top_level').

compiler/Mmakefile:
	Update settings of *FLAGS-<modulename> to use the appropriate
	nested module names.

compiler/recompilation_check.m:
compiler/recompilation_version.m:
compiler/recompilation_usage.m:
compiler/recompilation.check.m:
compiler/recompilation.version.m:
compiler/recompilation.version.m:
	Convert the `recompilation_*' modules into sub-modules of the
	`recompilation' module.

compiler/*.m:
compiler/*.pp:
	Module-qualify the module names in `:- module', `:- import_module',
	and `:- use_module' declarations.

compiler/base_type_info.m:
compiler/base_type_layout.m:
	Deleted these unused empty modules.

compiler/prog_data.m:
compiler/globals.m:
	Move the `foreign_language' type from prog_data to globals.

compiler/mlds.m:
compiler/ml_util.m:
compiler/mlds_to_il.m:
	Import `globals', for `foreign_language'.

Mmake.common.in:
trace/Mmakefile:
runtime/Mmakefile:
	Rename the %.check.c targets as %.check_hdr.c,
	to avoid conflicts with compiler/recompilation.check.c.
This commit is contained in:
Fergus Henderson
2002-03-20 12:37:56 +00:00
parent 3ee59d5003
commit 7597790760
246 changed files with 2705 additions and 1576 deletions

View File

@@ -27,9 +27,9 @@
%-----------------------------------------------------------------------------%
:- module add_heap_ops.
:- module ml_backend__add_heap_ops.
:- interface.
:- import_module hlds_pred, hlds_module.
:- import_module hlds__hlds_pred, hlds__hlds_module.
:- pred add_heap_ops(proc_info::in, module_info::in, proc_info::out) is det.
@@ -37,10 +37,13 @@
:- implementation.
:- import_module prog_data, prog_util, (inst).
:- import_module hlds_goal, hlds_data.
:- import_module goal_util, quantification, modules, type_util.
:- import_module instmap, code_model, code_util.
:- import_module parse_tree__prog_data, parse_tree__prog_util.
:- import_module (parse_tree__inst).
:- import_module hlds__hlds_goal, hlds__hlds_data.
:- import_module hlds__goal_util, hlds__quantification, parse_tree__modules.
:- import_module check_hlds__type_util.
:- import_module hlds__instmap, backend_libs__code_model.
:- import_module ll_backend__code_util.
:- import_module bool, string.
:- import_module assoc_list, list, map, set, varset, std_util, require, term.