[m-rev.] for post-commit review: more newext categories

Julien Fischer jfischer at opturion.com
Tue Jun 6 19:26:13 AEST 2023


On Tue, 6 Jun 2023, Zoltan Somogyi wrote:

> Add more categories of newexts.
> 
> compiler/file_names.m:
>     Give the extensions
>
>     - .mih
>     - .d, .dv, .dep
>     - .int0, .int, .int2, .int3
>     - .date0, .date, .date3
>     - .opt, .trans_opt
>     - .optdate, .trans_opt_date
>
>     their own categories in the newext type. Specialize the code for
>     creating filenames with those extensions, taking them out of the
>     code path for "other" extensions.
>
>     Rename the newext_make category to newext_mmake_target.
>
>     None of the code affected is live.
> 
> diff --git a/compiler/file_names.m b/compiler/file_names.m
> index e5a47a2c2..bcd26bd46 100644
> --- a/compiler/file_names.m
> +++ b/compiler/file_names.m
> @@ -951,8 +951,8 @@ make_include_file_path(ModuleSourceFileName, OrigFileName, Path) :-
>  %---------------------------------------------------------------------------%
>
>      % NOTE All of the string arguments below, with the possible exception
> -    % of the argument of newext_make, should be replaced by category-specific
> -    % enums.
> +    % of the argument of newext_mmake_target, should be replaced by
> +    % category-specific enums.
>  :- type newext
>      --->    newext_src
>              % The extension string is ".m".
> @@ -978,6 +978,11 @@ make_include_file_path(ModuleSourceFileName, OrigFileName, Path) :-
>              % Machine-dependent header files for generated C code.
>              % The extension string is ".mh".
> 
> +    ;       newext_mih(string)
> +            % Machine-independent header files for generated C code.
> +            % XXX Yet we consider them architecture-or-grade-dependent.
> +            % The extension string is ".mih".

.mih files have always been grade dependent since until relatively recently,
the MLDS->C backend output several mutually incompatible styles of C code
(e.g. hl_nest, hl, hlc etc.)

That's fine.

Julien.


More information about the reviews mailing list