Estimated hours taken: 3
Prefix everything defined in runtime/mercury_{stacks,tags}.h MR_.
In the process, get rid of the grade component MR_DEBUG_NONDET_STACK,
since this makes the update to mercury_stacks.h simpler and its use is
long obsolete.
runtime/mercury_tags.h:
Put MR_ prefixes in front of everything defined here.
runtime/mercury_stacks.h:
Put MR_ prefixes in front of everything defined here.
Remove support for MR_DEBUG_NONDET_STACK. Replace most of the
lost functionality by calling an updated mkframe_msg.
Remove the definitions of push() and pop(). Their use conflicts with
the idea that everything on the det stack is part of a frame, which
the RTTI stuff depends on.
runtime/mercury_bootstrap.h:
Add backward compatibility macros for the old names in the above two
files.
Remove some old entries in this file which are no longer needed.
runtime/mercury_wrapper.c:
Remove the only uses of push() and pop().
Put MR_ in front of some things that need them.
runtime/mercury_engine.c:
Put MR_ in front of some things that need them.
runtime/mercury_misc.[ch]:
Make mkframe_msg get the name of the procedure that owns the stack
frame from an explicitly passed argument, rather than the prednm slot
(which no longer exists). This actually improves low-level debugging
support without MR_DEBUG_NONDET_STACK.
Remove unnecessary return statements.
runtime/mercury_debug.h:
Pass on the new arg of mkframe_msg.
Fix long lines.
runtime/mercury_conf_param.h:
Remove the documentation of MR_DEBUG_NONDET_STACK.
runtime/mercury_grade.h:
Remove the grade component of MR_DEBUG_NONDET_STACK.
doc/reference_manual.texi:
Document the MR_ prefixed versions of list_empty, list_cons etc.
library/io.m:
library/std_util.m:
library/string.m:
Add prefixes to some references to the runtime.
Estimated hours taken: 0.25
(+ lots of work to find the bug in the first place).
extras/graphics/mercury_tcltk/HOWTO:
Document the need to link with a version of libgc that was
compiled with `-DALL_INTERIOR_POINTERS'.
Estimated hours taken: 0.25
extras/exceptions/exception.m:
extras/clpr/cfloat.m:
Rename base_type* as type_ctor*, using Tyson's sed script,
to match Tyson's changes to runtime/* and elsewhere.
Estimated hours taken: 16
extras/README:
extras/lazy_evaluation/README:
Document the stuff in this new directory.
extras/lazy_evaluation/lazy.m:
New module for lazy evaluation.
extras/lazy_evaluation/lazy_list.m:
extras/lazy_evaluation/lazy_list_test.m:
A demo of using lazy lists.
Estimated hours taken: 8
Add support for exceptions to the debugger, and
add support for debugging to the exception module.
browser/debugger_interface.m:
Add `exception' to the trace_port_type enumeration.
runtime/mercury_trace_base.h:
Add MR_PORT_EXCEPTION to the MR_Trace_Port enumeration.
trace/mercury_trace_internal.c:
trace/mercury_trace.h:
trace/mercury_trace.c:
Modify the code to handle MR_PORT_EXCEPTION.
extras/exceptions/exception.m:
- Define stack layout structures for the hand-written procedures
`builtin_throw' and `builtin_catch'.
- Use mktempframe() rather than mkframe() to allocate the temporary
frames used to prevent hijacking of the exception-catching frame
(this is more efficient, and avoids the need to give a stack
layout for those frames).
- Change the code for builtin_throw/1 so that if MR_trace_enabled
is true, it calls a new function trace_throw(), which calls
MR_trace(..., MR_PORT_EXCEPTION, ...) for each stack frame.
- Fix some type errors occurring for non-GC grades.
- Fix some uses of obsolete names (e.g. replace `hp' with `MR_hp').
runtime/mercury_trace_base.c:
compiler/trace.m:
Add some comments relating to the above changes.
Estimated hours taken: 0.1
(Note: the actual time taken for this is included in the time
taken for the compiler part of the interface, committed earlier today).
extras/aditi/aditi.m:
The C code part of the Aditi interface.
extras/aditi/LIMITATIONS:
Document some missing features.
Estimated hours taken: 5
extras/dynamic_linking/dl.m:
New module, containing support for dynamic linking
(i.e. a binding to dlopen(), dlsym(), and dlclose()).
extras/dynamic_linking/name_mangle.m:
New module, containing a representation for Mercury procedure
specifiers and a function for mangling them into symbol names.
extras/dynamic_linking/dl_test.m:
extras/dynamic_linking/dl_test.exp:
extras/dynamic_linking/hello.m:
A test case (and sample program) for the use of dynamic linking.
extras/dynamic_linking/README:
A brief README file describing the files in this directory.
extras/dynamic_linking/Mmakefile:
A simple Mmakefile to build it all and test it.
NEWS:
Mention the new dynamic linking support.
compiler/llds_out.m:
Add some comments warning about code duplication
between the code here and that in extras/dynamic_linking/name_mangle.m
(and also profiler/demangle.m and util/mdemangle.c).
Estimated hours taken: 0.25
extras/odbc/odbc.m:
Update the reference to the paper on database transactions
to include the published version, and to include the URL of
the cover page of the tech report.
Estimated hours taken: 0.25
extras/complex_numbers/samples/fft.m:
Fix a compilation error: need to import the
parent module `complex_numbers' before importing
the child module `complex_numbers:complex'.
Estimated hours taken: 1
Fix various gcc warnings.
library/std_util.m:
library/benchmarking.m:
extras/trailed_update/tests/func_trail_test.m:
extras/trailed_update/tests/func_trail_test_2.m:
Add some casts -- without these, the code might not compile
with compilers other than gcc.
library/private_builtin.m:
Avoid the use of nested extern declarations, by moving
the declarations out of the enclosing function.
runtime/mercury_array_macros.h:
Initialize `element' in MR_bsearch().
Without this, gcc reports lots of spurious warnings when
compiling trace/*.c.
Estimated hours taken: 1
Fix a few problems in the Mercury cgi library.
extras/cgi/cgi.m:
Add cgi__maybe_get_form which processes forms
if they are called using POST, otherwise it will return "no".
This allows the form to handle the error itself, perhaps
by giving the input form.
Also fix a bug in printing the error message -- the
content type must be set even for error messages.
Estimated hours taken: 0.5
extras/README:
Update the README file to accurately describe the directory.
samples/maze/globals.m:
Add the copyright message.
Estimated hours taken: 3
samples/calc/Mmakefile:
samples/maze/Mmakefile:
samples/maze/globals.m:
samples/maze/maze.m:
Clean up samples to use the library versions of the graphics
packages.
Estimated hours taken: 1
Various changes to the README files, in preparation for the next release.
.README.in:
Update version numbers and copyright dates.
Update the list of README.* files.
README.HPUX:
New file.
README.AIX:
Update to reflect recent bug fix.
README.Linux:
Delete an obsolete patch at the end of this file;
the text describing this patch had been removed already.
README.MS-Windows:
Mention that we haven't tested it on Windows 98.
NEWS:
We've updated to Boehm GC version 4.13alpha2.
extras/README:
Add descriptions of each subdirectory.
Estimated hours taken: 80
Add support for exception handling, in extras/exceptions.
extras/exceptions/README:
Describes the files in this directory.
extras/exceptions/exception.m:
Contains the exception handling interface and implementation.
extras/exceptions/test_exceptions.m:
extras/exceptions/test_exceptions.exp:
extras/exceptions/test_uncaught_exception.m:
extras/exceptions/test_uncaught_exception.exp:
extras/exceptions/test_exceptions_func.m:
extras/exceptions/test_exceptions_func.exp:
Test cases.
extras/exceptions/Mmakefile:
The Mmakefile for building and running the test cases.
Estimated hours taken: 70 (plus whatever pets spent when he wrote the
original version of this)
This change adds a new extras directory, "references". This directory
contains two impure reference type modules and a module that allows scoped
non-backtrackable update, along with examples of using them and tests.
These modules are intended to be useful when HAL is retargetted to Mercury,
for implementing global variables (backtracking and non-backtracking), and
may also be useful for the debugger.
In order to implement these features, a new memory zone "global heap" was
added to the runtime system, for a heap which is not reclaimed on failure,
along with a pair of functions for copying terms to this heap.
runtime/mercury_deep_copy.c:
runtime/mercury_deep_copy.h:
Added two functions, MR_make_permanent() and
MR_make_partially_permanent(), which essentially do a deep copy of a
term to the global heap.
(In conservative GC grades, these functions actually do nothing).
runtime/mercury_engine.c:
runtime/mercury_engine.h:
Added fields global_heap_zone and e_global_hp (for the global heap
and its heap pointer) to the MR_mercury_engine_struct, along with
appropriate initialisation, etc.
Defined MR_heap_zone, MR_solutions_heap_zone, and
MR_global_heap_zone for convenient access to the corresponding field
of the relevant Mercury engine.
runtime/mercury_memory.c:
Added code for handling the size and zone size of the global heap.
runtime/mercury_regorder.h:
runtime/mercury_regs.h:
Defined MR_global_hp (the global heap pointer for general use),
along with corresponding other changes.
runtime/mercury_wrapper.c:
runtime/mercury_wrapper.h:
Added declarations and initialisation of the size and zone_size of
the global_heap.
Added an entry for MR_GLOBAL_HP_RN to print_register_usage_counts()
(plus missing entries for MR_SOL_HP_RN, MR_MIN_HP_REC and
MR_MIN_SOL_HP_REC).
New files:
extras/references/Mmakefile:
Mmakefile for building and testing these modules.
extras/references/README:
Description of contents of this directory.
extras/references/global.m:
A wrapper module for building a library containing the nb_reference,
reference and scoped_update modules.
extras/references/nb_reference.m:
Implements references which are not backtracked on failure.
extras/references/reference.m:
Implements references which *are* backtracked on failure.
extras/references/scoped_update.m:
Allows nested scoping of non-backtracking references.
extras/references/samples/Mmakefile:
extras/references/samples/max_of.m:
extras/references/samples/max_test.exp:
extras/references/samples/max_test.m:
An example of using a non-backtracking reference (to find the
maximum of the solutions generated by a predicate), with tests.
extras/references/tests/Mmakefile:
extras/references/tests/ref_test.exp:
extras/references/tests/ref_test.m:
Some tests of references (backtracking and non-backtracking) and
scoping.
Estimated hours taken: 0.25
extras/trailed_update/Mmakefile:
Add rules for `mmake clean' and `mmake realclean'
which invoke the respective targets in the subdirectories.
This should hopefully avoid some failures in the
trailed_update/tests subdirectory caught by the nightly test
script that were due to trying to rebuild in a different grade
without having done `mmake clean' in that subdirectory.
Estimated hours taken: 12
Bug fixes.
tests/term/arit_exp.m still fails with --intermodule-optimization
due to a slightly different (but correct) trans_opt file being produced.
compiler/simplify.m
Don't produce singleton disjunctions, since the code generator
barfs on them. Use a `some' instead.
Test case: tests/general/partition.m compiled with --deforestation.
compiler/unused_args.m
Deconstructions where the arguments included `any' insts were
not being handled correctly, due to inst_matches_binding
failing for any->any.
Test case: extras/trailed_update/samples/vqueens.m at -O3.
Don't warn about predicates from `.opt' files having unused
arguments, because in most cases the warning will be generated
when compiling the imported module.
compiler/higher_order.m
Fix a bug that caused compiler/modules.m to be miscompiled at
-O3 --intermodule-optimization, due to curried arguments for
multiple known higher-order arguments being passed to a
specialised version in the wrong order.
Test case: tests/hard_coded/ho_order2.m
compiler/mercury_compile.m
Call intermod__update_pred_import_status when compiling to
C at the same stage of the compilation as the `.opt' file
was written to ensure that the same information is being used.
Test case: tests/hard_coded/rational_test.m compiled with
--intermodule-optimization failed because of a link error.
Make sure polymorphism has been run before doing unused argument
checking with --errorcheck-only. Otherwise the argument indices
read in from `.opt' files are incorrect.
compiler/intermod.m
Use code_util__compiler_generated to test if a called predicate
is compiler generated, rather than looking for a call_unify_context
(function calls have a call_unify_context).
Add a progress message for updating the import status of predicates
exported to `.opt' files.
Fix a bug where the unused_args pragmas read in from the current
module's `.opt' file were given an import_status of `imported' rather
than `opt_imported' resulting in an error message from make_hlds.m.
compiler/dead_proc_elim.m
Ensure that predicates used by instance declarations and
`:- pragma export's are not eliminated by the dead_pred_elim
pass before typechecking.
Test case: most of the typeclass tests compiled with
--intermodule-optimization.
compiler/hlds_goal.m
Remove obsolete comments about the modes of a higher-order
unification being incorrect after polymorphism, since that
was fixed months ago.
compiler/options.m
Reenable deforestation.
Enable --intermodule-optimization and --intermod-unused-args
at -O5 so they get tested occasionally.
compiler/handle_options.m
Disable deforestation if --typeinfo-liveness is set, since
there are bugs in the folding code if extra typeinfos are
added to a new predicate's arguments by hlds_pred__define_new_pred.
Disable higher_order.m if --typeinfo-liveness is set, since
higher_order.m currently does not pass all necessary typeinfos
to specialised versions or update the typeinfo_varmap of
specialised versions.
Test case: tests/valid/agc_ho_pred.m
tests/hard_coded/ho_order2.m
tests/hard_coded/ho_order2.exp
Test case for higher_order.m.
tools/test_mercury
Added --intermod-unused-args to the options for murlibobo.
extras/trailed_update/{samples,tests}/Mmakefile
Add "-I.." to MGNUCFLAGS so gcc can find unsafe.h which
is #included in c_header_code read from unsafe.opt.
Estimated hours taken: 4.5
Fix some bugs in code generation for nondet disjunctions and
if-then-elses. The compiler was incorrectly releasing the temp stack
slots used to save the heap pointer and trail pointer at the start
of the else or the last clauses, thus allowing them to be reused not
only in the else case or the last clause, but also by goals following the
disjunction or if-then-else, even though the values in these slots might
be needed again on backtracking into the condition or the earlier
disjunctions.
Thanks to Warwick Harvey for reporting this bug.
compiler/code_info.m:
Add new predicate `code_info__maybe_reset_and_pop_ticket',
which is like `code_info__maybe_reset_and_discard_ticket',
except that it does not release the temp stack slot.
compiler/disj_gen.m:
compiler/ite_gen.m:
When generating code for nondet goals that save
and restore the hp and trail, if the saved
values might be needed again on backtracking
into the current goal from one that follows
(i.e. in nondet disjunctions and in if-then-elses
with nondet conditions), make sure we use
`code_info__maybe_reset_and_pop_ticket' and
`code_info__reset_hp' instead of
`code_info__maybe_reset_and_discard_ticket' and
`code_info__reset_and_discard_hp'.
compiler/code_info.m:
Include the temp_avail_slots in the set of things
that slap_code_info does not update. Temp slots
that were acquired (and not released) in one branch
of a branched goal need to be still reserved at the
end of the branched goal.
extras/trailed_update/Mmakefile:
extras/trailed_update/samples/Mmakefile:
extras/trailed_update/samples/tests.m:
extras/trailed_update/samples/tests.exp:
extras/trailed_update/tests/Mmakefile:
extras/trailed_update/tests/var_test.m:
extras/trailed_update/tests/var_test.exp:
Add a new subdirectory `tests' in extras/trailed_update,
and move the test case `tests.{m,exp}' from the samples
subdirectory into the tests subdirectory, at the same
time renaming it as `var_test.{m,exp}'.
extras/trailed_update/tests/Mmakefile:
extras/trailed_update/tests/func_trail_test.m:
extras/trailed_update/tests/func_trail_test.exp:
extras/trailed_update/tests/func_trail_test_2.m:
extras/trailed_update/tests/func_trail_test_2.exp:
Add a couple of regression tests for the bug mentioned above.
These tests need to go here rather than somewhere in the
main `tests' directory (e.g. `tests/hard_coded'), because
they only work in trailing grades, and the normal tests are
compiled in lots of grades, many of which don't have
corresponding trailing grades installed.
(I suppose we could put them in the main `tests' directory,
and only enable them for trailing grades, but it just seemed
easier to put them here.)
Estimated hours taken: 0.25
Use sub-modules to package up the modules in extras/complex_numbers
into a single module.
extras/complex_numbers/complex_numbers.m:
I forgot to `cvs add' this file before committing my last change.
extras/complex_numbers/samples/fft.m:
I forgot to change the `import_module' declaration here
to import `complex_numbers:complex' instead of `complex'.
Estimated hours taken: 0.75
Use sub-modules to package up the modules in extras/complex_numbers
into a single module.
extras/complex_numbers/complex_lib.m:
extras/complex_numbers/complex_numbers.m:
Rename complex_lib.m as complex_numbers.m,
and modify it to use sub-modules.
extras/complex_numbers/*.m:
extras/complex_numbers/tests/complex_test.m:
extras/complex_numbers/samples/fft.m:
Add `complex_numbers:' to all of the `:- module'
and `:- import_module' declarations.
extras/complex_numbers/Mmakefile:
extras/complex_numbers/tests/Mmakefile:
extras/complex_numbers/samples/Mmakefile:
Modify to reflect the renaming from `complex_lib' to
`complex_numbers'.
Estimated hours taken: 0.1
tests/trailed_update/samples/Mmakefile:
Temporarily disable the test of `interpreter',
since this test fails in some grades.
Estimated hours taken: 3
Add mercury_opengl as a library.
extras/graphics/mercury_opengl/COPYING.LIB:
extras/graphics/mercury_opengl/HOWTO:
extras/graphics/mercury_opengl/LICENSE.TK:
extras/graphics/mercury_opengl/LICENSE.TOGL:
extras/graphics/mercury_opengl/Mmakefile:
extras/graphics/mercury_opengl/README:
extras/graphics/mercury_opengl/mercury_opengl.m:
extras/graphics/mercury_opengl/mglu.m:
extras/graphics/mercury_opengl/mogl.m:
extras/graphics/mercury_opengl/mtogl.m:
extras/graphics/mercury_opengl/tkConsole.c:
extras/graphics/mercury_opengl/tkFont.h:
extras/graphics/mercury_opengl/tkInt4.0.h:
extras/graphics/mercury_opengl/tkInt4.1.h:
extras/graphics/mercury_opengl/tkInt4.2.h:
extras/graphics/mercury_opengl/tkInt8.0.h:
extras/graphics/mercury_opengl/tkInt8.0p2.h:
extras/graphics/mercury_opengl/tkPort.h:
extras/graphics/mercury_opengl/tkWin.h:
extras/graphics/mercury_opengl/tkWinInt.h:
extras/graphics/mercury_opengl/tkWinPort.h:
extras/graphics/mercury_opengl/togl.c:
extras/graphics/mercury_opengl/togl.h:
Same old .m files (except mercury_opengl.m), new Mmakefile,
new LICENSEs, updated version of Togl.
The old .m files will be removed from the extras/graphics
directory.
Estimated hours taken: _____
<overview or general description of changes>
<directory>/<file>:
<detailed description of changes>
Estimated hours taken: 0.5
A few fixes.
extras/graphics/mercury_tcltk/mtcltk.m:
Fix the use of LVALUE_CAST - it was buggy.
Remove references to gravity wars stuff which is
no longer necessary (thanks to Tom for helping find this
out quickly).
Estimated hours taken: 0.5
profiler/call_graph.m:
profiler/read.m:
extras/trailed_update/var.m:
Fix some "missing interface import" bugs detected by the
latest version of the compiler.
Estimated hours taken: 1.0
Fix bugs uncovered/introduced by recent changes to ml.
extras/clpr/samples/Mmakefile:
extras/trailed_update/samples/Mmakefile:
Use MLFLAGS += --shared, rather than redefining ML, and
rather than using --mercury-libs shared.
Similar changes for doing static linking.
Estimated hours taken: 0.1
extras/trailed_update/samples/Mmakefile:
In the rule for creating *.res, swap the order in
which the .out and .exp files are passed to diff,
so that the diff properly reflects how the actual
output differs from the expected output rather than
vice versa.
Estimated hours taken: 1
Add mercury_tcltk as a library.
extras/graphics/mercury_tcltk/COPYING.LIB:
extras/graphics/mercury_tcltk/HOWTO:
extras/graphics/mercury_tcltk/Mmakefile:
extras/graphics/mercury_tcltk/README:
extras/graphics/mercury_tcltk/mercury_tcltk.m:
extras/graphics/mercury_tcltk/mtcltk.m:
extras/graphics/mercury_tcltk/mtk.m:
New location for these files, new Mmakefile, updated README
and HOWTO, added LGPL license.
Estimated hours taken: 1
extras/trailed_update/samples/interpreter.m:
extras/trailed_update/samples/interpreter.exp:
Work around a (spurious) unique mode error, which was
caused by the recent changes to make unique mode checking
of higher-order terms and lambda expressions more strict.
The work-around is to avoid the use of the higher-order
pred unsorted_aggregate/4, and instead use impure code (ugh).
In the long term, a better solution would be to add support
for `call-once' higher-order modes.
Estimated hours taken: 1
extras/trailed_update/var.m:
Avoid mode errors in debug_freeze/{3,4} which were caused by the use
of a variable of inst `any' as the curried argument in a higher-order
term. The fix was to replace `unsafe_perform_io(dump_var(Var))'
with `unsafe_dump_var(Var)' where unsafe_dump_var/1 is a new impure
version of dump_var/3.
(The mode errors were detected as a result of Andrew Bromage's
recent change to fix mode checking for lambda expressions.
In this particular case, as it happens, there is no genuine error,
becaused dump_var/1 does not instantiate its argument.
However, there's no way for the mode checker to know that,
so it is correct to report an error.)
Estimated hours taken: 0.25
extras/clpr/Mmakefile:
extras/clpr/samples/Mmakefile:
extras/trailed_update/Mmakefile:
extras/trailed_update/samples/Mmakefile:
Use `GRADEFLAGS += --use-trail' instead of `GRADEFLAGS = --use-trail',
so that the definition of GRADEFLAGS doesn't override the default
definition `GRADEFLAGS = --use-grade $(GRADE)'. This means that
the specified GRADEFLAGS will modify the GRADE, rather than
replacing it.
Estimated hours taken: 0.1
extras/trailed_update/samples/.cvsignore:
Ignore the `.c' files and executables corresponding to the
`.m' files in this directory.
Estimated hours taken: 0.1
extras/trailed_update/Mmakefile:
extras/trailed_update/samples/Mmakefile:
Use `GRADEFLAGS = --use-trail' rather than `GRADE=asm_fast.gc.tr'.
Estimated hours taken: 2
extras/trailed_update/var.m:
Add new predicate var__is_ground/2.
Also fix a bug: it was not handling unifications between
already-aliased variables correctly.
extras/trailed_update/samples/tests.m:
extras/trailed_update/samples/tests.exp:
Add some more test cases.
Estimated hours taken: 2
extras/trailed_update/var.m:
Add new predicate var__is_ground/2.
Also fix a bug: it was not handling unifications between
already-aliased variables correctly.
extras/trailed_update/samples/tests.m:
extras/trailed_update/samples/tests.exp:
extras/trailed_update/samples/tests.out:
Add some more test cases.
Estimated hours taken: 1
extras/trailed_update/var.m:
Fix a bug (I had changed a function name in but forgotten
to change the caller).
extras/trailed_update/Mmakefile:
Add `-Werror' to MGNUCFLAGS, to prevent reoccurrence of bugs
like the one above.
Fix the rule for `mmake depend' so that it makes the
dependencies in the `samples' subdirectory too.
tools/test_mercury:
Test the trailed_update library.
Estimated hours taken: 2
extras/graphics/mtcltk.m:
Fix the code to work with the changes to the handling of
IO states in pragma c_code.
extras/graphics/mtk.m:
Add several bits of functionality that were missing.
Estimated hours taken: 4
Dectect floundering in solutions/2 and nondet if-then-else.
library/std_util.m:
Change the code for builtin_aggregate to (a) check for
floundering and (b) reset the trail properly.
compiler/code_gen.m:
Change the code for if-then-elses with nondet conditions
so that it checks for floundering.
runtime/mercury_trail.h:
compiler/llds.m:
compiler/llds_out.m:
Add new alternative `MR_solve' to MR_untrail_reason.
This is used to for checking for floundering in the
above-mentioned two cases.
extras/clpr/cfloat.m:
extras/trailed_update/var.m:
Handle the MR_solve case.
doc/reference_manual.texi:
Document MR_solve.
NEWS:
Delete the mention of the limitation that we didn't
dectect floundering in solutions/2 and nondet if-then-else.