[m-rev.] diff: removing more bad dependencies

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Mar 16 19:58:31 AEDT 2003


On 16-Mar-2003, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> Reduce inappropriate dependencies on ll_backend modules.

Great, thanks!  That removes a lot of XXXs.

> Index: compiler/hlds_out.m
> @@ -1217,7 +1216,7 @@
>  		{ goal_info_get_goal_path(GoalInfo, Path) },
>  		( { Path \= [] } ->
>  			% XXX should avoid dependency on trace.m here
> -			{ trace__path_to_string(Path, PathStr) },
> +			{ goal_path_to_string(Path, PathStr) },

The XXX comment there can be deleted now.

> Index: compiler/ml_backend.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/compiler/ml_backend.m,v
> retrieving revision 1.3
> diff -u -b -r1.3 ml_backend.m
> --- compiler/ml_backend.m	15 Mar 2003 03:08:58 -0000	1.3
> +++ compiler/ml_backend.m	15 Mar 2003 18:33:46 -0000
> @@ -26,7 +26,6 @@
>  :- import_module check_hlds.	 % is this needed?
>  :- import_module hlds.
>  :- import_module libs.
> -:- import_module ll_backend.     % XXX needed for llds_out__name_mangle, etc.
>  :- import_module parse_tree.
>  :- import_module transform_hlds. % is this needed?
>  
> Index: compiler/ml_closure_gen.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/compiler/ml_closure_gen.m,v
> retrieving revision 1.15
> diff -u -b -r1.15 ml_closure_gen.m
> --- compiler/ml_closure_gen.m	15 Mar 2003 03:08:58 -0000	1.15
> +++ compiler/ml_closure_gen.m	15 Mar 2003 18:34:09 -0000
> @@ -86,6 +86,7 @@
>  
>  % XXX The following modules depend on the LLDS,
>  % so ideally they should not be used here.
> +:- import_module ll_backend.
>  :- import_module ll_backend__continuation_info. % needed for
>  					   % `generate_closure_layout'
>  :- import_module ll_backend__llds.         % needed for `layout_locn'

I think it is better if all of the dependencies between subsystems are listed
explicitly in the source for the top-level module for each subsystem.
For example, I think it should be clear from compiler/ml_backend.m
that this backend depends on the ll_backend.

So if the import of ll_backend is removed from compiler/ml_backend.m,
I think it would be best to at least keep an XXX comment in that file
explaining that ll_backend is needed by ml_closure_gen.m.

Also, could you please post the source for the newly added module
backend_libs__name_mangle?

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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