mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-22 12:53:47 +00:00
Estimated hours taken: 500
Add a new pass to the compiler, that attempts to introduce accumulators
into a procedure so as to make that procedure tail recursive.
WORK_IN_PROGRESS:
Document that the transformation now exists.
compiler/goal_util.m:
Create goal_util__can_reorder_goals, which is a version of
pd_util__can_reorder_goals that will work on the alias branch.
compiler/instmap.m:
Add instmap__changed_vars. This predicate is meant to provide the
same functionality as instmap_delta_changed_vars, but work on the
alias branch.
Also add comment to instmap_delta_changed_vars about using
instmap_changed_vars
compiler/accumulator.m:
The transformation.
compiler/mercury_compile.m:
Call the transformation.
compiler/options.m:
Add the option to turn the transformation on.
doc/user_guide.texi:
Document the option.
profiler/demangle.m:
util/mdemangle.c:
Demangle the accumulator version of the procedure labels.
compiler/notes/compiler_design.html:
Add the new pass to the documentation.
74 lines
2.7 KiB
Plaintext
74 lines
2.7 KiB
Plaintext
Work in progress
|
|
----------------
|
|
|
|
The compiler contains some code for the following features,
|
|
which are not yet completed, but which we hope to complete
|
|
at some time in the future:
|
|
|
|
* Existential types.
|
|
|
|
* Thread-safe engine.
|
|
|
|
* Independent AND-parallelism.
|
|
|
|
* We have added support for dynamic link libraries (DLLs) on Windows.
|
|
This is not yet enabled by default because it has not yet been tested
|
|
properly.
|
|
|
|
* There is a new `--optimize-constructor-last-call' option
|
|
which identifies opportunities for LCO where a call
|
|
is followed only by some constructor invocations.
|
|
However, these opportunities are not exploited yet.
|
|
|
|
* We now allow programmers to give names to the arguments of constructor
|
|
function symbols. (Disabled, due to lack of a suitable operator.)
|
|
|
|
* There is a new garbage collector that does accurate garbage
|
|
collection (.agc grade). It is currently limited to deterministic
|
|
code, and needs a great deal of tuning and optimization. It also
|
|
needs testing.
|
|
|
|
* Mercury is now the official programming language for Melbourne Uni's
|
|
"Aditi" deductive database system. The Mercury compiler includes
|
|
support for interfacing to Aditi. However Aditi itself is not yet
|
|
complete and has not yet been made publicly available.
|
|
(The Aditi support is documented in doc/reference_manual.texi,
|
|
but for now that documentation is commented out -- it's not
|
|
included in the formatted versions of the reference manual,
|
|
only in the TexInfo source code.)
|
|
|
|
* Converting procedures to tail-recursive form via automatic
|
|
accumulator introduction (--introduce-accumulators).
|
|
|
|
* The Mercury debugger (mdb) now includes some support for declarative
|
|
debugging.
|
|
|
|
We also have some code that goes at least some part of the way towards
|
|
implementing the features below. However, for these features, the
|
|
code has not yet been committed and thus is not part of the standard
|
|
distribution.
|
|
|
|
* Support for aliasing in the mode system.
|
|
|
|
|
|
Work not in progress
|
|
--------------------
|
|
|
|
The compiler also contains some code for the following features,
|
|
but work on them has stopped, since finishing them off would be
|
|
quite a bit more work, and our current priorities lie elsewhere.
|
|
Still, these would make interesting and worthwhile projects
|
|
if someone has the time for it.
|
|
|
|
* There is a `--generate-bytecode' option, for a new back-end
|
|
that generates bytecode. The bytecode generator is basically
|
|
complete, but we don't have a bytecode interpreter.
|
|
|
|
* There is a `--generate-prolog' option for a new back-end
|
|
that generates Prolog code.
|
|
Not very much progress has really been made on this.
|
|
|
|
* There is a `--high-level-c' option, for a new back-end
|
|
that generates C code but at a much higher level than the
|
|
current back-end.
|