Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / src / History.adoc
... / ...
CommitLineData
1History
2=======
3
4In April 1997, Stephen Weeks wrote a defunctorizer for Standard ML and
5integrated it with SML/NJ. The defunctorizer used SML/NJ's visible
6compiler and operated on the `Ast` intermediate representation
7produced by the SML/NJ front end. Experiments showed that
8defunctorization gave a speedup of up to six times over separate
9compilation and up to two times over batch compilation without functor
10expansion.
11
12In August 1997, we began development of an independent compiler for
13SML. At the time the compiler was called `smlc`. By October, we had
14a working monomorphiser. By November, we added a polyvariant
15higher-order control-flow analysis. At that point, MLton was about
1610,000 lines of code.
17
18Over the next year and half, `smlc` morphed into a full-fledged
19compiler for SML. It was renamed MLton, and first released in March
201999.
21
22From the start, MLton has been driven by whole-program optimization
23and an emphasis on performance. Also from the start, MLton has had a
24fast C FFI and `IntInf` based on the GNU multiprecision library. At
25its first release, MLton was 48,006 lines.
26
27Between the March 1999 and January 2002, MLton grew to 102,541 lines,
28as we added a native code generator, mllex, mlyacc, a profiler, many
29optimizations, and many libraries including threads and signal
30handling.
31
32During 2002, MLton grew to 112,204 lines and we had releases in April
33and September. We added support for cross compilation and used this
34to enable MLton to run on Cygwin/Windows and FreeBSD. We also made
35improvements to the garbage collector, so that it now works with large
36arrays and up to 4G of memory and so that it automatically uses
37copying, mark-compact, or generational collection depending on heap
38usage and RAM size. We also continued improvements to the optimizer
39and libraries.
40
41During 2003, MLton grew to 122,299 lines and we had releases in March
42and July. We extended the profiler to support source-level profiling
43of time and allocation and to display call graphs. We completed the
44Basis Library implementation, and added new MLton-specific libraries
45for weak pointers and finalization. We extended the FFI to allow
46callbacks from C to SML. We added support for the Sparc/Solaris
47platform, and made many improvements to the C code generator.