[m-rev.] (no subject)

Julien Fischer jfischer at opturion.com
Tue Mar 17 10:37:21 AEDT 2020



On Tue, 17 Mar 2020, Zoltan Somogyi wrote:

> For review by anyone.

> Make M.{c,java,etc} depend on M.int.
> 
> To enable argument packing, we need to ensure that all modules that use
> a type (say T) agree on its representation. The design I am working to
> implement designates the .int file of the module that defines the type
> (call it M) as the single source of truth for this. Every module that
> imports the definition of the type, even through intermodule optimization,
> gets that definition from M.int. The only module that depends on the type
> that does not get its definition from M.int is M itself.
> 
> Before I can add code that makes the compiler get the representation of
> T from M.int even when generating for M itself, I have to make sure that
> at the time of that compiler invocation, M.int will (a) exist, and (b)
> be up-to-date. That is why this change makes M.int a prerequisite
> for generating target language code for M both when using mmc --make
> and when using mmake.
> 
> compiler/make.dependencies.m:
>     Add M.int to the list of dependencies for M's code generation.
> 
> compiler/write_deps_file.m:
>     Add M.int as an extra source for the mmake rule containing
>     code generation dependencies.
>
>     Add an XXX.
> 
> diff --git a/compiler/write_deps_file.m b/compiler/write_deps_file.m
> index 53dce7275..64b8e7630 100644
> --- a/compiler/write_deps_file.m
> +++ b/compiler/write_deps_file.m
> @@ -306,6 +306,9 @@ generate_d_file(Globals, ModuleAndImports, AllDeps, MaybeTransOptDeps,
>          ModuleName, Int0FileName, !IO),
>
>      some [TargetGroup, TargetGroups, !SourceGroups] (
> +        % XXX Why is there no mention of a date file for C# here?
> +        % Don't we need to read the same set of files before
> +        % we generate C# code? And likewise for Erlang?

The non-C backends only use mmc --make; I think there is some residual "support"
for the Java backend in this file because work on the Java backend commenced
before that on mmc --make.  The C# and Erlang backends were not added until after
mmc --make was available.

The diff looks fine.

Julien.


More information about the reviews mailing list