======
TODOS:
======


No longer makes sense -- rewrite?
---------------------------------

* (Steve/John) move DefExprs out of ClassType and into something like
   the init function

* make default constructor name of class rather than "initialize"



Ongoing
-------
* flesh out and complete specification
   - send out location to whole list
   - edits go through editor, others can yell if they disagree



Done, or no longer applicable
-----------------------------

* (Steve) rewrite traverse() method to use get_ast_children -- keep
   public interface/use of Traversal the same, but change mechanism to
   be shared with get_ast_children

* (Steve) remove post-process symbol/type

* (Steve) put all traversal interfaces into traversal.h, all pass
   interfaces into pass.h rather than having a header for each of
   these things.

* (Steve) normalization for all CallExprs by inserting temps;
   unifying/regrouping initial passes; "verify canonical form" pass;
   automatically have things that are inserted which are not in the
   canonical form converted into the canonical form automagically.

* add support for interpreter

* changes/canonicalizations to DefExpr
   - fix storage of initializer to support overloaded assignment
     by introducing temporaries

* different DefExpr fields for different symbol types?
   - for ArgSymbol, move defaultValue into its own field

* compile-time (parameter) constant-folding

* (John) get rid of nondeterminism introduced by hashing-on-pointers
   structures (and try to capture an instance of front-end
   nondeterminism to eliminate it as well)

* things on the way towards moving ahead with arrays
   - DefExpr
   - indexing function in a general way

* instantiation recursion error if something is instantiated too
   many times (flag to change threshold)

* create subtype hierarchy in high-level, or reuse low-level's
   
* create dispatch hierarchy and subtype hierarchy (classes appear in
  both; value types only appear in the subtype hierarchy)

* implement constant folding for "parameter" 

* strengthen implementation of domains and arrays
   - initialization is working by accident
   - constrained to be rank 2 currently 

* check that compiler switches are unified in terms of look and feel

* Implement the forIterator/forallIterator function.

* implement function closures ("x => f(1)")

* implement primitives of different widths

* implement class constructors so that all members are initialized
  with default values to prevent against read-before-write problems.

X (John) add means of iterating over ALists using an external cursor
   (re-entrant iterators) in addition to what we currently have.
   Rewrite for_alist macro to use re-entrant versions.

X (Steve) switch passlist to list of function pointers; wrap current
   Pass classes in functions

X (Steve) remove SymtabTraversal pass -- replace with function call
   that calls collect symbols?  - maintain the ability to pretty-print
   Symboltable

X (Steve) optag change in CallExprs -- only store OP_ field once we've
   determined it's a built-in function








Outstanding
-----------

* Read more about Scala

* document what needs to be done when new classes added to AST, new
  fields added to AST classes

* add support for allocating records as structs rather than
   pointers-to-structs (and flag/switch for switching back to current
   scheme)

* construct proposal for what we should support in where expressions
  to make our lives easier, leverage advantages of Scala

* typecheck that exprType resolves to a type (before analysis)
    e.g., "var x: integer;  var y: x;" should be illegal
  and types as arguments (after analysis)
    e.g., "if a function takes a type as an argument, make sure
           user isn't passing something that's not a type into it"
  (challenge: we currently rely on the latter in some cases, maybe
   tuple construction?  Or maybe it's gone anyway?)

* make sure we have current understanding of nil implementation
   strategy implemented
   - introduce write function for nilType
   - can Symbol resolution be done in the context of the wrapper
     function?

* re-implement union types

* get rid of like -- replace with .type

* support ability to declare multiple variables of the same type

* make a list of supported pragmas and what they mean

* decide on means for determining expression types pre- and
   post-analysis?  (e.g., attach Type* to Expr?  typeInfo()?  Something
   else?).  See where typeinfo() is used and try to get rid of it.

* (Steve) report errors at high level -- is the current information
  adequate?

* Restructure FnSymbol/FnType to reflect division into implementation,
  type, prototype, signature.  Store signatures as degenerate function
  type.

* Overloaded assignment on records not used consistently

* Copies in/out for arguments not always done (records as a specific
   example of this)

* Support ?t

* make sure that type hierarchies between high and low level are the
 same and/or enumerate places where they are different

* (Steve) go through compiler passes and sort through, unify, refactor

* check that +,- etc. are not overloaded for primitive types
  (e.g. integer)

* some visibility of methods/functions bugs, due to shadowing (John
   has test cases) 
   - Scala doesn't have this problem because they instantiate
     everything ahead of time, single dispatch, ...

* record literals

* get rid of UserType after instantiation? (or earlier)

* unify error reporting systems

* explore Doxygen

* add gcov/gperf abilities into nightly testing

* Chapel mode for versions of emacs

* flesh out primitives of different widths a bit more

* add some sort of "noinit" keyword to the language to specify that
  types and variables should be left uninitialized when declared (or
  use underscore as the token).  How to test?

* implement topological sorting of symbols (ensuring that functions
  don't use default values too early, e.g.).  Steve had an example
  here, which seems to have been lost.  Is this necessary?

* can one specify non-parameter, non-type arguments to a class
  instance variable's definition (e.g., "var c: C(x=2) = ...")

* do we have an equivalent of C++'s ability to specify code in a
  constructor after a colon but before the function body?  What is it
  and implement it.


New tasks
---------

* record-flattening optimization

