frameopt:
Look inside blocks introduced by value numbering when looking
restorations of succip.
value_number, opt_util:
If we are using conservative garbage collection, disable value
numbering for blocks that allocate more than one cell on the heap.
This allows value numbering of most blocks to work in the absence
of -DALL_INTERIOR_POINTERS.
all other source files:
Clean up "blank" lines that nevertheless contain space or tab
characters.
compiler/*:
Add copyright messages.
Change all occurences of *.nl in comments to *.m.
compiler/mercury_compile.pp:
Change the output to the .dep files to use *.m rather than *.nl.
(NOTE: this means that `mmake' will not work any more if you
call your files *.nl!!!)
code_util.nl, float.nl, llds.nl, mercury_builtin.nl, opt_debug.nl,
parser.nl, polymorphism.nl, sp_lib.nl, string.nl, string.nu.nl,
type_util.nl, typecheck.nl, unify_gen.nl:
Implement floating point.
Makefile.common:
Remove `-include test.dep' line. Use Mmake.
int.nl:
Update a few of the comments.
io.nu.nl:
For Sicstus Prolog, if main/2 is not defined then enter the
debugger.
Makefile.common:
Add some targets for compiling the compiler and the library.
type_util.nl, dense_switch.nl, switch_gen.nl, polymorphism.nl:
Rename inttype, chartype, etc. as int_type, char_type, etc.
Add polymorphic_type.
modes.nl, mode_errors.nl:
Report an error for direct attempts to unify higher-order pred types.
(Of course, we don't catch indirect attempts via polymorphic types -
that would require global analysis. For them, we report the error
at runtime.)
modes.nl:
Remove unreachable code from conjuctions.
(XXX also should do this for if-then-else.)
options.nl:
Turn -p off by default. I'll turn it on again when it works ;-)
polymorphism.nl:
Fix some bugs:
- I had forgotten to update the argmodes of the modified
procedures
- I was updating the argtypes and attempting to use there
old value. I fixed this by splitting the algorithm
into two passes.
- to compute the types of the arguments to a call,
apply the type mapping from the _caller_ not the callee.
Also improve efficiency in a couple of places.
hlds.nl:
Add some new access predicates required by polymorphism.nl.
list.nl:
Add a new predicate list__duplicate, which is used by polymorphism.nl.
typecheck.nl, type_util.nl:
Move the type_unify routines from typecheck.nl into type_util.nl,
since they're also needed by polymorphism.nl.
term.nl:
Export term__apply_rec_substitution_to_list, since it's needed
by polymorphism.nl.
- - - - - - - - - - - - - - - - - - - - - - - - -
mode_util.nl, type_util.nl:
Move some routines from mode_util.nl to type_util.nl, where they
really belong.
- - - - - - - - - - - - - - - - - - - - - - - - -
make_hlds.nl, code_util.nl, typecheck.nl:
Mark builtin predicates as "external" in make_hlds.nl,
rather than checking for them as a special case in typecheck.nl.
- - - - - - - - - - - - - - - - - - - - - - - - -
prog_io.nl, hlds.nl, typecheck.nl:
For documentation purposes, define equivalent types `tvar',
`tvarset', `tsubst' for type variables, type varsets, and
type substitutions.
- - - - - - - - - - - - - - - - - - - - - - - - -
mercury_compile.pp, options.nl:
Change the handling of the --dump-hlds option so that you can
now dump the HLDS after any of the 12 HLDS transformation passes.
- - - - - - - - - - - - - - - - - - - - - - - - -
make_hlds.nl:
Report an error if there are clauses for an imported predicate.
- - - - - - - - - - - - - - - - - - - - - - - - -
io.nu.nl:
Add a new predicate r/1 which is like run/1 except that
you pass it a string rather than a list of atoms.
So now you can do
$ mercury_compile.debug
Mercury Interpreter 0.1
NU-Prolog 1.6.4
1?- r("mc -options blah blah blah").
*.nl:
Replace all occurrences of `not(Vars, Goal)' with just
plain `not(Goal)'.
type_util.nl, switch_gen.nl:
Higher-order pred types are not user-defined types.
Add a `predtype' type category for them.
call_gen.nl:
Change call_closure/2 to call_closure/3 (with liveinfo).
Plus a little bit of random hacking.
term.nl:
In term__create_var, use bit reversals rather than random numbers
to ensure that the binary trees remain balanced.
call_gen.nl:
For polymorphic unifications, generate a call to fatal_error().
code_gen.nl, hlds.nl, make_hlds.nl, modes.nl, unify_proc.nl:
Move the unify_request data structure from code_info to the HLDS,
and move the unify_request handling from code_gen.nl to modes.nl.
This is because we now generate HLDS code rather than LLDS code
for complicated unifications.
code_util.nl, hlds_out.nl:
Do some special name mangling for =/2.
float.nl, typecheck.nl, undef_types.nl, term.nl, hlds.nl:
Until we implement `float' properly, define it as an abstract type
in float.nl.
hlds.nl, make_hlds.nl:
Rename `local_pred, imported_pred, exported_pred' to just
`local, imported, exported' since they also apply to types, etc.,
not just to preds.
mercury_compile.pp, mercury_to_goedel.nl, prog_util.nl:
Replace to goedel__ prefixes in prog_util.nl with prog_util__.
std_util.nl:
Change the code for semidet_succeed to avoid determinism warning.
lots of files:
Make a start at implementing code generation for complicated
unifications. In the HLDS, change complicated_unify/4 to
complicated_unify/2 since we didn't need the extra two args
after all.
peephole.nl:
A couple of minor efficiency improvements.
queue.nl:
Add queue__queue_to_list/2.
hlds_out.nl:
Minor improvements to the output.
code_info.nl, type_util.nl:
Change make_type_id to fail rather than call error/1
if the type is not valid.
undef_types.nl:
Report invalid types.
mode_util.nl:
Add a new pred `type_constructors'.
modes.nl:
Detect determinism of deconstruction unifications properly,
using the type information.
code_info.nl:
Tidy up the code for code_info__cons_id_to_tag.
prog_io.nl, mode_util.nl, mercury_to_mercury.nl:
Add new inst `free(Type)' and new inst_names `typed_ground(Type)'
and `typed_inst(Type, Inst)' so that we can propagate type
information through the mode system.
Do some of the work necessary to propagate type info to modes.
type_util.nl:
Add an extra output argument to type_to_type_id so that it can
return the type's arguments; also fix a determinism error in
type_to_type_id.
hlds.nl:
Add a comment.
list.nl:
Fix the determinism annotation for same_length.
map.nl:
Add map__apply_to_list.
mode_info.nl:
Add mode_info__get_types_of_vars.
Makefile.mercury:
Fix the definition of MERCC.
hlds.nl:
For each discriminated union type, store the tags for the
constructors for that type, and store whether
or not the type is an enumeration type.
make_hlds.nl, make_tags.nl:
Added a new file `make_tags.nl' which is caled from make_hlds.nl
to computes the above info.
type_util.nl:
In type_is_enumeration, use the flag stored in the HLDS rather
than recomputing it on demand.
undef_types.nl:
Minor change to match the changes in hlds.nl.
mercury_compile.nl:
Ensure that foo.err depends on foo.nl.
Dump the hlds before liveness analysis as well as after
compilation (this is probably just a temporary hack).
modes.nl, mode_errors.nl, delay_info.nl, mode_info.nl, undef_modes.nl:
Break modes.nl up into separate modules.
toplevel.nl (plus LOTS of other files):
Change the way module imports are handled. Fix the resulting missing
import problems found in most of the modules.
mode_util.nl:
Add predicate inst_is_bound_to_functors/3.
switch_detection.nl:
New file. Still very incomplete.
meta.nl:
Remove. This file was old junk.
interpreter.nl:
Fix bug in mode declaration.
hlds.nl, mercury_to_mercury.nl:
Fix mode error in mercury_to_mercury.nl.
modes.nl:
Fix bug in handling of `erroneous' preds.
Fix a bunch of other errors including some mode errors.
prog_io.nl:
Fix type error introduced by last change.
Fix mode error in DCG expansion code.
type_util.nl:
Work around scoping problem with \=.
typecheck.nl:
Fix mode error.
prog_io.nl:
- Add a new inst `not_reached' (intended for internal use by the
compiler, but for the moment at least we also allow it in user
code).
- Parse abstract inst definitions, with the syntax
:- inst foo is private.
type_util.nl, typecheck.nl, codegen.nl, Makefile, doit.nl:
- Add a new module `type_util'.
- Move make_type_id from typecheck.nl to type_util.nl.
- Rename vartype_to_type as classify_type, move it from
codegen.nl to type_util.nl, and modify the interface slightly.
- Move the type_is_enumeration stub from codegen.nl to type_util.nl,
and implement it.
- Implement type_is_atomic.
modes.nl:
- Distinguish between simple_unify's and complicated unifies by
calling type_is_atomic.
- Check that the final insts of the head vars match that specified
by the mode declaration.
- Handle (some cases of) unreachable code, using the `not_reached'
inst. More work needed on this.
- Improve the error message in the case where there is a single
delayed goal in a conjunction. (Instead of printing out the
generic "mode error in conjunction" message, we now print out
the error message for the delayed goal in question.)
- Fix bug where it didn't realize that bound('.'(ground, ground))
was the same as ground (due to missing clauses for inst_is_compat_3).
Most of these changes have not yet been tested.