mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-13 21:04:00 +00:00
Estimated hours taken: 3 Branches: main Reduce inappropriate dependencies on ll_backend modules. Except for simplification of unnecessarily complicated logic in dependency_graph.m, this change only moves functionality around. compiler/llds_out.m: compiler/c_util.m: compiler/name_mangle.m: Move predicates that are used by multiple backends from ll_backend__llds_out to backend_libs__c_util and to a new module backend_libs__name_mangle. Make the relevant ones functions, and give some of them more meaningful names. compiler/trace.m: compiler/hlds_goal.m: Move a backend-independent predicate from ll_backend__trace to hlds__hlds_goal. compiler/llds.m: compiler/trace_params.m: Move the definition of the trace_port type from ll_backend__llds to libs__trace_params to avoid having libs__trace_params depend on ll_backend. compiler/exprn_aux.m: compiler/globals.m: Move the definition of the imported_is_constant from ll_backend__exprn_aux to libs__globals to avoid having libs__globals depend on ll_backend. compiler/*.m: Conform to the above changes. This removes many inappropriate dependencies on the LLDS backend.
77 lines
2.2 KiB
Mathematica
77 lines
2.2 KiB
Mathematica
%-----------------------------------------------------------------------------%
|
|
% Copyright (C) 2002-2003 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.
|
|
%-----------------------------------------------------------------------------%
|
|
%
|
|
% check_hlds: semantic analysis and error checking
|
|
% (the "front end" HLDS pass).
|
|
%
|
|
|
|
:- module check_hlds.
|
|
:- interface.
|
|
|
|
:- import_module hlds.
|
|
:- import_module parse_tree.
|
|
:- import_module libs.
|
|
:- import_module backend_libs. % for base_typeclass_info, etc.
|
|
|
|
% :- import_module check_hlds__type_analysis.
|
|
% :- import_module check_hlds__mode_analysis.
|
|
|
|
%-----------------------------------------------------------------------------%
|
|
|
|
% Type checking
|
|
%:- module type_analysis.
|
|
:- include_module check_typeclass.
|
|
:- include_module post_typecheck.
|
|
:- include_module purity.
|
|
:- include_module type_util.
|
|
:- include_module typecheck.
|
|
%:- end_module type_analysis.
|
|
|
|
% Polymorphism transformation.
|
|
:- include_module clause_to_proc.
|
|
:- include_module polymorphism.
|
|
|
|
% Mode analysis
|
|
%:- module mode_analysis.
|
|
:- include_module delay_info.
|
|
:- include_module inst_match.
|
|
:- include_module inst_util.
|
|
:- include_module mode_debug.
|
|
:- include_module mode_errors.
|
|
:- include_module mode_info.
|
|
:- include_module mode_util.
|
|
:- include_module modecheck_call.
|
|
:- include_module modecheck_unify.
|
|
:- include_module modes.
|
|
:- include_module unify_proc.
|
|
:- include_module unique_modes.
|
|
%:- end_module mode_analysis.
|
|
|
|
% Indexing and determinism analysis
|
|
:- include_module cse_detection.
|
|
:- include_module det_analysis.
|
|
:- include_module det_report.
|
|
:- include_module det_util.
|
|
:- include_module switch_detection.
|
|
|
|
% Stratification.
|
|
:- include_module stratify.
|
|
|
|
% Warnings about simple code
|
|
:- include_module common.
|
|
:- include_module simplify.
|
|
|
|
:- include_module goal_path.
|
|
|
|
%-----------------------------------------------------------------------------%
|
|
|
|
:- implementation.
|
|
:- import_module transform_hlds. % for pd_cost, etc.
|
|
|
|
:- end_module check_hlds.
|
|
|
|
%-----------------------------------------------------------------------------%
|