Most of the changes are bug fixes. One major fix was to the
intermediate code optimiser reported back in September.
Other changes are the addition of PrettyStringWithWidth and
PrettyLineBreak constructors to the PolyML.pretty datatype,
Thread.Thread.numPhysicalProcessors to return the number of
physical processors and printing ?.t in circumstances where t is
bound to a different type. The debugger has been extended to
include structures and the arguments to functors.
Contributed by Imre Vadasz on pkgsrc-users (slightly adapted).
Changes in Poly/ML Version 5.5.1
Major New Features and Changes
* The intermediate code optimiser has been largely rewritten.
The optimiser now detects various additional cases where a
closures or tuples can be stored on the stack rather than
requiring heap storage
* The match compiler that processes a sequence of patterns in a
case or fun-binding has been reworked. This now handles
complex matches that used to result in a code blow-up
* A"polyc" script has been added to aid compiling and linking
ML code to produce a stand-alone binary. This is intended as
an analogue of cc and gcc. The easiest way to build a binary
is now to put the ML code into a file (foo.ML) with a
function "main" that is the entry point to the code. Then run
polyc -o foo foo.ML
The script takes care of any libraries that may be required.
It does require that the poly binary and libraries have been
installed to the location that was specified in the configure
script.
* Set the default in the configure script not to build a shared
library. This can be overidden with --enable-shared. The
advantage of this is that binaries created from Poly/ML,
including poly itself, do not require libpolyml at run-time.
* Additions and changes to the command-line options when
starting the ML top-level
+ The --eval option can be followed by a string which is
compiled and executed before the top-level is entered
+ The --script option can be used to allow ML code to be
run as a script (a "shell script") in Unix. It reads the
file name given as the last option, skipping the first
line if it begins #!. Implies -q option. Note: because of
the way scripts pass their options if used this must be
the only option. To use ML as a script put the ML code
into a file, put
#! /usr/local/bin/poly --script
as the first line, modifying the path depending on where
poly is installed, and set the file to have execute
permission.
+ The -q option now sets the print depth to zero as well as
suppressing the start-up message
+ The input prompt (> or #) is only produced if the input
is a terminal. The -i option should be used to cause the
prompt to be produced if, for example, the input is from
a pipe.
Minor Additions and Changes
* The -H option now sets the initial heap size rather than
being a synonym for --minheap
* Add large file support
* When printing the fields a record print them in alphabetical
order rather than the system order used in the compiler
* Convert the representation of the statistics to use ASN1
encoding. This is byte-order and word-length independent and
allows 32-bit Poly/ML to read the statistics of 64-bit Poly/
ML on the same machine and vice-versa.
* Add a substructure Exception to the PolyML structure to hold
all the functions related to exceptions.
* The default for --gc-threads is now the number of independent
physical processors. Hyperthreaded cores are counted as
single cores rather than dual cores.
* Improve the GC and allocation code for very large arrays
* Improve handling of OS.Process.system in Cygwin
* Improved versions of Word32 and Word64. These are used for
SystemWord and LargeWord.
Bug Fixes
* Fix Word32.fromLargeInt which could return values outside the
range of Word32
* Fix segfault in PolyML.stackTrace
* Fix errors in conversion of string to real values
* Fix segfault when a thread created in foreign code called an
ML callback
* Fix profiler which could often report UNKNOWN function
* Fix bug with overlapped areas in ArraySlice.copy
* Fix InternalError exception with ML code where a fixed record
type could not be found
* Fix bug with equality on BoolVector.vector
* Raise the correct exception (Size) for negative lengths in
canInput and inputN
* Fix Real.fromInt with an argument that was an arbitrary
precision number in the long form
* Fix error in the timing information printed with
PolyML.timing true in Windows.
* Fix occasional problem with input/output as a result of the
stream token being represented by an immutable value but then
being checked for equality
* Fix bug in X86-64 code-generator with literal constants that
do not fit in 32-bits. It could result in an "InternalError:
gen32s: invalid word" exception. Includes regression test.
* Fix LargWord.fromInt which was wrong for large negative
values
* Fix bug in power-of-two function in code-generator. This
caused an infinite loop with Word.* when multiplying by a
constant with the highest bit set and not a power of two.
* Fix bug in structure matching code
* Use ELF_Rela relocation structures for all relocations in
X86-64. Some systems e.g. Solaris require this.
Changes in Poly/ML Version 5.5
Major New Features
Storage management rewrite. The storage management system
has been almost completely rewritten. The garbage collector
is parallelised and a new mechanism has been introduced to
adjust the size of the heap. When space is very short an
extra pass may be triggered that merges immutable cells with
the same contents. Thanks to Tobias Nipkow and the Technical
University of Munich for support for this work.
PolyML.shareCommonData has been parallelised and now uses a
dynamic stack to avoid a possible segfault if the C stack
overflows with deep data structures.
There is now support for 64-bit on Windows using either
mingw or Visual Studio.
Added a PolyML.Statistics structure to extract information
about the current ML program or that running in another
process.
The standard "text" and "data" areas are now used for
exported object files. In particular this removes the need
for --segprot when linking the object files on Mac OS X with
previous versions.
libffi is now used for foreign function interface
(CInterface). Among other things this allows the full range
of types to be use on X86/64. A version of libffi is
included in the source but those packaging Poly/ML may
prefer to use the --with-system-libffi option to the
configure script to use the version installed on the
machine.
Withdrawn support for native-code on PPC and Sparc. The
configure script will now fall back to the interpreted
version on these platforms.
Minor Additions and Changes
Added G, M, K suffix to RTS arguments for --maxheap and --minheap.
Some changes to where "op" is allowed to conform more
closely to the Definition.
--debug and --logfile options. These allow fine control of
debugging information within the run-time system.
Added --error-exit option to terminate the top-level loop if
any command raises an exception.
Added PolyML.IntInf with gcd and lcm functions to use GMP's
gcd function if available.
Added PolyML.Compiler.allocationProfiling to work with
PolyML.profiling 4. This causes each full GC to print a
profile indicating where the currently live data has been
allocated.
Removed NetDB structure from the library since this was in
an early draft of the basis library but not in the final book.
Added PolyML.Codetree structure within PolyML. This allows
ML code to build intermediate code data structures and
generate machine code from them.
Added "--use FILENAME" command line argument to run a command
from a file before starting the main Read-Eval-Print loop.
Bug Fixes
Fixes related to Word32 on X86-64 and Word.~>>.
Vol allocation locking issue
Floating point box issue
Fix some functions in the Windows structure to match the
Basis Library definition
Fix a possible crash if a GC happened while another thread
was in foreign code.
Fix error in printer function for a datatype where the
effect of PolyML.print_depth depended on the posiition
of a constructor in the datatype.
Fix bug with flexible record handling.
Fix Real.fmt and Real.toString to conform to the Basis
Library definition.
Fix Real.abs with nan argument.
Fix IEEEReal.toString for nan argument.
Fix code-generator bug which resulted in incorrect result
for Real.nextAfter.
Fix bug the produced Subscript exceptions in stream IO.
Changes in Poly/ML Version 5.4
Major New Features
* Major rewrite of the X86 code-generator and combining the 32 and
64-bit versions into a single module. It now supports the floating
point instructions.
* Changes to the way functions with polymorphic equality are
handled to eliminate the "structural equality" code.
* Uses the GMP library if that is available when Poly/ML is
built otherwise falls back to the old Poly/ML code.
Minor Additions and Changes
* Added a SingleAssignment structure
* Support for the Itanium processor using the interpreted version.
* Various bug fixes.
Major New Features
- Addition of IDE interface support.
- Changes to pretty-printing and equality. These are now inherited
across module boundaries. Addition of PolyML.addPrettyPrinter
to install a new-style pretty printer.
- Reworked implementation of signatures reducing the memory
requirements when a named signature is used in multiple places.
- Improvements to printing of types and error messages.
Minor Additions and Changes
- Support for out-of-tree builds
- Added finalisation for foreign-function interface (CInterface)
- Removed remaining support for ML90
- Added PolyML.sourceLocation pseudo-function that returns the current
source location, PolyML.raiseWithLocation that raises an exception
with an explicit location and PolyML.exceptionLocation that returns
the location where an exception was raised.
- Added PolyML.Compiler.reportUnreferencedIds switch to enable reporting
of unreferenced identifiers.
- Added breakEx and clearEx to debugger functions.
These enter the debugger when the code raises a given exception.
- Improvement to resonsiveness to pipes especially in Windows.
- Added X86-64 version of Word32 structure. 64-bit machines
do not require 32-bit values to be "boxed".
Bug Fixes
- Now builds on Mac OS X 10.6 (Snow Leopard)
- Fix multi-threading on Sparc but now only supports v9 processors.
- Fix timing-related crash when Poly/ML exits
- Fix string argument to OS.SysErr exception
- Fix to OS.FileSys.mkDir in Windows
- Fix to pow(~1, n) where n is even
- Various fixes to conform more closely to the standard.