Summary
The main purpose of this release is to provide a stable checkpoint for a series of internal compiler changes, which are part of the effort to support 64-bit systems. In addition, however, it also contains a number of bug fixes and other improvements.
Details
Installation
While the installer for 110.86 works on macOS 10.14 Mojave, building from source requires some extra steps.
SML/NJ Library
Renamed the function CharBufferPP.openOut
to openBuf
, and added the
TextPP
structure that supports pretty printing to either an output
stream (like TextIOPP
) or a character buffer (like CharBufferPP
).
ASDL
Further improvements to the new implementation of ASDL.
-
The interface to file and memory picklers was unified for the SML view.
-
Added support for S-Expression pickling for the SML view (unpickling has not yet been implemented).
-
Significant editing of the documentation to make it more accurately reflect the implementation.
Compiler
We have made a number of changes to internal representations and implementations as part of the preparation for supporting 64-bit targets. We summarize these below (see the change log for details).
-
Moved CPS related code out of the FLINT directory and into its own
compiler/CPS
directory tree. -
Split out the utility code from the
CPS
structure into a newCPSUtil
structure. -
Renamed the various CPS primitive constructors so as to be compatible with ASDL (i.e., changed symbolic and lower-case constructor names to upper-case identifiers).
-
Moved the
F_SGN
constructor from thefcmp
datatype to thebranch
datatype (and renamed itFSGN
). -
Many changes to the internal representation of primitive operators.
We have also made improvements to the core 64-bit arithmetic operations.
Culled unused flags from the Control
structure (mostly from Control.CG
).
Interactive System
The implementation of the use
function in the REPL has been rewritten to
fix bugs 193, 217, and 219. The semantics of
use
are as follows:
-
If an invocation of
use
encounters a compilation error (either in the initial file or in a nested invocation ofuse
), then the compiler error message will be printed and the call touse
will immediately return()
. -
If an invocation of
use
raises an exception during execution of the compiled code (either in the initial file or in a nested invocation ofuse
), then the exception will be reported at the top-level. -
Otherwise, if no errors or uncaught exceptions are encountered, then
()
will be returned once the code in the used file has executed.
Note that any change to the global state or environment
that occurs before an error is encountered, will not be rolled
back. Also, wrapping calls to use
in exception handlers or using
callcc
in combination with use
may break it.
Files specified as command-line arguments to the sml command
are treated as if use
was invoked on them. If there is an
error, then the error is reported and the sml command
will terminate with a non-zero exit status (at least on Unix).
Bugs
Here is a list of tracked bugs fixed (or closed) with this release, please see the bug tracker for more details.
193 |
SML/NJ does not print unhandled exceptions in loaded files |
213 |
|
217 |
Unhandled exceptions no longer print anything when inside used file |
219 |
"use" fails silently when a function inside a structure raises an exception |
The following unnumbered bugs were also fixed:
-
The
Word32.toInt
function did not raiseOverflow
when given an argument with its sign bit set in some cases (e.g.,Word32.toInt 0wx8002DE32;
would return187954
).
Supported systems
We believe that SML/NJ will build and run on the following systems, but have only tested some of them:
Architecture | Operating System | Status |
---|---|---|
Power PC |
Mac OS X 10.5 (Leopard) |
|
AIX |
||
|
||
Sparc |
Solaris |
|
Linux |
||
|
||
x86 (32-bit) |
Mac OS X 10.6 (Snow Leopard) |
|
Mac OS X 10.7 (Lion) |
||
Mac OS X 10.8 (Mountain Lion) |
||
Mac OS X 10.9 (Mavericks) |
||
Mac OS X 10.10 (Yosemite) |
||
Mac OS X 10.11 (El Capitan) |
||
macOS 10.12 (Sierra) |
Tested |
|
macOS 10.13 (High Sierra) |
Tested |
|
macOS 10.14 (Mojave) |
Tested |
|
Ubuntu 16.04.3 LTS |
Tested |
|
Other Linux variants |
||
BSD variants |
||
Windows 7 |
||
Windows 10 |
||
Cygwin (32-bit) |
A note about 64-bit support
Apple is in the process of deprecating 32-bit support in macOS. With macOS 10.14 Mojave, compiling 32-bit applications, such as the SML/NJ runtime system, requires using an older SDK. The SML/NJ installer, however, works without issue on macOS 10.14 Mojave.
We have been working on 64-bit support since 110.82 we expect to have it in place before the release of macOS 10.15.