This is a list of things (both major and minor) that should be fixed/improved/changes in the SML/NJ compiler. It is organized into short-term goals by proposed release target plus an additional "wish-list" of long-term goals.
-
Rationalization and cleanup of primops that are exported by the compiler (see
dev-notes/primop-list.md
). -
There are many Basis Library modules that include definitions of the form
fun x ++ y = InlineT.Word31.copyt_int31 (InlineT.Word31.copyf_int31 x + InlineT.Word31.copyf_int31 y) fun x -- y = InlineT.Word31.copyt_int31 (InlineT.Word31.copyf_int31 x - InlineT.Word31.copyf_int31 y)
Perhaps we should add unchecked add and subtract operations to InlineT.Int31?
-
CPS support for
Word64.word
andInt64.int
operations. -
Switch
Position
structure to beInt64.int
. -
Switch to new encoding of literals (see new-literals.md)
- Switch environment pickling to use ASDL
- Must have 64-bit port done by June 2019 (but earlier would be better).
-
The
CPS.SWITCH
construct only supports tagged integer arguments (this limitation is because of the way that jump-table indices is handled inCodeGen/mlriscGen.sml
). It should be generalized to boxed, fixed-precision, integer types. -
switches on strings use string equality as the basic operation (the
CPS.P.streq
andCPS.strneq
operators), which does not allow for binary search. Replace these with aSTRCMP
three-way branch in thecexp
type. -
All of the intermediate representations (FLINT, CPS, etc.) use the same LambdaVar.lvar type to represent variables. There should be distinct types for these to avoid potential confusion and errors.
-
FLINT types (
FLINT/kernel
) need a thorough overhaul. There are too many layers of type representations, and the complexity of Nadathur closures is probably unjustified. Even the hash-consing of types may no longer be justified -- depends on the space blowup without it. FLINT primative types for numbers do not distinguish between signed and unsigned numbers (i.e. ints and words). Should they? -
The
unboxedFloats
flag in theMACH_SPEC
signature is true for all targets; can we get rid of it? -
Rewrite of pattern-match compilation to be an source to source translation of the
Absyn
IR. Include direct translation of "or" patterns and support for Successor ML views. -
Add support for
Real32.real
, including arrays and vectors.