Estimated hours taken: 6
Branches: main
compiler/*.m:
Convert almost all the compiler modules to use . instead of __ as
the module qualifier.
In some cases, change the names of predicates and types to make them
meaningful without the module qualifier. In particular, most of the
types that used to be referred to with an "mlds__" prefix have been
changed to have a "mlds_" prefix instead of changing the prefix to
"mlds.".
There are no algorithmic changes.
Estimated hours taken: 1.5
Branches: main
Remove residual parts of the Aditi backend that weren't deleted the other day.
configure.in:
Mmake.common.in:
Remove support for enabling the Aditi backend.
runtime/mercury_aditi.h:
Remove this file.
runtime/Mmakefile:
runtime/mercury.h:
runtime/mercury_imp.h:
runtime/mercury_ho_call.[ch]:
runtime/mercury_wrapper.[ch]:
Delete support for Aditi in the runtime.
scripts/Mmake.rules:
scripts/Mmake.vars.in:
scripts/c2init.in:
scripts/parse_ml_options.sh-subr.in:
Remove mmake support for building .rlo files, etc.
util/mkinit.c:
Remove Aditi specific code.
compiler/bytecode_data.m:
compiler/closure_analysis.m:
compiler/code_model.m:
compiler/compile_target_code.m:
compiler/det_analysis.m:
compiler/handle_options.m:
compiler/hlds_goal.m:
compiler/hlds_module.m:
compiler/make.dependencies.m:
compiler/make.m:
compiler/make.module_target.m:
compiler/make.program_target.m:
compiler/make.util.m:
compiler/make_hlds_error.m:
compiler/make_hlds_passes.m:
compiler/mercury_to_mercury.m:
compiler/mlds_to_gcc.m:
compiler/modecheck_call.m:
compiler/modules.m:
compiler/opt_debug.m:
compiler/options.m:
compiler/prog_data.m:
compiler/prog_foreign.m:
compiler/prog_mode.m:
compiler/prog_type.m:
compiler/rtti.m:
compiler/rtti_out.m:
compiler/rtti_to_mlds.m:
compiler/term_errors.m:
compiler/unify_proc.m:
mdbcomp/prim_data.m:
Remove residual support for Aditi.
library/ops.m:
Remove the 'aditi_bottom_up' and 'aditi_top_down' operators from the
ops table.
doc/reference_manual.texi:
doc/user_guide.texi:
Delete the sections on the Aditi interface.
extras/aditi/*:
Delete this.
Estimated hours taken: 3.5
Branches: main
Split the parse tree (currently defined in prog_data.m) into two
separate modules. The reason for doing this is that while over 80%
of the modules in the compiler import prog_data, very few of them actually
require access to the types that define the parse tree (principally
the item type). At the moment even small changes to these types can
result in recompiles that rebuild almost all of the compiler. This change
shifts the item type (and related types) into a new module, prog_item,
that is only imported where these types are required (mostly at the
frontend of the compiler). This should reduce the size of recompiles
required when the parse tree is modified.
This diff does not change any algorithms; it just shifts things around.
compiler/prog_data.m:
Move the item type and any related types that are not needed
after the HLDS has been built to the new prog_item module.
Fix bitrot in comments.
Fix formatting and layout of comments.
Use unexpected/2 in place of error/1 in a spot.
compiler/prog_item.m:
New file. This module contains any parts of the parse tree
that are not needed by the rest of the compiler after the
HLDS has been built.
compiler/check_typeclass.m:
s/list(instance_method)/instance_methods/
compiler/equiv_type.m:
compiler/hlds_module.m:
compiler/intermod.m:
compiler/make.module_dep_file.m:
compiler/make_hlds.m:
compiler/mercury_compile.m:
compiler/mercury_to_mercury.m:
compiler/module_qual.m:
compiler/modules.m:
compiler/parse_tree.m:
compiler/prog_io.m:
compiler/prog_io_dcg.m:
compiler/prog_io_goal.m:
compiler/prog_io_pragma.m:
compiler/prog_io_typeclass.m:
compiler/prog_io_util.m:
compiler/prog_out.m:
compiler/prog_util.m:
compiler/recompilation.check.m:
compiler/recompilation.usage.m:
compiler/recompilation.version.m:
compiler/trans_opt.m:
Conform to the above changes.
compiler/notes/compiler_design.html:
Mention the new module.
Estimated hours taken: 0.2
Branches: main
compiler/llds_out.m:
Don't print out any given piece of foreign declaration code more than
once. With intermodule inlining, the redundant foreign_import_modules
the front end generates lead to the .mh files of library modules being
printed literally dozens of times.
It would be nice to avoid redundant foreign_import_modules in the first
place, but that is harder to do.
compiler/prog_foreign.m:
Convert to four space indentation, add field names.
Estimated hours taken: 1
Branches: main
Break the cycle in the package dependency graph between the
hlds and backend_libs packages by moving yet more of the
contents of the foreign module into the new prog_foreign
module. There are no changes to any code other than
moving it around.
compiler/foreign.m:
compiler/prog_foreign.m:
Shift most of the types related to the foreign language
interface into the latter module.
Fix a typo in a comment at the beginning of prog_foreign.m.
Clean up the formatting of comments in foreign.m.
compiler/hlds.m:
Update the comment about why the transform_hlds package
is imported here.
compiler/*.m:
Minor changes caused by the above.
Estimated hours taken: 3.5
Branches: main
Simplify the structure of the compiler by removing the cycle
parse_tree -> backend_libs -> check_hlds -> parse_tree
from the package dependency graph.
I've done this by factoring out the code in backend_libs.foreign
and backend_libs.name_mangle that is needed by the frontend of
the compiler and putting it in a new module, parse_tree.prog_foreign.
This removes the dependency between the parse_tree and backend_libs
packages.
The obvious downside to this is that the name mangler is now
split in two, although such a division was always in implicit
in the predicates of the name_mangle module anyway, ie. between
those bits that operate on the HLDS/MLDS/LLDS level data structures
and those that don't.
compiler/name_mangle.m:
compiler/foreign.m:
compiler/prog_foreign.m:
Move code for dealing with foreign language procedures that
is required by the parse_tree package into a new module,
prog_foreign.
Update the formatting in some of these modules so that
they match our current coding standard.
compiler/*.m:
Update to reflect the above change.
compiler/notes/compiler_design.html:
Include the new module.
Fix some spelling errors.