[m-rev.] for review: mmc --make, submodules and java
Julien Fischer
juliensf at csse.unimelb.edu.au
Tue May 5 16:16:36 AEST 2009
On Tue, 5 May 2009, Peter Wang wrote:
> Branches: main
>
> Make `mmc --make' support submodules when compiling to Java. Java files must
> be placed in subdirectories named after the package that each class belongs to.
>
> compiler/file_names.m:
> Rename `erlang_module_name' as it is now also used for Java.
>
> Make `module_name_to_file_name_general' return file names for `.java'
> and `.class' files that include package subdirectories.
>
> compiler/mlds_to_java.m:
> Export a function to return mangled module name suitable for Java.
> This is needed as file names need to be named after classes.
>
> compiler/make.program_target.m:
> Clean `.class' files on make clean.
>
> compiler/mlds_to_il.m:
> mdbcomp/prim_data.m:
> Move `sym_name_to_list' to mdbcomp.prim_data.
>
> compiler/compile_target_code.m:
> compiler/elds_to_erlang.m:
> Conform to changes.
...
> -:- import_module libs.globals.
> -
> :- import_module libs.compiler_util.
> +:- import_module libs.globals.
> :- import_module libs.handle_options.
> :- import_module libs.options.
> +:- import_module mdbcomp.prim_data.
> +:- import_module ml_backend. % XXX unwanted dependency
> +:- import_module ml_backend.mlds_to_java. % XXX unwanted dependency
> :- import_module parse_tree.prog_util.
> :- import_module parse_tree.source_file_map.
I strongly suggest not (re)introducing this dependency. The alternative,
duplicating a little code, seems preferable in this case. (You presumably
can't factor out the name mangling code into the libs package because
it depends on the mlds_sym_name type.)
The change is fine otherwise.
Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list