[m-rev.] diff/for review: break up make_hlds.m
Julien Fischer
juliensf at cs.mu.OZ.AU
Mon Jul 25 23:30:57 AEST 2005
On Mon, 25 Jul 2005, Zoltan Somogyi wrote:
> Divide make_hlds.m into submodules of manageable size.
>
Great job!
> compiler/make_hlds.m:
> Distribute all the code that was previous here to new submodules.
> Include those submodules. Keep the existing interface of this module
> by defining predicates that do nothing except call the actual
> implementation in one of those submodules. The only changes visible
> from outside are the renaming of a predicate and the creation of a
> second name, make_hlds_qual_info, for qual_info. Both changes are
> designed to avoid ambiguity in the presence of intermodule
> optimization.
>
> compiler/add_aditi.m:
> Submodule for dealing with aditi-specific issues.
>
> compiler/add_class.m:
> Submodule for handling typeclasses.
>
> compiler/add_clause.m:
> Submodule for handling the general processing of clauses.
>
> compiler/add_pred.m:
> Submodule for handling new predicates.
>
> compiler/add_special_pred.m:
> Submodule for handling special (unify/compare/index/init) predicates.
>
> compiler/add_type.m:
> Submodule for handling new types.
>
> compiler/add_mode.m:
> Submodule for handling new insts and modes.
>
> compiler/add_solver.m:
> Submodule for handling new solver types.
>
> compiler/add_pragma.m:
> Submodule for handling new solver types.
>
There's a cut-and-paste error here.
> compiler/state_var.m:
> Submodule for handling the state variable transformation.
>
> compiler/superhomogeneous.m:
> Submodule for converting clauses to superhomogeneous form.
>
> compiler/field_access.m:
> Submodule for field access syntax.
>
> compiler/make_hlds_passes.m:
> Submodule containing the code performs passes on the item list,
> adding things to the HLDS, calling the other submodules as necessary.
>
s/code performs/code that performs/
> compiler/make_hlds_warn.m:
> Submodule that looks for constructs that merit warnings.
>
> compiler/make_hlds_error.m:
> Submodule containing error messages used by more than one submodule.
>
> compiler/hlds_pred.m:
> Since this module defines the clauses_info and proc_id types, move
> the predicates that initialize values of that type here as well from
> make_hlds.m (deleting an unnecessary parameter from one).
>
> compiler/hlds_pred.m:
> compiler/prog_data.m:
> Move the type tvar_name_map from from hlds_pred.m to prog_data.m,
> since that is where similar maps are.
>
> compiler/check_typeclass.m:
> compiler/mercury_compile.m:
> Conform to the change to make_hlds_qual_info.
>
> compiler/hlds_out.m:
> compiler/prog_out.m:
> Replace two identical predicates for printing out lists of strings
> in hlds_out.m and make_hlds.m with just one in prog_out.m, since that
> is where it belongs in the compiler.
>
> compiler/prog_util.m:
> Move some utility predicates for substitutions and term recognition
> here from make_hlds.m, since they are needed by more than one
> submodule.
>
> Make this module conform to our coding guidelines, and convert it to
> four-space indentation to eliminate bad line breaks.
>
> compiler/clause_to_proc.m:
> compiler/hlds_code_util.m:
> compiler/make_tags.m:
> compiler/prog_mode.m:
> compiler/quantification.m:
> compiler/type_util.m:
> Trivial formatting changes.
>
> compiler/notes/compiler_design.html:
> Describe the new modules.
>
I've had a quick look through the code and nothing jumped
out as being obviously wrong, so you may as well commit it.
Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list