Commit Graph

353 Commits

Author SHA1 Message Date
Zoltan Somogyi
4e6a6357c4 Use standard but controllable "can't open file" messages.
compiler/file_util.m:
    Define standard routines for reporting that we couldn't open a file
    for either input or output. Rename the one other predicate in this file
    that the compiler used for that purpose, so that its call sites
    can be redirected to use one of the routines intended for this purpose.

    Give these routines the ability to standardize path names (by removing
    "./" prefixes from relative path names, and removing all directory names
    from adsolute path names) if a new option is given.

compiler/options.m:
    Add that (developer-only) option.

compiler/compile_target_code.m:
compiler/copy_util.m:
compiler/export.m:
compiler/llds_out_file.m:
compiler/mercury_compile_front_end.m:
compiler/mercury_compile_make_hlds.m:
compiler/mercury_compile_middle_passes.m:
compiler/mercury_compile_mlds_back_end.m:
compiler/mlds_to_c_file.m:
compiler/mlds_to_cs_file.m:
compiler/mlds_to_java_file.m:
compiler/module_cmds.m:
compiler/opt_deps_spec.m:
compiler/output_imports_graph.m:
compiler/passes_aux.m:
compiler/system_cmds.m:
compiler/write_deps_file.m:
compiler/xml_documentation.m:
    Replace all call sites to the file_util.m predicates modified
    by this diff. In many cases, it replaces duplicate copies of the
    same code with a call. In some cases, redirect the error message
    to the progress stream, where it belongs.

tests/invalid/Mercury.options:
tests/invalid/foreign_include_file_missing.err_exp3:
    Compile the foreign_include_file_missing test case with the new option,
    and add the expected output in C# grades, which (thanks to the option)
    no longer includes the pathname of the test directory.

tests/invalid/foreign_include_file_missing.m:
    Record what the new .err_exp3 file is for.

tests/warnings/help_text.err_exp:
    Expect the new option.
2025-10-11 12:10:26 +11:00
Zoltan Somogyi
7a122b004c Better document the code creating .init files.
util/mkinit.c:
    Put the central list of the places that create .init files here.

compiler/compile_target_code.m:
scripts/c2init.in:
    Point to util/mkinit.c as the repository of that central list.

    Make some predicate names more descriptive.

util/mkinit_common.h:
    Replace /* */ comments with // comments.
2025-09-12 07:29:47 +10:00
Julien Fischer
18a9e4741c Delete old code for invoking the C# compiler.
There are currently two separate predicates used for invoking the C# compiler.
One is in link_target_code and is used to create executables and libraries
in the C# grade. The other is compile_target_code and was previously used
by the old .NET backend to compile additional C# source files. It is currently
plugged into the code that compiles the source files used for fact tables, but
as they are not supported by the C# backed, it has never been used in practice
for this purpose.

Delete the code for invoking the C# compiler in compile_target_code, since it
will have no users after this diff and is almost certainly affected by bitrot
at this point.

compiler/compile_target_code.m:
    Delete the compile_csharp_file/8 predicate. It is unused.

compiler/make.module_target.m:
    Abort if we are requested to build a Java or C# foreign code file.
    The only thing that currently makes such requests is compilation of
    fact tables and neither the Java or C# backend supports those.

    Add an explanation of an issue in an XXX.

compiler/link_target_code.m:
    Add an XXX about the MS C# compiler that needs to be investigated.
2025-08-17 20:05:21 +10:00
Zoltan Somogyi
32006a1c7c Rename and generalize .c_debug to .target_debug.
runtime/mercury_grade.h:
    Rename the grade modifier, and the C macro that represents it.

compiler/options.m:
    Rename the --c-debug-grade option to --target-debug-grade.

compiler/compute_grade.m:
    Rename the grade modifier, and the option that represents it.

    Restrict the .target_debut grade modifier to MLDS grades.

compiler/handle_options.m:
    Implement --target-debug-grade by having it imply --target-debug.

compiler/compile_target_code.m:
compiler/link_target_code.m:
    Pay attention to either --target-debug-grade (for purposes related
    to the grade itself) and to --target-debug (for all other purposes).

scripts/canonical_grade.in:
scripts/canonical_grade.sh-subr:
scripts/final_grade_options.sh-subr:
scripts/init_grade_options.sh-subr:
scripts/parse_grade_options.sh-subr:
    Parse target_debug grade modifiers and --target-debug-grade options
    instead of c_debug grade modifiers and --c-debug-grade options.

    Add (normally commented-out) infrastructure to make it easier
    to debug changes.

    Restrict the .target_debut grade modifier to MLDS grades.

scripts/mgnuc.in:
scripts/mgnuc_file_opts.sh-subr:
    Rename some variables to clarify the distinction between the
    --target-debug option (which, like -g, enabled debugging of only one file)
    and the --target-debug-grade option (which enables it for the whole
    program).

configure.ac:
    Make it easier to debug grade-related changes by recording
    both autoconfigured and user-supplied grades that the rejected by
    the canonical_grade script.

    Conform to the changes above.

README.sanitizers:
doc/user_guide.texi:
grade_lib/grade_spec.m:
grade_lib/grade_string.m:
scripts/ml.in:
tests/warnings/help_text.err_exp:
tools/lmc.in:
tools/test_mercury:
    Conform to the changes above.

scripts/Mmake.vars.in:
    Add some XXXs about style.
2025-08-09 21:48:23 +02:00
Zoltan Somogyi
1e29fbff8b Move interal and developer options to the end.
compiler/options.m:
    Move all the internal options after the misc options.

    Move the developer options after the internal options.
    Merge the oc_make_int options into the oc_internal category,
    since the distinction is not that useful.

    Move the unused options after the developer options.

    Move the part_opmode_rebuild option to the oc_opmode category,
    because it *should* be used as an opmode; the fact that it isn't
    is a blemish of the current implementation.

    Move all the optimization options in a given subcategory (as viewed
    by the user) together.

compiler/compile_target_code.m:
    Undo a misplaced change from 2022 dec 29.
2025-06-15 10:44:13 +02:00
Zoltan Somogyi
8c03f3c2ca Classify all the options in the oc_buildsys section.
compiler/options.m:
    Consider all the options that used to be listed in the oc_buildsys section.
    Keep many options as oc_buildsys, but reclassify others in option
    categories that better fit their semantics. Create some new categories
    for them.

    To make that semantics more visible and understandable, give several
    options more descriptive names,

    Shorten some other names where this does not compromise understandability.

