mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-20 00:15:27 +00:00
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.
65 lines
2.2 KiB
Mathematica
65 lines
2.2 KiB
Mathematica
%-----------------------------------------------------------------------------%
|
|
% Copyright (C) 2002 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.
|
|
%-----------------------------------------------------------------------------%
|
|
%
|
|
% This package contains the parse tree data structure,
|
|
% and modules for parsing and for manipulating parse trees.
|
|
%
|
|
% It corresponds to the parts of "Phase 1: Parsing"
|
|
% in notes/compiler_design.html up to (but not including) make_hlds.m.
|
|
%
|
|
|
|
:- module parse_tree.
|
|
:- interface.
|
|
:- import_module libs.
|
|
:- import_module hlds. % XXX for hlds_data__cons_id
|
|
:- import_module backend_libs. % XXX for `foreign'
|
|
|
|
% The parse tree data type itself.
|
|
:- include_module prog_data, (inst).
|
|
% XXX inst uses hlds_data__cons_id
|
|
|
|
% The parser.
|
|
:- include_module prog_io.
|
|
:- include_module prog_io_goal, prog_io_dcg, prog_io_pragma.
|
|
:- include_module prog_io_typeclass, prog_io_util.
|
|
|
|
% Pretty-printers.
|
|
:- include_module prog_out, mercury_to_mercury.
|
|
|
|
% Utility routines.
|
|
:- include_module prog_util.
|
|
|
|
% Transformations that act on the parse tree,
|
|
% and stuff relating to the module system.
|
|
:- include_module equiv_type.
|
|
:- include_module modules, module_qual.
|
|
|
|
% (Note that intermod and trans_opt also contain routines that
|
|
% act on the parse tree, but those modules are considered part
|
|
% of the HLDS transformations package.)
|
|
% :- include_module intermod, trans_opt.
|
|
|
|
% :- implementation.
|
|
|
|
% XXX lots of stuff uses hlds_data__type_id and type_util.m.
|
|
% XXX modules.m uses llds_out for the init names.
|
|
|
|
%-----------------------------------------------------------------------------%
|
|
|
|
:- implementation.
|
|
|
|
:- import_module check_hlds. % XXX for type_util.m
|
|
:- import_module transform_hlds. % XXX for write_pragma_termination_info
|
|
% in termination.m, which is used by
|
|
% mercury_to_mercury.m
|
|
:- import_module ll_backend. % XXX for llds_out.m, which is used
|
|
% by modules__append_to_init_list,
|
|
% which creates the LLDS and RL
|
|
% initialization code.
|
|
:- end_module parse_tree.
|
|
|
|
%-----------------------------------------------------------------------------%
|