scripts/mgnuc.in:
Delete the unused variables AS, AS_OPTS, HLD_OPTS and ARG_OPTS.
The first two are hstorical relics, HLD_OPTS lost its raison d'etre
when we deleted the hl grades; I don't know what we used ARG_OPTS for.
Make the unused variable CFLAGS_FOR_ANSI used.
Fix a spelling inconsistency: DEBUG_OPT vs DEBUG_OPTS.
scripts/ml.in:
Delete the unused variables NONSHARED_LIB_DIR and DL_LIBRARY.
scripts/parse_grade_options.sh-subr:
Fix typos that prevented an almost-never-used option from working.
scripts/parse_ml_options.sh-subr.in:
Fix a quoting error.
tools/bootcheck:
Comment out the definition of an unused variable. (Its parallel
exists and is used in c2init.in, which is why it is not deleted.)
Fix typos in spelling SSDB_LIB_NAME.
Quote a variable value that may contain spaces.
Replace "cat file | cmd" with "cmd < file".
As we discussed, it has fallen into disuse. Its main purpose was to
pave the way for the .net backend and later for the java and csharp grades.
Now that the .net backend is ancient history and the java and csharp grades
are established, that purpose is gone, and for every other purpose,
hlc is better because it is simpler and faster.
compiler/options.m:
Delete the --high-level-data option. It is no longer needed,
bacause the data representation scheme is now a direct function
of the target language.
doc/user_guide.texi:
Delete references to the --high-level-data option.
NEWS:
Mention that --high-level-data is no longer supported.
compiler/compute_grade.m:
Delete references to the hl grade component, and conform
to the deletion of the --high-level-data option.
compiler/compile_target_code.m:
Give some predicates more meaningful names, and conform to the
deletion of the --high-level-data option.
compiler/const_struct.m:
compiler/du_type_layout.m:
compiler/globals.m:
compiler/handle_options.m:
compiler/lco.m:
compiler/mercury_compile_main.m:
compiler/ml_gen_info.m:
compiler/ml_type_gen.m:
compiler/ml_unify_gen_construct.m:
compiler/mlds_to_c_data.m:
compiler/mlds_to_c_func.m:
compiler/mlds_to_c_type.m:
compiler/mlds_to_c_util.m:
Conform to the deletion of the --high-level-data option.
grade_lib/grade_spec.m:
grade_lib/grade_vars.m:
Delete the datarep solver variable, since the data representation
is now a direct function of the target language.
Delete the requirements involving the deleted solver variable.
grade_lib/grade_structure.m:
Delete the datarep component of the representation of MLDS C grades,
since its value would now be fixed.
grade_lib/grade_solver.m:
grade_lib/grade_string.m:
grade_lib/try_all_grade_structs.m:
grade_lib/var_value_names.m:
Conform to the changes above.
grade_lib/Mmakefile:
Link the grade library's test programs statically, like we do
the executables in the other directories.
library/io.m:
library/robdd.m:
library/rtti_implementation.m:
runtime/mercury_conf_param.h:
runtime/mercury_grade.h:
runtime/mercury_hlc_types.h:
Remove references to MR_HIGHLEVEL_DATA, as well as any code
that was guarded by #ifdef MR_HIGHLEVEL_DATA.
scripts/Mmake.vars.in:
scripts/canonical_grade.sh-subr:
scripts/final_grade_options.sh-subr:
scripts/init_grade_options.sh-subr:
scripts/mgnuc.in:
scripts/mgnuc_file_opts.sh-subr:
scripts/mmake.in:
scripts/mmc.in:
scripts/mtc:
scripts/parse_grade_options.sh-subr:
scripts/parse_ml_options.sh-subr.in:
Remove references to --high-level-data options.
In canonical_grade.sh-subr, compute the base grade more directly.
Remove a few left-over references to the assembler backend.
Add or fix vim modelines where relevant.
Fix inconsistent indentation.
Add missing ;;s in case statements.
Switch to using ${var} references instead of just $var.
tests/invalid/Mercury.options:
Make the test_feature_set test case run in grade java instead of hl.gc.
tests/invalid/test_feature_set.err_exp:
Update the expected out for the grade change.
doc/make_manpage:
Replace the old script with a new version written in awk.
The new output should be an improvement in these ways:
- works for tools that use spaces for indentation instead of tabs
- uses macros for indenting proportional font text
instead of monospace text with inconsistent leading spaces
- option names are in bold
- removes redundant blank lines
doc/Mmakefile:
Adjust command line to call the new make_manpage script.
compiler/options.m:
Minor formatting changes to --help text to keep complexity of
make_manpage script low.
profiler/mercury_profile.m:
Add "Name:" line to --help output for make_manpage to read.
scripts/mtags.in:
Add "Name:" line to --help output for make_manpage to read.
Delete initial blank line in help and usage text.
Delete stray full stop.
scripts/mprof_merge_runs:
scripts/parse_ml_options.sh-subr.in:
Simplify --help text for make_manpage.
Branches: main, 11.07
Fix another problem with --with-mscvrt.
scripts/ml.in:
The single-threaded version of the Microsoft C library is
no longer available. Only the multi-threaded one is used by
Visual Studio 2005 onwards.
scripts/parse_ml_options.sh-subr.in:
Update a comment regarding gcc's -s option on Mac OS X.
Branches: main, 11.07
Various fixes for MSVC.
configure.in:
Use -link instead of /link with MSVC since the latter
form causes trouble for MSYS.
scripts/ml.in:
As above, but for the -DEBUG option.
scripts/parse_ml_options.sh-subr.in:
Don't strip executables on MinGW for the moment.
(XXX We should re-enable this for the MinGW / GCC
combination and probably also check what the current
situation on Cygwin and Darwin is.)
library/store.m:
Shut up a warning from MSVC about a local variable
that is used without being initialised.
Branches: main, 10.04
Avoid another problem with expr on FreeBSD.
scripts/parse_ml_options.sh-subr.in:
Avoid invoking expr with a first argument that has a leading
minus sign.
Estimated hours taken: 6
Branches: main
Fix a bug that prevented the compiler from bootstrapping in deep profiling
grades. The symptom was the violation of a sanity check in
mercury_deep_profiling.c, which lead to this message:
Mercury runtime: UNWRITTEN nodes: Deep.data file corrupted
Mmake.workspace:
Don't include the ssdb library's init file unconditionally in every
_init.c file we generate; instead include the ssdb library's init file
only in ssdb grades.
The reason why this is needed is that the referenced but unwritten
nodes were the proc layouts of three predicates in the browser
directory. They were not written because the browser library's init
file is (correctly) included in the compiler's _init.c file only if
the browser library is linked into the compiler, i.e. only if the
compiler is compiled in a debug grade. They were referenced by call
site static structures from ssdb/ssdb.m, whose init file was
(incorrectly) being included in the compiler's _init.c file even if
the compiler wasn't being compiled in an ssdb grade.
scripts/parse_ml_options.sh-subr.in:
Add the option needed by Mmake.workspace to add an init file only in an
ssdb grade: --ssdb-init-file.
scripts/c2init.in:
Act on the value of that option.
Delete a reference to $TRACE_INIT_FILES, since it should always be
empty. Document a similar problem with $EXTRA_INIT_FILES.
Mmakefile:
Improve formatting.
compiler/layout_out.m:
Avoid inconsistent indentation in the generated .c code.
tools/bootcheck:
Add two options that helped track down the bug: --deep-all-write,
which causes bootcheck to write out *every*deep profiling data file,
and --deep-debug, which switches on the already existing deep profiling
debug support.
runtime/mercury_deep_profiling.c:
Put the two lines of the error message we generate for unwritten nodes
if deep profiling's debug support is enabled in the logical order.
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: 0.25
Branches: main, release
Demangling hangs under cygwin, so disable it under
cygwin.
configure.in:
scripts/parse_ml_options.sh-subr.in:
Disable demangling under cygwin.
Estimated hours taken: 2
Branches: main
util/mkinit.c:
Provide a mechanism that allows the user to specify that a certain
function should always be executed on Mercury startup. This is intended
to be used to initialize global variables that point to Mercury data.
This is useful e.g. in constraint solvers, because it removes the need
for the solver to check, on every access to its state, whether it has
been initialized yet.
scripts/parse_ml_options-sh-subr.in:
scripts/c2init.in:
Pass along the required option to mkinit.
scripts/Mmakefile:
Provide a mechanism to automatically rebuild c2init and other
configured files when ../config.status changes.
Estimated hours taken: weeks
Branches: main
Implement a mechanism to generate the information required to determine the
algorithmic complexity of selected procedures.
The basis of the mechanism is a program transformation that wraps up the body
of each selected procedure in code that detects top-level (non-recursive)
calls, and for each top-level call, records the sizes of the input arguments
and information about the cost of the call. For now, the cost information
consists only of the number of cells and words allocated during the call,
but there is provision for later adding information from a real-time clock.
compiler/complexity.m:
A new module containing the new transformation.
compiler/transform_hlds.m:
Add complexity.m to the list of submodules.
compiler/mercury_compile.m:
Invoke the new module.
compiler/notes/compiler_design.html:
Mention the new module.
compiler/options.m:
Add an option, --experimental-complexity. Its argument is a filename
that specifies the list of procedures to transform.
Add an option, --no-allow-inlining, to disallow all inlining.
This is simpler to use than specifying several options to turn off
each potential reason to inline procedures.
doc/user_guide.texi:
Document the new options. The documentation present now is only a
shell; it will be expanded later.
compiler/table_gen.m:
compiler/goal_util.m:
Move the predicate for creating renamings from table_gen.m to
goal_util.m, since complexity.m also needs it now. In the process,
make it more general by allowing outputs to have more complex modes
than simply `out'.
compiler/goal_util.m:
Fix a bug exposed by the new transformation: when renaming goals
(e.g. for quantification), rename the variables holding information
about term sizes.
compiler/handle_options.m:
Disable inlining if experimental complexity analysis is enabled.
compiler/compile_target_code.m:
Pass the --experimental-complexity option on to the linker.
library/term_size_prof_builtin.m:
Add the Mercury predicates that serve as interfaces to the primitives
needed by the experimental complexity transformation.
runtime/mercury_term_size.[ch]:
Add the implementations of the primitives needed by the experimental
complexity transformation.
runtime/mercury_wrapper.[ch]:
Add global variables holding counters of the numbers of words and cells
allocated so far.
runtime/mercury_heap.h:
Update these global variables when allocating memory.
runtime/mercury_complexity.h:
New file that contains the definition of the data structures holding
the data collected by the experimental complexity transformation.
This is separate from mercury_term_size.h, because it needs to be
#included in mercury_init.h, the header file of the mkinit-generated
<program>_init.c files.
runtime/mercury_init.h:
runtime/mercury_imp.h:
#include mercury_complexity.h.
util/mkinit.c:
Define and initialize the data structures holding complexity
information when given the -X option (mkinit doesn't have long
options).
Fix some deviations from our coding style.
scripts/parse_ml_options.sh-subr.in:
Accept the --experiment-complexity option.
scripts/c2init.in:
Pass the --experiment-complexity option on to mkinit.c.
tools/bootcheck:
Preserve the files containing the results of complexity analysis,
if they exist.
tools/makebatch:
Allow the specification of EXTRA_MLFLAGS in the generated
Mmake.stage.params files.
Estimated hours taken: 1
Branches: main
scripts/parse_ml_options.in:
scripts/ml.in:
Add an option, --print-map, that allows the user to request the linker
to generate information that can be used to diagnose link problems.
Estimated hours taken: 0.5
Branches: main
Clean up the handling of environment variables.
scripts/Mmake.rules:
scripts/c2init.in:
scripts/mgnuc.in:
scripts/ml.in:
scripts/mmc.in:
scripts/parse_ml_options.sh-subr.in:
scripts/binary_step.in:
Remove support for the environment variables which were
previously used to override the location of the standard
library (MERCURY_ALL_C_INCL_DIRS, MERCURY_ALL_MC_C_INCL_DIRS,
MERCURY_INT_DIR, MERCURY_C_LIB_DIR, MERCURY_MOD_LIB_MODS,
MERCURY_TRACE_LIB_MODS).
scripts/Mercury.config.in:
Fix syntax errors.
Set the DEFAULT_MERCURY_LINKAGE variable here rather
than in the mmc script.
scripts/mmc.in:
Setting DEFAULT_MCFLAGS is no longer required -- mmc
now reads its configuration information from the
Mercury.config file. This also fixes a bug which
caused failures in the `mmc --make' tests in
debugging grades on mundroo -- `mmc --make' wasn't
including /usr/local/lib and /usr/local/include in
the search paths for libraries and headers.
configure.in:
Check that the installed compiler is capable of
reading the Mercury.config file.
Bootstrap tag: bootstrap_20030413_read_config_file.
NEWS:
doc/user_guide.texi:
Document the change.
Estimated hours taken: 20
Branches: main
Allow reconfiguration of existing installations, for example
to use a different C compiler. The reconfiguration works
by making a new copy of the scripts and mercury_conf.h,
and storing them in a partial installation directory tree
which uses the libraries and executables from the existing
installation.
Use this method to configure binary distributions, rather
than using a cut down version of the configuration script,
to avoid code duplication and to handle the case where the
C compiler in use on the installation machine is different
than that used to build the binary distribution.
This is more robust than the previous method of using a different
C compiler, which was to set the MERCURY_C_COMPILER variable and
hope the different C compilers were compatible enough.
Mmakefile:
runtime/Mmakefile:
scripts/Mmakefile:
Modify the `install' targets to store files needed to create
a new configuration in $INSTALL_LIBDIR/reconf.
runtime/Mmakefile:
Install mercury_conf.h in $INSTALL_LIBDIR/conf, rather than
$INSTALL_LIBDIR/inc, so that it can be overridden by a
different configuration.
scripts/mercury_config.in:
Create a new configuration, by creating part of a Mercury
source tree from the files stored in $INSTALL_LIBDIR/reconf,
running configure, then copying the files into a partial
installation tree.
scripts/Mmake.vars.in:
Define ENABLE_DEEP_PROFILER, for use by bindist/bindist.Makefile.
Define variables INSTALL_CONF_DIR (contains the files describing
the configuration) and INSTALL_RECONF_DIR (contains files needed
to reconfigure an installation).
configure.in:
Add an option `--enable-reconfigure', for use by
mercury_config.in.
Don't look for runtime/mercury_wrapper.c when checking
for the sources -- it isn't present when reconfiguring.
Look for scripts/mmc.in instead.
Look for the runtime headers in the installation hierarchy
rather than the `runtime/' and `trace/' directories when
reconfiguring.
Output the help message for the `configure' script to
`configure.help'. This is included in the help message
for `mercury_config'.
Add new configuration variables CONFIG_PREFIX and CONFIG_LIBDIR,
which are like PREFIX and LIBDIR except that they point
to the configuration files, not the library files.
In the normal case PREFIX and CONFIG_PREFIX will be the same.
bindist/bindist.INSTALL.in:
bindist/bindist.Makefile.in:
Use mercury_config to configure binary distributions.
bindist/Mmakefile:
bindist/bindist.configure.in:
bindist/bindist.build_vars.in:
Remove bindist.configure.in and bindist.build_vars.in.
compiler/options.m:
scripts/parse_ml_options.sh-subr.in:
scripts/mgnuc.in:
doc/user_guide.texi:
Add an option `--mercury-config-dir', and an environment
variable MERCURY_CONFIG_DIR, which tell the compiler and
scripts where to find the configuration files for the
installation.
MERCURY_CONFIG_DIR is not documented because it should
only be used by the scripts.
compiler/compile_target_code.m:
Pass `--mercury-config-dir' to the scripts.
compiler/handle_options.m:
Add `--c-include-directory $MERCURY_CONFIG_DIR/conf'.
library/getopt.m:
Handle `maybe_string_special' options.
doc/user_guide.texi:
Update the "Using a different C compiler" chapter.
NEWS:
Document the changes.
Estimated hours taken: 6
Branches: main
Allow alternative locations for the standard library files
to be specified using options to the various Mercury scripts
rather than environment variables. This change is necessary
to allow the compiler to be compiled using `mmc --make', because
`mmc --make' does not support the environment variables.
All of the Mercury scripts now accept an option
`--mercury-standard-library-directory' to specify the installed
library to use, or `--no-mercury-standard-library-directory' to
disable the use of the installed library. The location
of the alternate files to use can then be specified
using ordinary options to the scripts.
There is a new environment variable MERCURY_STDLIB_DIR, which has
the same effect as the `--mercury-standard-library-directory' option.
scripts/parse_ml_options.sh-subr.in:
scripts/mgnuc.in:
scripts/mmc.in:
scripts/mmake.in:
scripts/Mmake.vars.in:
scripts/Mmake.rules:
Handle MERCURY_STDLIB_DIR and `--mercury-standard-library-directory'.
Remove support for the MERCURY_C_INCL_DIR, MERCURY_MOD_LIB_DIRS
and MERCURY_TRACE_LIB_DIRS environment variables -- they aren't
used anywhere. MERCURY_C_INCL_DIR is being removed because the
assumption it makes (that all header files are installed into
a single directory) will not hold for much longer because the
generated header files for hl* grades are grade dependent.
compiler/options.m:
compiler/compile_target_code.m:
Add an option `--trace-init-file', used to specify `.init'
files which should only be used when tracing is enabled,
such as browser/mer_browse.init.
Allow `--mercury-stdlib-dir' as an abbreviation for
`--mercury-standard-library-directory'.
tools/lmc:
Use options rather than environment variables.
doc/user_guide.texi:
Document MERCURY_STDLIB_DIR, MERCURY_TRACE_LIB_MODS
and the `--trace-init-file' mmc option.
Remove documentation for the no longer used MERCURY_C_INCL_DIR,
MERCURY_MOD_LIB_DIRS, MERCURY_TRACE_LIB_DIRS and
MERCURY_NC_BUILTIN environment variables.
Estimated hours taken: 0.5
Fix Mmake's handling of linker options.
scripts/Mmake.vars.in:
Add Mmake variables LDFLAGS, used for linker flags for
executables, and LD_LIBFLAGS, used for linker flags for
shared libraries. The separate variables are need because
on some architectures `ml' invokes the C compiler, but
`ml --make-shared-lib' invokes the linker directly.
Put `--' before CFLAGS in the construction of ALL_MGNUCFLAGS
to avoid confusion between C compiler options and mgnuc
options.
compiler/modules.m:
Pass LDFLAGS and LD_LIBFLAGS to ml.
doc/user_guide.texi:
Document CFLAGS, LDFLAGS and LD_LIBFLAGS.
scripts/parse_ml_options.sh_subr.in:
scripts/ml.in:
Define options `--print-link-command' and
`--print-shared-lib-link-command', which print
the commands ml uses to link executables and
shared libraries.
Estimated hours taken: 1.5
Branches: main
Allow Mercury runtime options to be set at compile time.
scripts/parse_ml_options.sh-subr.in:
Add an initialization option `--runtime-flags'.
runtime/mercury_wrapper.h:
Add a global variable MR_runtime_flags.
util/mkinit.c:
Set MR_runtime_flags.
runtime/mercury_wrapper.c:
Add the value of MR_runtime_flags to the dummy
command line passed to getopt().
tests/hard_coded/Mmakefile:
Use `--runtime-flags' rather than MERCURY_OPTIONS.
Estimated hours taken: 1
Branches: main
Combine the options for ml and c2init. Once mmake has been
altered to pass MLFLAGS to c2init users will be able to
mostly ignore the existence of c2init.
This change requires an installed compiler which uses `--init-c-file'
rather than `-o' to name c2init's output file. This is difficult to
test for in configure.in.
Bootstrap CVS tag: bootstrap_20011203_init_c_file_c2init_option
scripts/parse_ml_options.sh-subr.in:
Parse the combined options for ml and c2init.
The `-o' and `--output' options for c2init have been removed
(`-o' conflicts with a linker option), use `--init-c-file' instead.
configure.in:
Add parse_ml_options.sh-subr.in to the list of files to substitute.
scripts/ml.in:
scripts/c2init.in:
Include parse_ml_options.sh-subr.
scripts/Mmakefile:
ml and c2init depend on parse_ml_options.sh-subr.