<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 2.0.23">
<title>History</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
<link rel="stylesheet" href="./asciidoctor.css">
<link rel="stylesheet" href="./mlton.css">

</head>
<body class="article">
<div id="mlton-header">
<div id="mlton-header-text">
<h2>
<a href="./Home">
MLton
20241230
</a>
</h2>
</div>
</div>
<div id="header">
<h1>History</h1>
</div>
<div id="content">
<div class="paragraph">
<p>In April 1997, Stephen Weeks wrote a defunctorizer for Standard ML and
integrated it with SML/NJ.  The defunctorizer used SML/NJ&#8217;s visible
compiler and operated on the <code>Ast</code> intermediate representation
produced by the SML/NJ front end.  Experiments showed that
defunctorization gave a speedup of up to six times over separate
compilation and up to two times over batch compilation without functor
expansion.</p>
</div>
<div class="paragraph">
<p>In August 1997, we began development of an independent compiler for
SML.  At the time the compiler was called <code>smlc</code>.  By October, we had
a working monomorphiser.  By November, we added a polyvariant
higher-order control-flow analysis.  At that point, MLton was about
10,000 lines of code.</p>
</div>
<div class="paragraph">
<p>Over the next year and half, <code>smlc</code> morphed into a full-fledged
compiler for SML.  It was renamed MLton, and first released in March
1999.</p>
</div>
<div class="paragraph">
<p>From the start, MLton has been driven by whole-program optimization
and an emphasis on performance.  Also from the start, MLton has had a
fast C FFI and <code>IntInf</code> based on the GNU multiprecision library.  At
its first release, MLton was 48,006 lines.</p>
</div>
<div class="paragraph">
<p>Between the March 1999 and January 2002, MLton grew to 102,541 lines,
as we added a native code generator, mllex, mlyacc, a profiler, many
optimizations, and many libraries including threads and signal
handling.</p>
</div>
<div class="paragraph">
<p>During 2002, MLton grew to 112,204 lines and we had releases in April
and September.  We added support for cross compilation and used this
to enable MLton to run on Cygwin/Windows and FreeBSD.  We also made
improvements to the garbage collector, so that it now works with large
arrays and up to 4G of memory and so that it automatically uses
copying, mark-compact, or generational collection depending on heap
usage and RAM size.  We also continued improvements to the optimizer
and libraries.</p>
</div>
<div class="paragraph">
<p>During 2003, MLton grew to 122,299 lines and we had releases in March
and July.  We extended the profiler to support source-level profiling
of time and allocation and to display call graphs.  We completed the
Basis Library implementation, and added new MLton-specific libraries
for weak pointers and finalization.  We extended the FFI to allow
callbacks from C to SML.  We added support for the Sparc/Solaris
platform, and made many improvements to the C code generator.</p>
</div>
</div>
<div id="mlton-footer">
<div id="mlton-footer-text">
<div>
Last updated Thu Oct 21 15:53:06 2021 -0400 by Matthew Fluet.
<a href="https://github.com/MLton/mlton/commits/master/doc/guide/src/History.adoc">Log</a>
<a href="https://github.com/MLton/mlton/edit/master/doc/guide/src/History.adoc">Edit</a>
</div>
</div>
</body>
</html>