compiler/compile_target_code.m:
    Rename do_make_init_obj_file to make_init_obj_file, after

    - inlining the old make_init_obj_file predicate in its only caller, and
    - deleting it to free up the name.

compiler/compute_grade.m:
compiler/globals.m:
compiler/handle_options.m:
compiler/link_target_code.m:
compiler/make.build.m:
compiler/make.check_up_to_date.m:
compiler/make.dependencies.m:
compiler/make.library_install.m:
compiler/make.program_target.m:
compiler/make.top_level.m:
compiler/mercury_compile_main.m:
compiler/op_mode.m:
    Conform to the changes above.

compiler/color_schemes.m:
compiler/copy_util.m:
compiler/stack_alloc.m:
compiler/term_constr_initial.m:
    Fix comments.
2025-06-14 09:54:31 +02:00
Zoltan Somogyi
f018aaeffd Classify the oc_link options based on target language.
compiler/options.m:
    Split the oc_link category into

    - oc_link_c, oc_link_java and oc_link_csharp, for options that apply
      to only one target language, and

    - oc_link_c_cs and oc_link_c_cs_j for options that applyt to two or three
      target languages.

    Delete the long-obsolete mkinit_erl_command option.

    The compile_to_shared_lib option had a misleading name, since it
    did not contol compilation. Rename it to shared_lib_not_executable,
    since that documents its purpose. (The external name stays, at least
    for now.)

compiler/compile_target_code.m:
    Give a predicate and some variables more descriptive names.

compiler/handle_options.m:
    Document a possible bug.

compiler/link_target_code.m:
    Factor out a piece of duplicated code.

    In one place, reduce the extent of stringly typed programming.

compiler/make.program_target.m:
    Replace an if-then-else with a switch.

compiler/mercury_compile_augment.m:
compiler/mercury_compile_llds_back_end.m:
    Conform to the changes above.

compiler/mlds_to_java_file.m:
    Improve a comment.
2025-06-12 15:23:48 +02:00
Zoltan Somogyi
619c2cb7ca Simplify the interface between two modules.
compiler/compile_target_code.m:
    Replace the predicates that output various sets of compiler flags
    with predicates that merely return them. The old predicates were
    inconsistent; some printed newlines, some did not. The new ones
    are also useful in the code of the rest of compile_target_code.m.

compiler/mercury_compile_main.m:
    Call the new predicates. These calls fit in with the code around them
    much better.
2025-01-20 07:19:09 +11:00
Zoltan Somogyi
4cfa5c226b Carve link_target_code.m out of compile_target_code.m.
compiler/compile_target_code.m:
compiler/link_target_code.m:
    Move the parts of compile_target_code.m that concern linking
    to the new module link_target_code.m. Leave the parts concerned
    with just compilation.

    The new module link_target_code.m imports compile_target_code.m,
    but not vice versa. To make this possible, get compile_target_code.m
    to decide PIC vs non-PIC for executables, since that info is needed
    during non-linking tasks, while making that decision for linking tasks
    in link_target_code.m.

    Reorder the contents of link_target_code.m to put related predicates
    next to each other, and to put these groups of related predicates
    into a meaningful order.

    Inline a tiny predicate at its only call site. Replace a boolean argument
    with a value of a bespoke type.

compiler/backend_libs.m:
compiler/notes/compiler_design.html:
    Include and document the new module.

compiler/file_util.m:
    Move a predicate here from compile_target_code.m. It is needed
    by both compile_target_code.m and link_target_code.m, but it would
    feel wrong for it to be exported by compile_target_code.m. It looks
    much better for it to be exported by file_util.m.

compiler/make.program_target.m:
    Conform to the changes above.

    Move a predicate next to its only caller.

    Add an XXX.

compiler/make.clean.m:
compiler/make.make_info.m:
compiler/make.module_target.m:
compiler/make.top_level.m:
compiler/mercury_compile_augment.m:
compiler/mercury_compile_llds_back_end.m:
compiler/mercury_compile_main.m:
    Conform to the changes above.
2025-01-20 00:43:07 +11:00
Zoltan Somogyi
c6c78337c4 Minor readability improvements. 2025-01-19 21:22:44 +11:00
Zoltan Somogyi
b35ebd0cb2 Improve the readability of linking code.
compiler/compile_target_code.m:
    Give the two main predicates that do linking more descriptive names.
    Expand the comment on one, and add a comment on the other.

    Make one of these predicates take as input a list of module names,
    not a list of file names. Previously, we converted module names to
    file names, passed them to this predicate, which then converted them
    *back* to module names. The new code, by avoiding unneeded
    transformations, also avoids the possibility of callers passing
    file names that did not start out as module names, which therefore
    cannot be *meaningfully* converted back to module names.

    Move the globals argument of a predicate to one of its usual places,
    because the reason for its being supplied late does not apply anymore.

    Consistently use a single variable names to describe linked_target_types;
    some of the old variable names were misleading.

compiler/make.module_target.m:
compiler/make.program_target.m:
compiler/make.top_level.m:
compiler/mercury_compile_augment.m:
compiler/mercury_compile_main.m:
    Conform to the changes above.
2025-01-19 21:05:44 +11:00
Zoltan Somogyi
ff0506d6c2 Standardize the capitalization of a word. 2024-12-14 20:05:13 +11:00
Zoltan Somogyi
0507e119eb Move timestamp-comparing code to file's end. 2024-11-29 21:09:28 +11:00
Zoltan Somogyi
8f4aeaf02c Implement search for PROPOSED library directories.
This covers searches

- for static object file archives (usually .a files, since this is the default
  value of the --library-extension option) when targeting C (we do this
  for any Mercury library we want to link with), and

