[m-rev.] for post-commit review: infrastructure for testing new filename translation methods
Julien Fischer
jfischer at opturion.com
Mon Jun 5 00:16:45 AEST 2023
On Sun, 4 Jun 2023, Zoltan Somogyi wrote:
> Add infrastructure for testing filename generation.
>
> compiler/file_names.m:
> Add a mechanism for comparing the outputs of two different implementations
> of the conversion from a module_name/extension pair to a file_name,
> for all the extensions we use in such translations.
>
> The intention is that this be used to compare a proposed replacement
> of module_name_to_file_name_ext with module_name_to_file_name_ext itself.
> For now, the comparison is a dummy, comparing module_name_to_file_name_ext
> with itself.
>
> Delete a reference to IL code.
>
> compiler/mercury_compile_main.m:
> Invoke the new code in file_names.m if an experiment option is set.
>
> Add an XXX.
>
> diff --git a/compiler/file_names.m b/compiler/file_names.m
> index 316d8f8fc..96b9e6d5e 100644
> --- a/compiler/file_names.m
> +++ b/compiler/file_names.m
...
> +:- func string_extensions = list(string).
> +
> +% We don't test the .m extension, since that is handled separately
> +% by module_name_to_source_file_name.
> +string_extensions =
> + ["",
> + ".$O",
$O will expand to .o or .obj depending on the underlying object file extension
used by the platform ...
> + ".mode_constraints",
> + ".module_dep",
> + ".o",
... so why is .o listed separately here? (Or why is .obj not also listed?)
> + ".opt",
> + ".optdate",
> + ".opts",
> + ".order",
> + ".order-trans-opt",
> + ".pic_o",
> + ".prof",
> + ".realclean",
> + ".request",
> + ".so",
".dylib" (the shared libray extension on macOS) is missing.
Julien.
More information about the reviews
mailing list