Files
mercury/compiler/notes/TODO
1994-04-19 08:37:19 +00:00

138 lines
3.1 KiB
Plaintext

*******************************************************************************
TODO LIST:
----------
followvars.nl
-------------
- Make it work.
codegen.nl
----------
- Look at liveness problems
- semideterministic code generation (calls, switches, etc.)
- nondeterministic code generation
- handle string equality, string constants, etc.
- types with constants only (enumerations) should be handled as ints.
- test generation of all builtins
typecheck.nl
------------
- improve error messages for unification of var & functor
- see also wish list comments at the start of that file
modes.nl
--------
- handle functors
- handle reordering
- handle multiple modes per pred
- detect incorrect usage of `bound(...)' insts.
- handle undefined insts/modes gracefully
- handle polymorphic modes
stack_alloc.nl
--------------
- make it work: it needs to assign stack slots for variables
which need to be saved over a call
general
-------
- tail recursion optimization (vanilla) and also pass-by-reference
tail recursion.
- (modes.nl, make_hlds.nl, hlds.nl, codegen.nl):
split construct/deconstruct unifications into their atomic
"micro-unification" pieces: functor construct/deconstruct and
argument get/put.
- warn about predicates with no clauses.
- warn about predicates with no modes.
- handle abstract insts in the same way abstract types are handled
- report an error if there are clauses in the interface section
of a module
- replace all instances of term_functor, term_atom, term_string, term_float,
term_int, term_variable with term__functor, term__atom, term__string,
term__float, term__variable respectively.
- determinism analysis
- improve efficiency of implicit quantification
- renaming apart of different occurences
of the same variable; warning about variables which occur in
overlapping scopes.
- optimization of various sorts
- generate code for complicated_unify's (there are some comments about
this in the paper.)
- array.nl: write a predicate to resize arrays.
- garbage collection
mercury_to_goedel.nl
--------------------
- see comments at the start of that file
*******************************************************************************
WISH LIST
---------
codegen.nl
----------
- The generated code should include some profiling hooks.
In particular, we should add a version of the heap allocation
macro which takes an extra string parameter identifying which
routine allocated the memory. Then we can do heap-allocation
profiling to identify which routines use up all the bloody memory.
- Generate constant compound terms at compile time rather than at runtime.
- Add a peephole optimization pass
general
-------
- handle module qualifiers properly
- more work on module system, separate compilation, and the multiple
specialization problem
- implement user-defined operators:
Add a new construct `:- op(Pred, Type, Op).' as in Prolog;
change prog_io.nl to parse this construct and call io__op
accordingly.
- better error handling
- fix all the `XXX's, `xxx's, `YYY's and `%%%'s.
- implement a debugger and a profiler
*******************************************************************************