mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-18 15:26:31 +00:00
The prog_data.m module is imported by most modules of the compiler; by
359 modules out of 488, to be exact. Yet it has many parts that most of
those 359 modules don't need. This diff puts those parts into four new
modules. The number of imports of these modules:
348 modules import prog_data.m
84 modules import prog_data_foreign.m
62 modules import prog_data_pragma.m
12 modules import prog_data_event.m
5 modules import prog_data_used_modules.m
compiler/prog_data_event.m:
compiler/prog_data_foreign.m:
compiler/prog_data_pragma.m:
compiler/prog_data_used_modules.m:
New modules. They contain the parts of the parse tree that deal
respectively with the specification of events and event sets,
interfacing to foreign languages, pragmas, and the sets of used
(i.e. not unused) modules.
compiler/prog_data.m:
Delete the stuff that is now in the new modules. Put the remaining parts
of the module into a logical order.
compiler/parse_tree.m:
compiler/notes/compiler_design.html:
Include and document the new modules.
compiler/globals.m:
Move a type here from prog_data.m, since this is where it belongs.
compiler/add_foreign_proc.m:
compiler/add_mutable_aux_preds.m:
compiler/add_pragma.m:
compiler/add_solver.m:
compiler/add_trail_ops.m:
compiler/call_gen.m:
compiler/code_gen.m:
compiler/code_loc_dep.m:
compiler/comp_unit_interface.m:
compiler/compile_target_code.m:
compiler/complexity.m:
compiler/continuation_info.m:
compiler/coverage_profiling.m:
compiler/ctgc.datastruct.m:
compiler/ctgc.livedata.m:
compiler/ctgc.selector.m:
compiler/deep_profiling.m:
compiler/dep_par_conj.m:
compiler/deps_map.m:
compiler/det_analysis.m:
compiler/det_report.m:
compiler/elds_to_erlang.m:
compiler/equiv_type.m:
compiler/erl_call_gen.m:
compiler/exception_analysis.m:
compiler/export.m:
compiler/fact_table.m:
compiler/foreign.m:
compiler/frameopt.m:
compiler/get_dependencies.m:
compiler/goal_form.m:
compiler/goal_util.m:
compiler/granularity.m:
compiler/hlds_goal.m:
compiler/hlds_module.m:
compiler/hlds_out_goal.m:
compiler/hlds_out_module.m:
compiler/hlds_out_pred.m:
compiler/hlds_pred.m:
compiler/inlining.m:
compiler/intermod.m:
compiler/ite_gen.m:
compiler/item_util.m:
compiler/jumpopt.m:
compiler/layout.m:
compiler/layout_out.m:
compiler/live_vars.m:
compiler/livemap.m:
compiler/llds.m:
compiler/llds_out_file.m:
compiler/llds_out_global.m:
compiler/llds_out_instr.m:
compiler/make.dependencies.m:
compiler/make.module_dep_file.m:
compiler/make_hlds.m:
compiler/make_hlds_warn.m:
compiler/mark_tail_calls.m:
compiler/mercury_compile_llds_back_end.m:
compiler/mercury_compile_main.m:
compiler/ml_call_gen.m:
compiler/ml_code_gen.m:
compiler/ml_code_util.m:
compiler/ml_foreign_proc_gen.m:
compiler/ml_proc_gen.m:
compiler/ml_tailcall.m:
compiler/ml_unify_gen.m:
compiler/mlds.m:
compiler/mlds_to_c.m:
compiler/mlds_to_cs.m:
compiler/mlds_to_java.m:
compiler/modecheck_goal.m:
compiler/module_imports.m:
compiler/module_qual.m:
compiler/module_qual.qualify_items.m:
compiler/modules.m:
compiler/opt_debug.m:
compiler/par_conj_gen.m:
compiler/parse_pragma.m:
compiler/parse_tree_out_info.m:
compiler/parse_tree_out_pragma.m:
compiler/pd_cost.m:
compiler/polymorphism.m:
compiler/pragma_c_gen.m:
compiler/proc_gen.m:
compiler/prog_ctgc.m:
compiler/prog_event.m:
compiler/prog_foreign.m:
compiler/prog_item.m:
compiler/prog_out.m:
compiler/prog_util.m:
compiler/purity.m:
compiler/rbmm.points_to_analysis.m:
compiler/rbmm.points_to_graph.m:
compiler/simplify_goal_call.m:
compiler/simplify_goal_scope.m:
compiler/simplify_proc.m:
compiler/smm_common.m:
compiler/stack_layout.m:
compiler/structure_reuse.analysis.m:
compiler/structure_reuse.direct.choose_reuse.m:
compiler/structure_reuse.direct.detect_garbage.m:
compiler/structure_reuse.domain.m:
compiler/structure_reuse.indirect.m:
compiler/structure_sharing.analysis.m:
compiler/structure_sharing.domain.m:
compiler/table_gen.m:
compiler/tabling_analysis.m:
compiler/term_constr_build.m:
compiler/term_constr_initial.m:
compiler/term_constr_main.m:
compiler/term_constr_main_types.m:
compiler/term_constr_pass2.m:
compiler/term_constr_util.m:
compiler/term_errors.m:
compiler/term_pass1.m:
compiler/term_pass2.m:
compiler/term_traversal.m:
compiler/term_util.m:
compiler/termination.m:
compiler/trace_gen.m:
compiler/trailing_analysis.m:
compiler/type_constraints.m:
compiler/typecheck.m:
compiler/unique_modes.m:
compiler/unused_args.m:
compiler/unused_imports.m:
compiler/use_local_vars.m:
compiler/write_deps_file.m:
Conform to the changes above.
117 lines
3.9 KiB
Mathematica
117 lines
3.9 KiB
Mathematica
%-----------------------------------------------------------------------------%
|
|
% vim: ft=mercury ts=4 sw=4 et
|
|
%-----------------------------------------------------------------------------%
|
|
% Copyright (C) 2002-2011 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.
|
|
|
|
% The parse tree data type itself.
|
|
% The parse tree is split in two. The parts defined in prog_item are needed
|
|
% only by the frontend of the compiler, the parts in prog_data are needed
|
|
% throughout.
|
|
:- include_module prog_item.
|
|
:- include_module prog_data.
|
|
:- include_module prog_data_event.
|
|
:- include_module prog_data_foreign.
|
|
:- include_module prog_data_pragma.
|
|
:- include_module prog_data_used_modules.
|
|
:- include_module file_kind.
|
|
|
|
% The parser.
|
|
:- include_module parse_module.
|
|
:- include_module parse_dcg_goal.
|
|
:- include_module parse_error.
|
|
:- include_module parse_goal.
|
|
:- include_module parse_inst_mode_defn.
|
|
:- include_module parse_inst_mode_name.
|
|
:- include_module parse_item.
|
|
:- include_module parse_mutable.
|
|
:- include_module parse_pragma.
|
|
:- include_module parse_sym_name.
|
|
:- include_module parse_type_defn.
|
|
:- include_module parse_type_name.
|
|
:- include_module parse_class.
|
|
:- include_module parse_vars.
|
|
|
|
:- include_module find_module.
|
|
:- include_module parse_types.
|
|
:- include_module parse_util.
|
|
|
|
% Parser/pretty-printer/utility routines for the ctgc related types.
|
|
:- include_module prog_ctgc.
|
|
|
|
% Pretty-printers.
|
|
:- include_module mercury_to_mercury.
|
|
:- include_module parse_tree_out.
|
|
:- include_module parse_tree_out_clause.
|
|
:- include_module parse_tree_out_inst.
|
|
:- include_module parse_tree_out_pragma.
|
|
:- include_module parse_tree_out_pred_decl.
|
|
:- include_module parse_tree_out_term.
|
|
:- include_module parse_tree_out_info.
|
|
:- include_module prog_out.
|
|
:- include_module parse_tree_to_term.
|
|
|
|
% Utility data structures.
|
|
:- include_module set_of_var.
|
|
|
|
% Utility routines.
|
|
:- include_module builtin_lib_types.
|
|
:- include_module error_util.
|
|
:- include_module item_util.
|
|
:- include_module maybe_error.
|
|
:- include_module prog_detism.
|
|
:- include_module prog_event.
|
|
:- include_module prog_foreign.
|
|
:- include_module prog_item_stats.
|
|
:- include_module prog_mode.
|
|
:- include_module prog_mutable.
|
|
:- include_module prog_rename.
|
|
:- include_module prog_type.
|
|
:- include_module prog_type_subst.
|
|
:- include_module prog_util.
|
|
|
|
% Transformations that act on the parse tree,
|
|
% and stuff relating to the module system.
|
|
:- include_module check_raw_comp_unit.
|
|
:- include_module comp_unit_interface.
|
|
:- include_module deps_map.
|
|
:- include_module equiv_type.
|
|
:- include_module file_names.
|
|
:- include_module generate_dep_d_files.
|
|
:- include_module get_dependencies.
|
|
:- include_module module_cmds.
|
|
:- include_module module_deps_graph.
|
|
:- include_module module_imports.
|
|
:- include_module module_qual.
|
|
:- include_module modules.
|
|
:- include_module read_modules.
|
|
:- include_module split_parse_tree_src.
|
|
:- include_module source_file_map.
|
|
:- include_module write_deps_file.
|
|
:- include_module write_module_interface_files.
|
|
|
|
% Java and C# related utilities.
|
|
:- include_module java_names.
|
|
|
|
% (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.
|
|
% :- include_module trans_opt.
|
|
|
|
%-----------------------------------------------------------------------------%
|
|
:- end_module parse_tree.
|
|
%-----------------------------------------------------------------------------%
|