[m-rev.] for review: remove depenency between parse_tree and backend_libs

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon Mar 21 13:39:34 AEDT 2005


On 21-Mar-2005, Julien Fischer <juliensf at cs.mu.OZ.AU> wrote:
> Simplify the structure of the compiler by removing the cycle
> parse_tree -> backend_libs -> check_hlds -> parse_tree
> from the package dependency graph.

Good idea.

> --- compiler/name_mangle.m	19 Jan 2005 03:10:49 -0000	1.10
> +++ compiler/name_mangle.m	21 Mar 2005 01:56:12 -0000
> @@ -11,9 +11,13 @@
>  % syntactically acceptable in all our target languages, meaning C, Java
>  % and MSIL.
> 
> +% NOTE: some parts of the name mangling routines are defined in
> +% prog_foreign.m because they are required by the frontend of the compiler,
> +% for generating makefile fragment etc.

fragmentS.

> --- compiler/parse_tree.m	21 Jan 2005 03:27:44 -0000	1.9
> +++ compiler/parse_tree.m	20 Mar 2005 23:05:39 -0000
> @@ -14,8 +14,8 @@
>  :- module parse_tree.
>  :- interface.
> 
> +:- import_module backend_libs. % XXX
>  :- import_module libs.
> -:- import_module backend_libs. % XXX for `foreign'
>  :- import_module mdbcomp.
>  :- import_module recompilation.
> 
> @@ -35,6 +35,7 @@
>  :- include_module prog_out.
> 
>  % Utility routines.
> +:- include_module prog_foreign.
>  :- include_module prog_mode.
>  :- include_module prog_util.
>  :- include_module prog_type.

You still import backend_libs, which should now be unnecessary. Did you
bootcheck the change without it? If it is still needed, make the comment
meaningful.

Apart from that, that looks fine, though I didn't check the code, since
I assume you just moved it around.

Zoltan.
--------------------------------------------------------------------------
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