[m-rev.] for review: split up higher_order.m

Julien Fischer jfischer at opturion.com
Wed Feb 21 20:23:09 AEDT 2024


On Wed, 21 Feb 2024, Zoltan Somogyi wrote:

> Split higher_order.m into four submodules.
> 
> This diff only moves code around. There are no algorithmic changes,
> apart from the change to check_module_interface.m.
> 
> compiler/higher_order.m:
>     Replace all the code in this module with include_module declarations
>     for the following four new submodules, which together contain its
>     previous contents.
> 
> compiler/higher_order.specialize_in_module.m:
>     The top level part of the old higher_order.m.
> 
> compiler/higher_order.specialize_calls.m:
>     The part of the old higher_order.m that mostly scans procedure bodies
>     looking for operations (usually calls) to optimize.
> 
> compiler/higher_order.make_specialized_preds.m:
>     The part of the old higher_order.m that mostly constructs the definitions
>     of the specialized predicates and functions.
>
>     The above "mostly"s are there because the lines of responsibility in the
>     existing code are neither all that clear, nor are they documented. :-(
> 
> compiler/higher_order.higher_order_global_info.m:
>     The part of the old higher_order.m that defines the data structures
>     shared by the above three modules, as well as some operations
>     on (parts of) those data structures that are needed in more than one
>     of the modules above.
> 
> compiler/Mercury.options:
>     Disable a warning we would get for the new higher_order.m, which contains
>     just a single import_module declaration in its interface.
> 
> compiler/check_module_interface.m:
>     Change the test for the "this module exports nothing" warning, so that
>     future compiler versions won't generate a warning for module that
>     includes more than one submodule, even if only one is exported.
> 
> compiler/mercury_compile_middle_passes.m:
>     Conform to the changes above.
> 
> compiler/notes/compiler_design.html:
>     Document the new modules.

That's fine.

Julien.


More information about the reviews mailing list