- for .init, .jar and .dll files (we do this *only* for the Mercury standard
  library's top module).

The existing LEGACY search code treated .a, .jar and .dll files together,
and .init files separately from them. This diff keeps that treatment
for LEGACY searches, but changes things for PROPOSED searches, by searching
for .init, .jar and .dll files done *only* in the directory containing
the Mercury standard library.

compiler/globals.m:
    Extend the ext_dirs_maps type with maps that specify the search paths
    for the above four extensions.

    Delete the dirs_ext type. Since recent events established the need
    for different search paths for Mercury files in different circumstances,
    the original point of this supertype (having a *single* map from
    extensions to search paths) has been lost.

compiler/options.m:
    Add options (which are not yet used) to control PROPOSED searches
    for .a files.

    Add an internal option for recording the location of the Mercury standard
    library chosen by the user. The compiler sets this from the value of
    another option, but if that option is not set, it falls back to the
    directory named in an environment variable or a make variable
    in an options file. The value of this option controls searches
    for .init, .jar and .dll files.

compiler/handle_options.m:
    Move the computation of the chosen standard library location here from
    check_libgrades.m. Fix the potentionally-misleading wording of the
    moved error messages.

    Fill in the new fields of the ext_dirs_maps structure.

compiler/find_module.m:
    Update the type representing search authorizations along the lines
    described at the top of this commit message.

    Implement the described PROPOSED searches for the four extensions,
    while keeping their LEGACY searches the same.

compiler/file_names.m:
    Update the type representing search specifications along the lines
    described at the top of this commit message.

    Provide auxiliary operations now needed by find_module.m.

compiler/check_libgrades.m:
    Delete the code moved to handle_options.m. Simplify the rest of the module
    as far as possible, given that the chosen stdlib dir is now available
    in the option table, and we no longer need the env_optfile_variables
    as inputs.

    Ask to do PROPOSED searches for the Mercury std lib's main module
    only in the chosen stdlib directory.

compiler/compile_target_code.m:
compiler/make.build.m:
compiler/make.library_install.m:
compiler/make.program_target.m:
compiler/make.track_flags.m:
compiler/mercury_compile_main.m:
    Conform to the changes above.

compiler/options_file.m:
    Fix indentation.
2024-11-27 20:30:59 +11:00
Zoltan Somogyi
ec99843269 Create launcher scripts more simply.
compiler/module_cmds.m:
    Change the predicates that write out launcher script files to take
    as input not a higher-order predicate that does the writing, but
    simply the string to be written.

compiler/compile_target_code.m:
    Conform to the change above.
2024-11-17 16:23:52 +11:00
Zoltan Somogyi
86fc0e526e Check what files can be searched for where ...
... (mostly) in one place.

compiler/file_names.m:
    Change the module_name_to_search_file_name predicate to

    - take as input a specification of where the caller intends to search for
      the file name returned by this predicate (the new search_which_dirs
      input argument),

    - use insts to check, at compile time, whether this specification
      is compatible with the extension of the file (by intentionally causing
      the call to have a mode error if they are not compatible),

    - if they are compatible, return a "search authorization" that contains
      the information in the search_which_dirs argument in a form that
      should be known *only* to file_names.m (which issues the authorization)
      and find_module.m (which acts on such authorizations).

    To make the above possible, move the search_which_dirs type here
    from find_module.m, move many insts on the ext type here from several
    other modules, and add some new insts on that type.

    Improve documentation.

compiler/find_module.m:
    Delete the search_which_dirs type that this diff moves to file_names.m.
    Add in its place the search_auth_dirs type, which represents search
    authorizations. Make all predicates in this module take search
    authorizations instead of search specifications as inputs.
    The difference is that only the module_name_to_search_file_name
    predicate in file_names.m, and a few functions in this module,
    generate search authorizations that involve references to the
    various options containing lists of directory names.

compiler/make.file_names.m:
    Replace predicates that take a maybe_for_search argument with two
    predicates each, one for not for search and one for search. This is
    because the for search versions now take two extra arguments:
    a search_which_dirs input argument and a search_auth_dirs output argument.

    Factor out the common code from the resulting predicate pairs
    where this is worth while.

    Improve documentation.

compiler/make.timestamp.m:
    Replace predicates that take a maybe_for_search argument with two
    predicates each, one for not for search and one for search. This is
    because the for search versions and the not_for_search versions
    now call different predicates, and two separate predicates ends up
    being less code that tests around all the calls.

    Factor out the common code from the resulting predicate pairs
    where this is worth while.

    Delete the code that specifies the default list of directories
    in which to search for files with given extensions, since it is now
    in file_names.m (in a modified form).

compiler/analysis.framework.m:
    Delete the inst definitions that this diff moves to file_names.m.

compiler/compile_target_code.m:
compiler/file_kind.m:
    Provide more precise insts for the outputs of some predicates.
    This is because some of their callers need those insts to satisfy
    the new requirements of module_name_to_search_file_name.

compiler/make.top_level.m:
    Add a note.

compiler/read_modules.m:
    Conform to the changes above. Split the handling of source files
    (which do not require search) from the handling of .int* and .*opt files
    (which do).

compiler/analysis.file.m:
compiler/check_libgrades.m:
compiler/make.check_up_to_date.m:
compiler/make.get_module_dep_info.m:
compiler/make.module_target.m:
compiler/make.program_target.m:
compiler/mercury_compile_front_end.m:
compiler/mmc_analysis.m:
compiler/options_file.m:
compiler/write_deps_file.m:
    Conform to the changes above.
2024-11-09 02:40:45 +11:00
Zoltan Somogyi
fbec9830a9 Centralize file searches in find_module.m.
The aim is to move all to this one place almost all the code that will
have to be updated to handle searches in the PROPOSED installed library
structure, first alongside and later in place of, searches in the LEGACY
structure. (Some code in handle_options.m, options.m and check_libgrades.m
will need to be updated as well.)

compiler/find_module.m:
    Change the predicates of this module to take as input not a list of
    directories to be searched, but a *specification* of how that list
    should be computed. (Eventually, it should be possible to derive
    this specification from the extension of the file name in most or
    possibly even all cases, but that is future work.)

compiler/options.m:
    Fix a misleading internal option name. (The user-facing name is
    not misleading.)

compiler/maybe_error.m:
    Add another purpose-specific synonym for bool, for use in changes below.

compiler/check_libgrades.m:
compiler/compile_target_code.m:
compiler/generate_dep_d_files.m:
compiler/handle_options.m:
compiler/make.check_up_to_date.m:
compiler/make.get_module_dep_info.m:
compiler/make.program_target.m:
compiler/make.timestamp.m:
compiler/mercury_compile_front_end.m:
compiler/mercury_compile_main.m:
compiler/mmc_analysis.m:
compiler/options_file.m:
compiler/read_modules.m:
compiler/source_file_map.m:
compiler/write_deps_file.m:
    Instead of computing lists of directories to pass to the predicates
    of find_module.m, pass a specification.

    Add "XXX SEARCH_ERROR" markers to code that should include more info
    in error messages about failed searches.
2024-10-23 21:15:04 +11:00
Zoltan Somogyi
f3465e5810 Put the grade dir name in the globals.
compiler/globals.m:
    Add to the globals structure a field that holds the pathname component
    identifying the grade (in the names of grade-specific files).
    We used to compute it every time we needed it, using a relatively slow
    algorithm; we now compute it just once, when the globals structure
    is created by the globals_init predicate.

    Put the main read-only fields of the globals into a substructure,
    to make any updates of the writeable fields faster by reducing the size
    of the globals structure itself,

    Change the order of the arguments of globals_init, and the order of the
    getter and setter predicates of the globals structure, to match the
    new order of the fields in the globals structure.

    Don't mix other predicates in with the getter and setter predicates.

compiler/compute_grade.m:
    Delete the predicate that used to compute this pathname component
    after effectively inlining its one-line definition in the globals_init
    predicate.

compiler/check_libgrades.m:
compiler/compile_target_code.m:
compiler/file_names.m:
compiler/file_util.m:
compiler/handle_options.m:
compiler/implementation_defined_literals.m:
compiler/make.clean.m:
compiler/make.library_install.m:
compiler/mercury_compile_main.m:
compiler/module_cmds.m:
    Conform to the changes above.
2024-10-23 11:58:53 +11:00
Zoltan Somogyi
b4053620ec Install gs files to the PROPOSED install dirs.
compiler/make.library_install.m:
    Add code to install .module_dep .opt and .analysis files (for all grades),
    .init, .a, .so and maybe .mih files (for C grades), .jar files (for Java
    grades) and .dll files (for C# grades) to the PROPOSED install directory
    structure. The new code is run only if --experiment4 is specified.

    Factor out some common code.

compiler/file_names.m:
    Rename the internal representation of .dll files to include "cil"
    in the name, and reclassify it as a grade-specific but not
    architecture-specific file type.

    Export some procedures now needed by make.library_install.m.

compiler/compile_target_code.m:
compiler/generate_mmakefile_fragments.m:
    Conform to the changes in file_names.m.
2024-09-21 17:51:07 +02:00
Zoltan Somogyi
03e10d59c2 Improve variable names. 2024-09-19 14:15:03 +02:00
Zoltan Somogyi
3b3b543a84 Return both legacy and proposed file names.
compiler/file_names.m:
    Change the predicates that return file names to return as their result
    both the current, legacy filename, and the proposed filename.

    For ext_cur extensions, the legacy and the proposed filenames
    will always be identical. Add a predicate for these that returns
    just this one filename.

compiler/comp_unit_interface.m:
compiler/compile_target_code.m:
compiler/du_type_layout.m:
compiler/export.m:
compiler/fact_table.m:
compiler/generate_dep_d_files.m:
compiler/generate_mmakefile_fragments.m:
compiler/llds_out_file.m:
compiler/make.build.m:
compiler/make.check_up_to_date.m:
compiler/make.clean.m:
compiler/make.dependencies.m:
compiler/make.file_names.m:
compiler/make.get_module_dep_info.m:
compiler/make.library_install.m:
compiler/make.module_dep_file.m:
compiler/make.module_target.m:
compiler/make.program_target.m:
compiler/make.timestamp.m:
compiler/make.track_flags.m:
compiler/make.util.m:
compiler/make_module_file_names.m:
compiler/mercury_compile_front_end.m:
compiler/mercury_compile_llds_back_end.m:
compiler/mercury_compile_main.m:
compiler/mercury_compile_make_hlds.m:
compiler/mercury_compile_middle_passes.m:
compiler/mercury_compile_mlds_back_end.m:
compiler/mlds_to_c_file.m:
compiler/mlds_to_cs_file.m:
compiler/mlds_to_java_file.m:
compiler/mmc_analysis.m:
compiler/mode_constraints.m:
compiler/module_cmds.m:
compiler/read_modules.m:
compiler/recompilation.used_file.m:
compiler/write_deps_file.m:
compiler/write_module_interface_files.m:
compiler/xml_documentation.m:
    Conform to the changes above. In most places, this means ignoring
    the proposed filename for now, but marking such places with "XXX LEGACY",
    to make them easier to find when we *do* start to make use of the proposed
    file names (first alongside the legacy names, and then without them).

    In some places, make variable names more descriptive.

library/set.m:
    Add utility predicate for use by a diff to one of the modules above.

NEWS.md:
    Announce the new library predicate.
2024-09-19 12:42:33 +02:00
Zoltan Somogyi
e0aad5ca8e Classify grade-specific files on architecture-specificity.
compiler/file_names.m
    Separate "gs" (grade-specific but not architecture-specific) extensions
    from "gas" (both grade- and architecture-specific) extensions.

    The intent is to eventually install them into different directories,
    but that is for future diffs.

    Change the functions that return directory paths into predicates.
    A future change will update them to return *two* directory paths:
    one for the LEGACY directory structure, and one for the PROPOSED
    structure.

compiler/compile_target_code.m
compiler/generate_mmakefile_fragments.m
compiler/make.clean.m
compiler/make.file_names.m
compiler/make.library_install.m
compiler/make.module_target.m
compiler/make.program_target.m
compiler/mercury_compile_llds_back_end.m
compiler/mercury_compile_main.m
compiler/module_cmds.m
    Conform to the changes above.
2024-09-18 13:46:02 +02:00
Zoltan Somogyi
df2d5bd556 Fix a comment. 2024-08-26 17:34:40 +02:00
Zoltan Somogyi
55ae3c3d3b Partial readability rewrite of make.library_install.m.
compiler/make.library_install.m:
    The main purpose of this change is to make it easier to understand
    what files (meaning files with what extensions) are installed in what
    target directories.

    Install directories, when their initial structure was designed,
    (which was designed *before* we added the --use-grade-subdirs option),
    had one of two forms. For e.g. files with the .int3 extension,
    one form had those files stored in two directories:

        Prefix/lib/mercury/ints
        Prefix/lib/mercury/ints/Mercury/int3s

    while the other form had them stored in one directory

        Prefix/lib/mercury/ints

    with Prefix/lib/mercury/ints/Mercury/int3s being a symlink to "..", with
    the directory at the end of the symlink being Prefix/lib/mercury/ints.

    From the point of view of code that looked things up in the installed
    program, these are equivalent, but from the point of view of the code
    doing the install, they are definitely NOT equivalent.

    The original code used flags named LinkSucceededN to record the
    distinction. This was bad for two major and one minor reasons.

    First, while such names accurately reflect the *origin* of the value
    (the code that sets it tries to construct the second form, and falls
    back to the first *only* if the use of symlinks is disabled
    or the attempt to create a symlink fails), but the code that *uses*
    those values cares only *about its implications about where it
    needs to install each file*, and not about its *origin*.
    The LinkSucceededN names are singularly uninformative in this respect.

    Second, the code of this module effectively has two cleanly separated
    halves: the first half creates directories and (if allowed) symlinks
    to directories, while the second half installs files in those directories.
    The LinkSucceeded argument was effectively the *only* communication
    between the two halves. This meant that the two halves each have to
    construct for themselves the names of all the install directories,
    with any discrepancy between the two halves in this respect resulting
    in an attempt to install files in nonexistent directories.
    This is a double maintenance burden. (The fact that the directory path
    names themselves consist of repeated elements that make them quite easily
    confusable does not help matters).

    Third, the code that constructed the symlinks for the different extensions
    constructed a single final LinkSucceeded value that was "succeeded"
    *only* if we could construct all the symlinks. If the symlink for one
    extension could not be constructed, forcing the install of the files
    using that extension to use the first form above, then the installs
    for all the other extensions would also be done assuming that they
    used the first form. This would mean that they would install the same file
    in e.g. both Prefix/lib/mercury/ints/Mercury/int3s and
    Prefix/lib/mercury/ints, and since the former would be a symlink
    to the latter, the second install would duplicate the effect of the first.

    To fix all three problems, this diff replaces the LinkSucceededN flags
    with a map from extensions (actually, from the subdir name we use
    to store files with those extensions) to a structure that specifies

    - whether the files with that extension should be installed into
      one directory (appropriate for the second form above) or
      two directories (appropriate for the first form above), and

    - the full path name(s) of that directory or those directories.

    To make that map possible, we turn e.g. Prefix/lib/mercury/ints into
    Prefix/lib/mercury/ints/Mercury/int3s by adding the last two components
    at the same time. (The old code added them in two separate places.)

    We actually use two such maps, one for the main part of install_library,
    the part that install (mostly) non-grade-specific files into
    non-grade-specific directories, and one for install_library_grade_files,
    which installs grade-specific files (though not always into
    grade-specific directories).

    Add XXXs about deviations about expected behavior, such as the two
    in the above paragraph. If they are intended behavior, then their
    rationale should be documented; if they are not, then they
    should be fixed.

    ---------------------------------------------------------
    Other, less important changes follow.

    When an filesystem operation fails, print an error message immediately
    that *identifies the directory involved*. The old error reporting code
    did not do that.

    Instead of collecting lists of *actual* "did it succeed or not" flags
    and then later AND-ind them together, thread that flag through
    the relevant code using state variables. This yields simpler code.

    Inline the one call to foldl2_install_library_grades, for two reasons.
    First, it simplifies the interface of make.library_install.m by allowing
    us to stop exporting a predicate, and second, it allows that predicate
    argument order to match the argument order of related predicates.

    Inline all calls to linked_target_file_name, because they identified
    the files being installed using a linked_target_type. All other files
    being installed are identified using their extensions.

compiler/make.build.m:
    Delete foldl2_install_library_grades, since the only call to it,
    which was make.library_install.m, has been inlined.

compiler/compile_target_code.m:
    Delete linked_target_file_name, after all calls to it have been
    inlined in make.library_install.m.

compiler/file_util.m:
    Stop putting unnecessary spaces in shell commands.

compiler/copy_util.m:
    Improve some error messages.
2024-08-23 22:50:54 +02:00
Zoltan Somogyi
58ba62f57f Improve programming style. 2024-08-17 14:52:34 +02:00
Zoltan Somogyi
f94ffc0d39 Get compile_target_code.m to return error_specs.
compiler/compile_target_code.m:
    Get two predicates in this module to return error_specs instead of
    printing them to stderr, since their callers know on what stream
    these messages *should* be printed.

compiler/make.module_target.m:
compiler/make.program_target.m:
compiler/mercury_compile_main.m:
    Conform to the changes in compile_target_code.m.
2024-05-08 13:37:00 +10:00
Julien Fischer
1a337fb843 Align functions on word boundaries with clang.
Function trailing with tagged trail entries does not work unless the functions
are aligned on word boundaries. In trailing grades with GCC, we have long
passed an option (-falign-functions) to force this to happen. Do the same for
clang, which supports the same option. This fixes the failure of function
trailing tests on Apple Silicon based machines.
(This does not appear an issue on Intel-based Macs, although passing
-falign-functions option there is harmless.)

scripts/mgnuc.in:
compiler/compile_target_code.m:
     Tell clang to align functions on word boundaries in trailing grades.
2024-05-04 17:15:51 +10:00
Zoltan Somogyi
5a3799c588 Fix some comments. 2024-04-21 11:45:49 +10:00
Zoltan Somogyi
dc12878708 Shorten function symbols in error_specs.
compiler/error_spec.m:
    Replace simplest_spec with spec, and simplest_no_context_spec with
    no_ctxt_spec. These are now the most frequently used function symbols
    to create error specs, so their name should not make them out to be
    the exception.

    Replace simplest_msg with msg, and simplest_no_context_msg with
    no_ctxt_msg for the same reason.

    Abbreviate some of the long phase names.

compiler/*.m:
    Conform to the changes above. Most of these changes were done by a script,
    with minor manual tidying up, which consisted mostly of fitting code
    constructing error specs onto fewer lines than before.
2024-04-20 21:51:15 +10:00
Julien Fischer
4cd5c17f61 Fix more copyright notices ...
... and other minor fixes.

library/*.m:
library/LIB_FLAGS.in:
compiler/*.m:
mdbcomp/*.m:
    Fix and update copyright notices.

    Fix spelling.

    Delete trailing whitespace.
2024-02-20 17:18:52 +11:00
Julien Fischer
f5e71b1e90 Fix copyright notices in recently modified files.
compiler/*.m:
library/*.m:
mdbcomp/*.m:
runtime/*.[ch]:
    As above.

    Fix spelling in some spots.
2024-02-20 15:09:17 +11:00
Julien Fischer
0e1e5dc811 Avoid a linker warning with MSVC.
compiler/compile_target_code.m:
    As above.
2024-01-11 23:18:03 +11:00
Julien Fischer
13b1dbdfc2 Move invoke_long_system_command into system_cmds.
compiler/compile_target_code.m:
     Move the invoke_long_system_command predicates from here ...

compiler/system_cmds.m:
     ... to here.
2024-01-05 20:54:29 +11:00
Julien Fischer
d5835f268b Move code for invoking commands via the shell.
Move the code used for invoking commands via the shell out of the module_cmds
module and into its own module. In doing so, this moves it from the parse_tree
package into the libs package.

compiler/module_cmds.m:
    Shift the code for invoking commands via the shell from here ...

compiler/system_cmds.m:
    ... to here.

compiler/libs.m:
    Include the system_cmds module.

compiler/compile_target_code.m:
compiler/fact_table.m:
compiler/make.module_target.m:
compiler/make.program_target.m:
    Conform to the above change.

compiler/notes/compiler_design.m:
    Document the new module.
2024-01-05 15:45:33 +11:00
Zoltan Somogyi
b8641b4306 Write "can't open file" messages to ProgressStream ...
... instead of ErrorStream, in more places.

compiler/compile_target_code.m:
compiler/file_util.m:
compiler/handle_options.m:
compiler/mercury_compile_front_end.m:
    As above.

compiler/make.program_target.m:
compiler/mercury_compile_main.m:
compiler/xml_documentation.m:
    Don't pass ErrorStream to predicates that don't need it anymore.
2023-10-22 09:47:52 +11:00
Zoltan Somogyi
b21e9e459a Delete all calls to get_progress_output_stream ...
... and almost all calls to get_error_output_stream. Replace them
with ProgressStreams and ErrorStreams passed down from higher in the
call tree.

Use ProgressStreams, not ErrorStreams, to write out error messages about
any failures of filesystem operations. These are not appropriate to put
into a module's .err file, since they are not about an error in the
Mercury code of the module.

compiler/globals.m:
    Delete the predicates that return progress streams, and the mutable
    behind them.

compiler/passes_aux.m:
    Delete the predicates that return progress streams. Delete the
    versions of the progress-message-writing predicates that didn't get
    the progress stream from their caller.

compiler/*.m:
    Pass around ProgressStreams and/or ErrorStreams explicitly,
    as mentioned at the top of log message.

    In a few places, don't write out error_specs to ErrorStream,
    returning it to be printed by our caller, or its caller etc instead.
    In some of those places, this allowed the deletion an existing
    ErrorStream argument.

    Given that get_{progress,error}_output_stream took a ModuleName input,
    deleting some of the calls to those predicates left ModuleName unused.
    Delete such unused ModuleNames.

    In a few places, change argument orders to conform to our usual
    programming style.

    Fix too-long lines.
2023-10-17 20:41:33 +11:00
Zoltan Somogyi
191eb9eb64 Make --generate-dependencies-ints more practical.
scripts/Mmake.rules:
    Add a rule for the pattern target %.depend_ints which invokes mmc
    with --generate-dependencies-ints, just as %.depend invokes mmc
    with --generate-dependencies.

    Document the reason why this addition requires yet more code duplication.

scripts/Mmake.vars.in:
    Add the make variable definitions needed by the new code in Mmake.rules.

compiler/mercury_compile_main.m:
    Make it practical to use --generate-dependencies-ints in a multi-directory
    project like the Mercury implementation, in which some directories
    may use --generate-dependencies-ints as the target of "mmake depend",
    while other directories, which come earlier in the build process,
    still do "mmake depend" using just --generate-dependencies.
    In such cases, mmc --generate-dependencies-ints in the later directory
    may fail to generate .int0, .int or .int2 files simply because
    the .int3 file of a module they import (from an earlier directory
    in which "mmake depend" uses just --generate-dependencies) hasn't been
    made yet. (This is what would happen if someone executed "mmake depend"
    at the top level in a freshly checked out workspace.)

    The practical fix is to simply report this fix using an error message
    that still allows the compiler to exit with an exit status that
    indicates success.

    Most of the rest of this diff is there to make this possible.

compiler/error_spec.m:
    Add a new phase, phase_find_files, that specifically indicates
    that we couldn't read a file because we couldn't find it.
    Give it a string argument naming the file, to allow mercury_compile_main.m
    to replace several error_specs that each report not being able to find
    one file with a single error_spec that reports not being able to find
    many files.

    Add a utility function for use by mercury_compile_main.m to construct
    that error message.

    Add another new phase, phase_make_int, that indicates a problem
    we discovered in the code of a Mercury source file while trying
    to decide what should got into one of the that module's interface files.

compiler/parse_error.m:
    Here also use separate function symbols in the fatal_module_read_error
    type for the situations "couldn't find a file" and "couldn't read a file".

    Update the predicates constructing error_specs to handle this distinction
    (which the callers make using the new function symbol in the above type).

compiler/compile_target_code.m:
compiler/error_util.m:
compiler/grab_modules.m:
compiler/options_file.m:
compiler/parse_module.m:
compiler/read_modules.m:
compiler/recompilation.check.m:
compiler/write_module_interface_files.m:
    Conform to the changes above.

compiler/options.m:
    Add a way to detect the presence of this diff in an installed compiler.
2023-10-15 13:10:40 +11:00
Zoltan Somogyi
6b1c9f9605 Use insts to delete unreachable code.
compiler/compile_target_code.m:
    Many predicates in this module used to throw an exception when given
    some specific linked_target_types. Use insts to require their callers
    to pass to them only the linked_target_types that they *can* handle.
    This allows the deletion of the code throwing exceptions, since
    the compiler now knows that such code would be unreachable.

    In some cases, delete code that did NOT throw exceptions,
    but was unreachable nevertheless, since its correctness could not
    have been ever tested.

    Move option lookups to just before the looked-up value is needed.

    Clarify a predicate by converting it to use explicit nested switches.

    Fix a rafe-ism.
2023-10-06 00:00:37 +11:00
Zoltan Somogyi
8ccd1c6c78 Improve file_util.m.
compiler/file_util.m:
    Delete the obsolete predicate report_error/3 which wrote to the implicit
    current output stream.

    Move a predicate that is used only in prog_event.m to prog_event.m.

    Rename of the two open_temp_output predicates to avoid ambiguity.

compiler/prog_event.m:
    Move a predicate from file_util.m to here, and give it
    a more descriptive name.

compiler/compile_target_code.m:
    Conform to the predicate rename above.
2023-09-12 09:57:36 +10:00
Zoltan Somogyi
d1402ec7b7 Build filenames from <dirs,basename,extstr> triples.
Previosly, there were three places in the compiler that had code to compute
the name of the directory where .class files are stored. Replace two of
these with calls to the third.

compiler/file_names.m:
    Compute the three components of files, that is

    - the dir names list that together specify a relative path,
    - the file's base name and
    - the file's extension string

    in three separate predicates. Export the new predicate doing just
    the first job; the functions doing the second and third jobs were
    already exported.

    Make the code computing the dir names list for .java and .class files
    call get_java_dir_path. This replacement of the old get_class_dir_name
    predicate is now the place that every part of the compiler calls
    for this info.

    As part of this last change, add the "jmercury" component to the path
    for .java and .class files separately, since we need the path both
    with and without this extension. This change allows a simplification
    of the make_grade_subdir_name function.

compiler/compile_target_code.m:
    Call the new get_java_dir_path predicate in file_names.m instead of
    including a duplicate copy of its logic.

compiler/make.program_target.m:
    Add an XXX on code that *looks like* it should either be in
    file_names.m or use code in file_names.m, but which cannot be easily
    updated using either approach, because its purpose is undocumented.

compiler/mercury_compile_main.m:
compiler/module_cmds.m:
    Conform to the changes in file_names.m.
2023-08-19 00:20:27 +02:00
Zoltan Somogyi
452c891f74 s/classs/classes/ 2023-08-18 14:11:21 +02:00
Zoltan Somogyi
3a9c847708 Put all executable/library files into grade-specific directories ...
... with --use-grade-subdirs.

compiler/file_names.m:
    Move all the executable and library extensions to the ext_cur_gs group,
    which means their files get put into grade-specific directories if
    --use-grade-subdirs is set.

    Comment out the enums representing the .lib and .so extensions,
    because they are never specified specifically as those extensions;
    they are only ever referred to though the options holding
    those extensions.

    Put all executable files into subdirs named "bin", and all libraries
    into subdirs named "lib". Rename the subdirs for several other extensions
    as well, as we agreed on m-rev.

compiler/make.program_target.m:
    Conform to the change above.

    Delete duplicate computation of the filename of an "mmc --make" target.

    Use a direct test of filenames to see whether a file needs to be
    linked-or-copied to the current directory.

    If the action of generating an executable does not execute cleanly,
    clean up not just the full pathname version of the file, but its
    current directory copy as well (in case it was the copy that
    got the error, due to e.g. the filesystem being full).

compiler/write_deps_file.m:
    Conform to the change above.

    Delete a repeated computation.

compiler/compile_target_code.m:
    Conform to the change above.
2023-08-18 11:11:43 +02:00
Zoltan Somogyi
691e5ca0c5 Group extensions by their translation algorithms.
compiler/file_names.m:
    Replace the current groups of extensions, which are based on the
    shared purpose of the files with those extensions, with a smaller
    number of groups, which are based on the algorithm we use to decide
    in what (sub)directories we want to place files with those extensions.
    The old distinctions based on purpose still remain in the naming
    convention for the enum values within each of the new groups.

compiler/analysis.file.m:
compiler/analysis.m:
compiler/compile_target_code.m:
compiler/du_type_layout.m:
compiler/fact_table.m:
compiler/file_kind.m:
compiler/generate_dep_d_files.m:
compiler/llds_out_file.m:
compiler/make.file_names.m:
compiler/make.module_dep_file.m:
compiler/make.module_target.m:
compiler/make.program_target.m:
compiler/make.track_flags.m:
compiler/mercury_compile_front_end.m:
compiler/mercury_compile_llds_back_end.m:
compiler/mercury_compile_main.m:
compiler/mercury_compile_make_hlds.m:
compiler/mercury_compile_middle_passes.m:
compiler/mlds_to_c_file.m:
compiler/mlds_to_cs_file.m:
compiler/mlds_to_java_file.m:
compiler/mode_constraints.m:
compiler/module_cmds.m:
compiler/prog_foreign.m:
compiler/recompilation.used_file.m:
compiler/write_deps_file.m:
compiler/write_module_interface_files.m:
compiler/xml_documentation.m:
    Conform to the changes above.
2023-08-10 02:47:01 +02:00
Zoltan Somogyi
c85e348faa Group all "always in current dir" extensions together.
compiler/file_names.m:
    Replace several groups of extensions that stood for semantically
    different groups of extensions by one group, the "always in the
    current directory" group. The enum type of the new type representing
    the now larger group consists of the enum values from the types
    representing the old, smaller groups. The old boundaries are thus
    no longer expressed in types, but still remain in the naming schemes
    of the enum values.

    Once we have done the same for the six other groups of extensions,
    with each group having its own pattern of where its extensions are put
    under which circumstances, we can replace code that does multiple
    modulename+extension to filename translations with code that does
    one modulename+extension to DIRECTORY PATH translation, and then
    constructs multiple filenames from that, repeating just the
    "extension enum to extension string" part of the old translation
    for each operand. We can do this because unlike the old extension
    categories, the new ones will make clear which groups of extensions
    are guarantee to map to the same directory path, and which have
    no such guarantee.

compiler/compile_target_code.m:
compiler/export.m:
compiler/generate_dep_d_files.m:
compiler/make.build.m:
compiler/make.file_names.m:
compiler/make.module_dep_file.m:
compiler/make.program_target.m:
compiler/mercury_compile_llds_back_end.m:
compiler/mercury_compile_main.m:
compiler/mercury_compile_make_hlds.m:
compiler/mercury_compile_mlds_back_end.m:
compiler/mlds_to_c_file.m:
compiler/write_deps_file.m:
    Conform to the changes above.
2023-08-09 12:37:31 +02:00
Zoltan Somogyi
315fd9eb03 Add a subdir_setting field to the globals.
compiler/globals.m:
    Define a new enum type with three values, which represents the three
    legal combination of the values of the use_subdir and use_grade_subdir
    options.

    Add a field of this type to the globals.

compiler/handle_options.m:
    Set up the value of this field in the globals. This means initializing
    it to a non-meaningful value when the globals is first created, and
    filling it in with the final meaningful value when we finish the setup
    of the global structure.

compiler/options.m:
    Add a "setting_only_" to the internal names of the use_subdir and
    use_grade_subdir options, to signal that their only valid use
    from now on is in deciding the value of the new globals field.
    (Their user-facing names remain unchanged.)

compiler/compile_target_code.m:
compiler/file_names.m:
compiler/make.program_target.m:
compiler/module_cmds.m:
compiler/write_deps_file.m:
    Rewrite code that used to make decisions based on the values of
    the use_subdir and use_grade_subdir options with code that makes
    decisions based on the value of the new field. A field retrieval
    followed by a three-way switch is simpler (and faster) than
    two option lookups and one two-way switch inside another.

    Consistently reorder the code so that the code of the simpler cases
    come first.

    Note a situation where we should be using an even simpler basis
    for the decision.
2023-08-07 01:12:28 +02:00
Zoltan Somogyi
f298a76c40 Make copying files to the current directory easier.
compiler/file_names.m:
    Up till now, every translation of a module_name+extension to a filename
    returned a filename that always included the needed relative path.
    But for some final products of compilation, such as executables
    and libraries, after we have created the file under its fully
    specified relative pathname, we also want to copy it to the
    current directory.

    We used to this in a roundabout way, by setting up a globals structure
    that turned off the use_subdirs and use_grade_subdir options
    (or, in some cases, just one of them), and redoing the
    module_name+extension to filename translation using this modified globals.

    This diff changes to a more direct approach: asking file_names.m
    to return both the fully specified relative path of the filaname,
    and just its local directory component, in *one* predicate call.
    We do this by adding new versions that return this info
    of those predicates whose callers need this info.

    To make this possible, make the main translation predicate,
    module_name_to_file_name_ext, return to its callers not
    the list of directory components and the full relative path, but
    the list of directory components and the local filename,
    leaving it up to its callers to construct the full relative path
    from them *without* precluding the possibility of returning
    the local filename as well.

    Move some comments to the place they apply to.

compiler/compile_target_code.m:
    Rename the link_output_filename predicate to linked_target_file_name
    and export it. linked_target_file_name was a predicate in make.util.m
    that had a identical definition to linked_target_file_name, which
    this diff deletes; by exporting the renamed predicate, we make it
    available in make.util.m as well.

    Provide a new version of linked_target_file_name,
    linked_target_file_name_full_curdir, which also returns
    both the full pathname and the local directory name
    it gets from file_names.m.

    Use the new facilities in file_names.m where relevant.

    Factor out some common code.

compiler/make.program_target.m:
compiler/make.util.m:
    Use the new facilities in file_names.m where relevant.

    In make.util.m, delete the duplicate predicate definition.
2023-08-06 20:54:22 +02:00
Zoltan Somogyi
d302a4e5ca Give some predicates/constructors more meaningful names.
compiler/module_cmds.m:
    Rename the update_interface_X predicates to copy_dot_tmp_to_base_file_X,
    because

    - this better describes what they do, and
    - some of the files they are invoked on are *not* interface files.

    Add an extra parameter to copy_dot_tmp_to_base_file_report_any_error
    that specifies what kind of file is being copied, and print *that*
    as part of any error message.

    Do a similar rename of update_interface_result type, and of its
    function symbols.

    Give more meaningful names to touch_interface_datestamp and
    touch_datestamp as well.

compiler/analysis.file.m:
compiler/analysis.m:
compiler/compile_target_code.m:
compiler/export.m:
compiler/intermod.m:
compiler/make.module_target.m:
compiler/mercury_compile_front_end.m:
compiler/mercury_compile_main.m:
compiler/mercury_compile_middle_passes.m:
compiler/mlds_to_c_file.m:
compiler/recompilation.check.m:
compiler/write_module_interface_files.m:
    Conform to the changes above.
2023-08-02 04:02:24 +02:00
Zoltan Somogyi
d5c54ce697 Take ext_src out of the ext type.
compiler/file_names.m:
    Take ext_src out of the ext type, because this allows us to delete
    the I/O state pair of arguments out of every file translation predicate
    other than module_name_to_source_file_name and the ones that create
    directories.

compiler/file_kind.m:
    Delete the ext output argument of file_kind_to_extension, because
    we can't return ext_src for fk_src anymore.

compiler/write_deps_file.m:
    Delete a test for ext_src which could never succeed, because the
    predicate in question is never called with ext_src.

    Undo an accidental change from the diff that introduced
    module_name_to_lib_file_name_create_dirs.

    Conform to the changes above.

compiler/compile_target_code.m:
compiler/fact_table.m:
compiler/make.module_dep_file.m:
compiler/make.module_target.m:
compiler/make.program_target.m:
compiler/make.util.m:
compiler/mercury_compile_front_end.m:
compiler/mercury_compile_llds_back_end.m:
compiler/mercury_compile_main.m:
compiler/mercury_compile_make_hlds.m:
compiler/mlds_to_c_file.m:
compiler/mmc_analysis.m:
compiler/module_cmds.m:
compiler/read_modules.m:
compiler/recompilation.used_file.m:
compiler/write_module_interface_files.m:
    Conform to the changes above.
2023-07-06 16:14:35 +02:00
Zoltan Somogyi
89979d681a Replace Mkdir parameters with predicate versions.
compiler/file_names.m:
    Split module_name_to_file_name into three versions.

    - One corresponds to the old predicate's operation with do_not_create_dirs,
    - one corresponds to the old predicate's operation with do_create_dirs, and
    - one just returns the directory path, and lets the caller make those
      directories if it wants to, using procedures that we now export.

    Do the same for module_name_to_lib_file_name.

    Do not do the same for fact_table_file_name, which has too few callers
    to make it worthwhile.

    The point is that the versions that do not create any dirs should NOT
    need to take I/O state pairs as arguments, once we take ext_src
    out of the ext type.

compiler/compile_target_code.m:
compiler/du_type_layout.m:
compiler/export.m:
compiler/fact_table.m:
compiler/generate_dep_d_files.m:
compiler/llds_out_file.m:
compiler/make.build.m:
compiler/make.module_dep_file.m:
compiler/make.module_target.m:
compiler/make.program_target.m:
compiler/make.track_flags.m:
compiler/make.util.m:
compiler/mercury_compile_front_end.m:
compiler/mercury_compile_llds_back_end.m:
compiler/mercury_compile_main.m:
compiler/mercury_compile_make_hlds.m:
compiler/mercury_compile_middle_passes.m:
compiler/mercury_compile_mlds_back_end.m:
compiler/mlds_to_c_file.m:
compiler/mlds_to_cs_file.m:
compiler/mlds_to_java_file.m:
compiler/mmc_analysis.m:
compiler/mode_constraints.m:
compiler/module_cmds.m:
compiler/read_modules.m:
compiler/recompilation.used_file.m:
compiler/write_deps_file.m:
compiler/write_module_interface_files.m:
compiler/xml_documentation.m:
    Update calls to the affected predicates.

    In some places, add XXXs about seemingly-strange choices about
    what calls create directories and which don't.
2023-07-06 12:36:14 +02:00
Zoltan Somogyi
6517982c87 s/newext/ext/g and s/NewExt/Ext/g. 2023-07-04 22:32:38 +02:00