Estimated hours taken: 0.5
library/*.m:
Convert
:- pragma(c_code, ...
to
:- pragma c_code(...
and introduce will_not_call_mercury in places where it is implicit
(this is in preparation for changing the default to may_call_mercury).
Estimated hours taken: 0.5
NEWS:
mention the changes to map and tree234.
library/map.m:
added map__foldl/4 and map__map_values/3 which forward to the
corresponding predicates in tree234.
library/tree234.m:
implement tree234__foldl and tree234__map_values.
Estimated hours taken: 0.2
library/array.m:
Fix comments about bounds checking - the "maximum" performance
recommendation can be improved by compiling the entire
module with bounds checking off, not just the bits that
get intermodule-optimized.
Estimated hours taken: 0.5
library/*.m:
compiler/*.m:
Undo Zoltan's bogus update of all the copyright dates.
The dates in the copyright header should reflect the years
in which the file was modified (and no, changes to the
copyright header itself don't count as modifications).
Estimated hours taken: 30
Add library and runtime support for stack layouts.
library/array.m:
library/benchmarking.m:
library/mercury_builtin.m:
library/std_util.m:
library/string.m:
runtime/mercury_engine.c:
runtime/mercury_ho_call.c:
runtime/mercury_type_info.c:
Add MR_MAKE_STACK_LAYOUT_* macros to add basic stack layouts for
handwritten C code.
runtime/mercury_type_info.c:
Remove some duplicate label declarations.
runtime/mercury_calls.h:
Don't use ASM_FIXUP_REGS in calls with NATIVE_GC - we don't
want (or need) to use it. We define all labels as entry labels
anyway, so an ASM_FIXUP_REGS is done at each label.
runtime/mercury_label.c:
runtime/mercury_label.h:
runtime/mercury_goto.h:
Insert references to stack layouts into the label table.
Use the label table when NATIVE_GC is defined.
Modify the way labels are declared so they have the necessary
scope.
runtime/mercury_imp.h:
Include mercury_accurate_gc.h
runtime/mercury_accurate_gc.h:
Add some macros to define stack layouts for handwritten
code, and access various fields of the stack layouts.
util/mkinit.c:
Add NATIVE_GC to the #ifdef .... that controls the running of
the initialization code for each module. NATIVE_GC requires the
label table to be initialized.
Fix this code so the two instances of this list of #defines are
replaced by a single string constant. I've been bitten _twice_
by this double definition, and I refuse to be bitten again.
compiler/stack_layout.m:
Rename MR_LIVE_LVAL to Mr_Live_Lval in the documentation.
Estimated hours taken: 0.25
library/array.m:
Put code for array bounds checking inside
`#ifndef ML_OMIT_ARRAY_BOUNDS_CHECKS', so that the user
can disable array bounds checking.
Estimated hours taken: 1
A few small changes towards supporting backtrackable destructive update
better.
library/mercury_builtin.m:
Add new insts mdi/1 and mostly_dead/0.
library/array.m:
Change the name of the inst for unique arrays
from `array' to `uniq_array' (someone got over-enthusiastic
with global search and replace when uniq_array.m was
renamed array.m).
Add insts for non-unique arrays and mostly-unique arrays.
library/bt_array.m:
Add a comment.
Estimated hours taken: 0.1
library/array.m:
Move `:- import_module std_util' declaration into the
interface, since it's needed there for the type `maybe(T)'
used by array__bsearch.
Estimated hours taken: 6
The main purpose of this change is to rename array.m as bt_array.m, and
uniq_array.m as array.m. The interfaces of those two modules have grown
slightly so that they match a little more closely. Details are in the
file NEWS.
The implementation of bt_array (formerly array) has been changed to use
a slightly more efficient implementation.
NEWS:
Interface changes documented.
library/array.m:
library/bt_array.m:
Changes mentioned above and detailed in the NEWS file.
library/uniq_array.m:
Bereft of life and resting in peace.
library/io.m:
library/library.m:
library/std_util.m:
library/term.m:
compiler/base_type_layout.m:
runtime/deep_copy.c:
runtime/type_info.h:
Minor changes to fix the special case of base_type_layout
operations for arrays rather than uniq_arrays.
tests/hard_coded/write.exp:
tests/hard_coded/write.m:
Test writing of arrays.
tests/general/array_test.exp:
tests/general/array_test.m:
Test some array/bt_array operations.
Estimated hours taken: 3
Enable --warn-interface-imports by default. This was turned off while
list and term were defined in mercury_builtin.m, since it caused many
warnings.
Fix all the unused interface imports that have been added since then.
compiler/options.m:
Enable --warn-interface-imports by default.
compiler/module_qual.m:
Fix formatting inconsistencies with module names in warning
messages. (".m" was not appended to module names if there was
only one module).
compiler/*.m:
library/*.m:
tests/invalid/type_loop.m:
tests/warnings/*.m:
Remove usused interface imports, or move them into
implementation (mostly bool, list and std_util).
Estimated hours taken: Not much at all. :-)
Fixed some stuff in array.m.
library/array.m:
Moved array__fetch_items into the interface. Some general
cleanups of the documentation.
library/*.m:
Improve the documentation.
Add a "Stability: low/medium/high" comment to all modules,
which describes the stability of the interface to that module.
ops.m:
Add `:' as an infix operator.
require.m:
Implement require/1, since higher-order predicates now work.
term.m:
Use the type `comparison_result' from mercury_builtin.m,
rather than defining an identical type `comparison'.
Makefile.mercury:
Override the MERCURY_LIB_OBJS variable when invoking ml.
This avoids some bootstrapping problems.
Also, add mercury_compile.nu.
Makefile.common:
Bump NU-Prolog's -u option up to 2000 (8M), to avoid some memory
problems.
array.nl, bintree.nl, char.nl, dir.nl, globals.nl, list.nl, map.nl, modes.nl,
prog_util.nl, stack.nl, std_util.nl, string.nl, term.nl:
Avoid the use of implied modes.
code_info.nl, bimap.nl, make_hlds.nl, mercury_compile.nl,
mercury_to_mercury.nl, unify_proc.nl:
Fix determinism errors which had previously not been discovered
because of either implied modes or running out of memory.
(Note that I had to change the interface to bimap__lookup, since
it's not possible to make it bidirectional.)
code_util.nl, llds.nl, opt_debug.nl, value_number.nl:
Rename `operator' as `binary_op'.
hlds.nl, code_info.nl, unify_gen.nl, llds.nl, opt_debug.nl, switch_gen.nl:
*** Handle simple cases of higher-order pred terms. ***
(We don't yet handle taking the address of an overloaded
predicate or a predicate with multiple modes.
We don't handle closures. call/1 and call/N are not yet implemented.
This has not yet been tested.)
make_hlds.nl:
Modify the mode priority ordering so that semidet modes get
selected before det ones.
llds.nl:
Don't include the priority part of the mode number in the mangled
label name. *** Note: this will break some things! ***
mercury_compile.nl:
Move the NU-Prolog hacks into mercury_compile.nu.nl.
switch_gen.nl:
Fix a simple logic bug in handling the grab/slap of the code_info.
prog_io.nl, builtins.nl, int.nl:
Fix bugs and omissions with handling of the new arithmetic operators.
prog_io.nl:
As a quick hack, strip off calls to io__gc_call
(this avoids spurious error messages which are due to
the fact that we don't get mode analysis right in those cases).
array.nl:
Improved the code. Added array__resize.
call_gen.nl code_gen.nl code_info.nl switch_gen.nl unify_gen.nl:
Made a start towards abstracting "tag tests".
hlds.nl hlds_out.nl liveness.nl modes.nl code_gen.nl:
Fixed the "before" and "after" liveness problem.
mercury_builtin.nl:
Use det_pred(...), semidet_pred(...), nondet_pred(...)
rather than call_pred(...) for the higher-order predicate modes.
prog_io.nl, io.nl, varset.nl, etc.
Add determinism annotations.
hlds.nl, make_hlds.nl, LOTS of other files:
Reorganize the way the predicate table works.
Make hlds.nl a bit more modular.
Change call/4 to call/5.
Remove all/2 from the hlds.
Changed pred_id to an integer.
Added pred_call_id which is similar to the old pred_id.
Makefile:
Add a rule for creating *.hlds_dump.
array.nl:
Fix determinism error.
det_analysis.nl:
Fix a bug in printing determinism warnings.
fix_errors.sed:
Modify this so it allows all the `inferred nondet' determinism
errors but none of the `inferred semidet' ones.
llds.nl:
Rename llds__pred_mode_id as llds__proc_id.
mode_errors.nl:
Finally got around to implementing Zoltan's suggestions
about the error messages from the mode analysis.
If an error occurs in a conjunction, only one error message
is printed out - the first error which doesn't relate to
a head unification.
modes.nl:
Handle X = f(X) properly. NB: determinism analysis and code
generation still get it wrong!
undef_modes, undef_insts:
I've broken the error message code, since it's not easy
to print pred_ids. I just changed it so that it didn't
print the pred_ids out. Should fix this properly at some stage...
Makefile:
various changes. Added switch_gen.nl renamed the other codegen
files to fit the naming conventions.
array.nl:
added some determinism declarations.
bimap.nl:
fixed some of the determinism problems.
doit.nl:
minor changes.
hlds.nl:
added liveness to the procinfo structure.
added access predicates and type definition for liveness_info.
hlds_out.nl, modes.nl:
patched the explicit usage of proc/11. for the above change.
int.nl:
fixed it so that it compiles under mc!
map.nl, set.nl, term.nl:
fixed determinism warnings.
toplevel.nl:
import code_info.
various:
file renaming to fit naming conventions.
Makefile:
Change the `nit' rule to invoke nit on the files one at a
time rather than all at once, because nit was running out
of memory.
Makefile, doit.nl:
Add tree.nl.
codegen.nl:
Bug fix.
llds.nl:
Output `detstackvar(N)' instead of `stackvar(N)'.
hlds.nl:
Initialize the determinism to `deterministic' rather than
non-deterministic.
make_hlds.nl:
Fix bug where true/fail where being swapped.
modes.nl:
Copy the information in the predinfo struct to the procinfo struct.
(Mode checking itself is still not yet implemented.)
typecheck.nl:
Fix bug in last change.
that I'm not sure how to fix.
hlds.nl: a couple of minor alterations.
llds.nl: a few changes so that llds expressions can be used in
codegen.nl - a significant fix that gets rid of quite
a bit of weirdness in codegen.
string.nl: added a declaration (but no implementation) for
string__to_int - for use in converting cons_ids for
integer constants to type int.
- Added some new targets to the Makefile.
- In mercury_to_goedel.nl: handle calls to require/2.
- Replaced "require(fail, ...)" with "error(...)".
- Removed uses of floating point division in array.nl.
- Changed io__progname to take two io__state arguments.
- Removed direct references to $string from io.nl so that it is self-applicable.
- Added pair.nl and changed map.nl to use it.
Lots of bug fixes for make_hlds.nl.
A couple of bug fixes for hlds.nl.
Did some optimization of memory usage: added io__gc_call to io.nl
and used it in prog_io.nl and module.nl. Rewrote the main loop
of prog_io to take maximum advantage of manual garbage collection.
Started working on typecheck.nl.