This file documents changes to the Standard ML of New Jersey system since March of 2000 (around Version 110.26). The change log primarily covers the compiler, the compilation manager (CM), the MLRISC library, and the runtime system. There are occasional entries about other components (e.g., the SML/NJ Library and ML-LPT), but these components have their own change logs that should be consulted.
Version 110.79; 2015/10/04
- [2015/10/04]
-
Patched base/compiler/FLINT/clos/closure.sml so that Twelf will build again. Fixes bug #140 (Lookup failure in closure.sml when compiling Twelf).
- [2015/09/28]
-
Added support for a Successor ML tool to CM. This tool allows one to specify that a source file fool.sml is Successor ML source code in the following ways:
foo.sml : succ-ml foo.sml : sml (succ-ml) foo.sml (succ-ml)
- [2015/09/28]
-
Added the directory base/old-basis to support backward-compatible views of the Basis Library. You can use these by replacing the line
$/basis.cm
with
$/basis-2004.cm
in your CM files.
- [2015/09/28]
-
New implementation of Date structure in the Basis, which fixes bugs #138 (Incorrect behavior for Date.fromTimeLocal) and #139 (Date.date is broken). Note that some more thought should be given to the correct semantics of Date.date when dealing with offsets. For example, should an offset of +23 hours produce the same date as an offset of -1 hours? Currently our implementation produces different results (by a day) for these two situations.
- [2015/09/25]
-
Implemented the changes for Basis Library Proposal 2015-003. This proposal added operations to the following signatures:
signature ARRAY signature LIST signature LIST_PAIR signature MONO_ARRAY signature MONO_VECTOR signature OPTION signature STRING signature TEXT signature VECTOR
and the following structures:
structure Array : ARRAY structure CharArray : MONO_ARRAY structure CharVector : MONO_VECTOR structure List : LIST structure ListPair : LIST_PAIR structure Option : OPTION structure Real64Array : MONO_ARRAY structure Real64Vector : MONO_VECTOR structure String : STRING structure Text : TEXT structure Vector : VECTOR structure Word8Array : MONO_ARRAY structure Word8Vector : MONO_VECTOR
While it is very unlikely that these changes will break existing code, there are a a couple scenarios in which the code might break. Namely, when use of open introduces conflicts and when user code implements one of the affected Basis Library signatures. Both of these examples occurred in the SML/NJ source code; the former in the ml-yacc sources and the latter in the MLRISC sources.
- [2015/09/25]
-
Added the optional implementations of PackReal64Big and PackReal64Little. This addition addresses feature request #82 (Implementations of PACK_REAL missing). The implementation uses the approach suggested by Michael Sullivan.
- [2015/09/24]
-
Fixed bug #45 (Compiler bug in specialize phase). This bug was in compiler/FLINT/opt/fcontract.sml and was the result of a bad interaction between eta contraction and inlining. As part of the fix, I cleaned up the code in this part of FLINT a bit.
- [2015/09/21]
-
Improvements to the error messages produced by the ml-ulex lexer generator.
- [2015/09/21]
-
Added Ref structure and REF signature to Basis implementation ( Basis Library Proposal 2015-007).
- [2015/09/21]
-
Added Fn structure and FN signature to Basis implementation ( Basis Library Proposal 2015-005).
- [2015/08/22]
-
Fixed bug #136 (Incorrect raising of exceptions in Real.fmt and Time.fmt).
- [2015/08/14]
-
Added Either structure and EITHER signature to Basis implementation ( Basis Library Proposal 2015-002).
- [2015/07/23]
-
Fixed bug #135 (Fails to build on Linux PowerPC).
- [2015/07/08]
-
Added Linux 4.* kernels to the list of operating systems recognized by the .arch-n-opsys script (fixes bug #134).
- [2015/06/11]
-
Added Mac OS X 10.11 (El Capitan) to the list of operating systems recognized by the .arch-n-opsys script.
- [2015/05/27]
-
Added support for Successor ML lexical extensions. These can be enabled using the command-line option -Cparser.succ-ml=true or by the assignment
Control.succML := true;
at the REPL. The extensions are as follows:
-
Underscore ("_") as a separator in numeric literals; e.g., 123_456, 0wxff_ff_ff_f3, 123_456.1, …
-
end-of-line comments, which are denoted using (*). End-of-line comments properly nest into conventional block comments. For example, the following block comment is well formed:
(* fun f x = x (*) my identity function *) *)
-
binary literals for both integers and words; e.g., 0b0101_1110, or 0wb1101.
This change is the beginning of a program to add Successor ML feature to SML/NJ; See https://github.com/SMLFamily/Proposed-Definition-of-Successor-ML for more details.
-
Version 110.78; 2014/12/24
- [2014/12/19]
-
Major revision of the machinery for overloading resolution for both operators (vars) and literals, now using a common mechanism. This fixes bug #52 by improving the error message when an overloaded operator is inconsistent with its context. Updated 23 files, including major changes in overload.sml, types.sml, unify.sml, elabcore.sml, typesutil.sml. The overload declaration is still used in pervasives.sml, where the order of the specified instances of an ordering determines the default interpretation (i.e., the first one).
The SCHEME and LITERAL forms of tyvars are replaced by a new OVLD form that tracks potential instantiations of the type of the overloaded vars or literals.
- [2014/12/18]
-
Moved base/NOTES/HISTORY file to doc/src/changelog/HISTORY.txt and converted it to ASCIIDOC format. Have also moved the README files from base/READMES to doc/src/release-notes. These changes are part of a general effort to rationalize and improve the documentation of the SML/NJ system.
- [2014/12/13]
-
Preliminary cleanups before changes to overloading
Minor cleanup in Elaborator/elaborate/elabcore (function elabOVERLOADdec) and in ElabData/types/typesutil.sml (function matchScheme). Preparing for a new method of handling type checking of overloaded operators. [Note that there is no reason for the options field of OVLDvar to be a reference — it is never updated. Changing this requires corresponding change in pickling.]
Also added an etopdebugging flag (ElabControl) for debugging in elabtop.sml. Modified elabcontrol.{sml,sig} and elabtop.sml. Also rearranged ast and absyn printing in evalloop.sml.
- [2014/10/23]
-
Improved error messages in ml-ulex for unclosed strings. Also made documentation improvements.
- [2014/10/11]
-
Added -D_FILE_OFFSET_BITS=64 flag to x86-linux makefile. This flag is necessary to avoid spurious EOVERFLOW errors on some versions of Linux. The problem appears to be limited to large file systems that have more than 232 inodes.
- [2014/09/13]
-
Added %value directive to ml-antlr; this addition improves the error repair choices by allowing non-nullary tokens to be inserted when making repairs.
Version 110.77; 2014/08/22
- [2014/08/21]
-
Created new doc tree in SML/NJ repository. Currently this tree just holds the sources for UNIX-style manual pages for the command-line tools (fixing bug #35). The documentation is written using the ASCIIDOC format. Use the following svn command to checkout a copy of the documentation tree:
svn co https://smlnj-gforge.cs.uchicago.edu/svn/smlnj/doc/trunk doc
- [2014/08/19]
-
Compiling the runtime system on cygwin was failing because the file exceptions.h was missing. It appears to have been part of previous versions, so a version has been incorporated verbatim in the file runtime/mach-base/cygwin-fault.c file (fixes bug #125).
- [2014/08/19]
-
Added the actionToString' and repairToString' functions to the AntlrRepair structure. These functions allow one to specialize the printing of tokens based on whether they are being added or deleted.
- [2014/08/17]
-
Added patches to support OpenBSD on PowerPC. The patches were contributed by Jasper Lievisse Adriaanse (fixes bug #124).
- [2014/08/17]
-
Use mkstemp to implement OS.FileSys.tmpName() on systems that support it (should be all modern versions of Unix). This change fixes bug #128. (Thanks to Johannes 5 Joemann).
- [2014/08/17]
-
Fixed a bug in IntInf.~>>, which did not handle negative arguments correctly (bug #110).
- [2014/08/14]
-
Fixed a problem in the CPS contraction phase. An optimization that eliminates construction of a record that already exists was not checking that the existing record was the same record kind (bug #119).
- [2014/07/28]
-
Switch to using MAP_ANONYMOUS to allocate memory on Linux systems. This change avoids problems when "/dev" does not support execute permission (as seems to be the case with some versions of Linux running on ChromeBooks; bug #120).
- [2014/06/28]
-
Fix for bug #127 (Crash on Windows with OS.Process.system).
- [2014/06/07]
-
Fixed a long-standing bug in Socket.recvVec, which prevented the result from being used in a string pattern match (thanks to Vesa Norrman for the fix).
- [2014/05/01]
-
Fixed minor issue in an error message; type variable name should be printed with leading '.
- [2013/11/25]
-
Added PackWord{16,32}{Big,Little} structures to the Unsafe module. This change makes the UNSAFE signature closer to the MLton version, although we still need to add the PackReal structures.
Version 110.76; 2013/07/01
- [2013/06/04]
-
Fix bug #115 (BinPrimIO writer method getPos does not work under CML). Just needed to port the position update from mkReader code to the mkWriter code.
Lars Bergstrom
- [2013/06/04]
-
Fix bug #111 (Socket.acceptNB returns somewhat broken sockets). The problem was that under Win32, sockets returned from accept inherit their parents' non-blocking status, whereas on UNIX they are always blocking.
Lars Bergstrom
- [2013/05/20]
-
Fix bug #117 (BinIO.openAppend raises IO on non-existent file). We were opening the file for append if it existed but not creating it if it did not exist.
Lars Bergstrom
- [2013/05/02]
-
Fix bug #116 (Socket.sameDesc raises Match exception). The problem is that on Windows the iodesc datatype (defined in Basis/Implementation/Win32/pre-os.sml) has both an IODesc constructor and a SockDesc constructor. Updated the code in Win32/os-io.sml to handle the SockDesc constructor.
- [2013/04/19]
-
Fix bug #113 (Socket.select waits exactly twice the indicated timeout)
- [2013/01/19]
-
Fix AMD64 code generator to properly sign-extend arguments to IDIVQ.
Lars Bergstrom
- [2012/10/20]
-
Fix bug #108 (off-by-one error in Util/dynamic-array.sml; iterators crash)
- [2012/10/20]
-
Fix bug #107 (Bogus Int64 comparison operators)
Version 110.75; 2012/10/01
- [2012/09/28]
-
Fixed bug #92. IntInf.scan now handles the "0x" prefix correctly. Also made minor improvements to the NumScan module.
- [2012/09/24]
-
Added Base64 module to SML/NJ Library to support encoding and decoding Word8 vectors as base64 strings.
- [2012/09/23]
-
Additions to the SML/NJ Library. Added exists, existsi, all, and alli functions to ORD_MAP signature and implementations, and added all function to ORD_SET signature and implementations.
- [2012/09/21]
-
Bug fix in ml-antlr to ensure that the generated toString function for tokens is strictly legal SML code (i.e., non-printing characters and UTF8 multibyte sequences are properly escaped).
- [2012/09/11]
-
Added getu function to ULexBuffer as a way to improve ml-ulex performance. This addition allows a fastpath for processing ASCII characters, which improved lexer performance by 3-4%.
- [2012/02/05]
-
Fixed bug #88. The check for valid arcs on Unix systems now allows any character other than slash or nul.
Version 110.74; 2012/01/20
- [2012/01/20]
-
Fixed implementation of Real.signBit on little-endian machines.
- [2012/01/19]
-
1) Fix for bug #60 recalculate strictness for DEFtycs in functor bodies when functor is applied (Elaborator/modules/evalent.sml)
2) Fix for bug #77 separate ast representations for datatypes and datatype replications in decs and specs (multiple files)
3) set version to 110.74
Details in NOTES/changes/dbm_2012_1.
David MacQueen
- [2012/01/12]
-
-
Change of SourceMap interface. related to fix of off-by-one error in lexer (committed earlier?), and cleanup of noweb code added by Norman Ramsey many years ago (but little used today).
-
Slight cleanup of match compiler, eliminating compiler/FLINT/tempexpn.sml file that was part of unused implementation of pattern templates (pattern macros).
-
Modification of type checker to add "culprit tracking" for improved type error messages (printing of additional culprit information is controlled by ElabControl.showTypeErrorCulprits flag, default false, added in revision 3652). The culprit tracking needs to be debugged and improved, and the presentation of the culprits needs to be done better.
Details in NOTES/changes/dbm_2012_1.
David MacQueen
-
- [2011/11/25]
-
Bug fixes for Unsafe.blastRead (bug #76): . proper error handling when reading from memory and there are not enough bytes. . pass correct data pointer and length to BlastIn (code was using old macros).
- [2011/11/25]
-
Added hash-table-based implementation of sets to SML/NJ Library.
- [2011/05/23]
-
Added new S-expression library to SML/NJ Library (contributed by Damon Wang)
- [2011/05/17]
-
Fixed bug in JSON scanner (SML/NJ Library). It didn’t handle escaped backslash or double quote correctly.
Version 110.73; 2011/05/13
- [2011/05/10]
-
Added boolean literals (true and false) to the conditional-expression syntax in CM. Thus, you can write
#if true structure Foo #endif
in a CM file. This change is meant to make it easier to use autoconf to configure the build process of an SML application.
- [2011/05/09]
-
Added missing String.scan function (bug #69). This also fixes the handling of certain corner cases by String.fromString.
- [2011/05/03]
-
Added the RTDSC and RTDSCP instructions to the amd64 code generator.
- [2011/04/08]
-
Added fix for comments in code bug (bug #63). Thanks to Michael Norrish.
- [2011/04/08]
-
Fixed bug in Socket.acceptNB (bug #59)
- [2011/03/31]
-
Fixed syntax error in ml-lex compatibility mode (bug #49)
- [2011/03/22]
-
Update _arch-n-opsys script for Mac OS X Lion (10.7).
- [2011/02/18]
-
Added Barriers module to CML.
- [2011/02/10]
-
Fixed ml-yacc examples to respect the changed signatures with respect to TextIO.inputLine.
Lars Bergstrom
- [2010/09/16]
-
Changed the Win32 implementation of validArc to support directories with extended characters (umlauts, etc.).
Lars Bergstrom
- [2010/09/16]
-
Fixed the Win32 socket and polling implementation to work correctly with CML. Signature of poll was wrong and didn’t handle sockets at all.
Lars Bergstrom
- [2010/06/16]
-
Fixed Real.toString and Real.fmt to include sign for negative zero.
- [2010/03/23]
-
Fixed the bug with Win32 calls to OS.Process.system not quoting the string.
Lars Bergstrom
Version 110.72; 2010/02/02
- [2009/12/20]
-
Fixed performance bugs in List module by making @ and foldr be tail recursive (bug #51).
- [2009/12/11]
-
Fixed the Win32 unable to print long strings bug (bug #37).
Lars Bergstrom
- [2009/12/10]
-
Fixed an overrun during major GC. If the string arena was nearly full, it was possible for alignment padding added during copy to the to-space to overrun the allocated size.
Lars Bergstrom
- [2009/11/18]
-
The ml-antlr and ml-ulex programs have been ported to build under mlton.
- [2009/11/17]
-
Added %header directive to the ml-ulex scanner generator. Also updated the documentation.
- [2009/11/17]
-
Added @SMLsuffix flag to sml command. This flag can be used to get the suffix for heap files.
- [2009/11/17]
-
Added --strict-sml flag to ml-ulex for MLton compatibility.
- [2009/11/10]
-
Added %header directive to the ml-antlr parser generator. Also updated the documentation.
Version 110.71; 2009/09/16
- [2009/09/13]
-
Changes to support compiling the runtime system on Mac OS X 10.6 (aka Snow Leopard).
- [2009/08/19]
-
Fixed a bug in the register-spill generator that is part of the MLRISC register allocator. The problem was that the code in RASpillWithRenaming functor assumed incorrectly that dedicated registers would appear in def/use information generated by ClusterRA. Thanks to Allen Leung for helping with this bug.
- [2009/07/09]
-
Removed redundant implementations of various top-level operations by consolidating them in base/system/smlnj/init/pervasive.sml. This change also fixes a bug in that the top-level version of round was incorrect.
Version 110.70; 2009/06/15
- [2009/06/12]
-
-
Corrected problem in config/actions that led to the so-called "unpickling bug" which appeared in version 110.68.
-
Provided fix for the 64-bit pattern match bug.
-
- [2009/03/21]
-
Fixed bug in Int32.fmt when the argument was the minimum int and the radix was something other than DEC.
- [2009/02/21]
-
Fixed bugs in how ml-antlr parsed ML types in %tokens specifications.
Aaron Turon
- [2009/01/13]
-
Picking up some additional fixes for 110.69, including a fix for spaces in CM file paths.
Version 110.69; 2008/12/22
- [2008/12/06]
-
Re-enabled some CPS optimizations (first_contract and eta). The most important effect of this change is to make uses of SMLofNJ.Cont.capture be properly tail recursive.
- [2008/12/03]
-
New concurrency-related instructions for x86 and amd64 code generators.
-
PAUSE: Notify the CPU that the program is spin waiting.
-
MFENCE: memory fence for reads and writes.
-
SFENCE: memory fence for writes.
-
LFENCE: memory fence for reads.
- [2008/12/02]
-
Added makefile and other support for building runtime on OpenBSD.
Version 110.68; 2008/08/13
- [2008/08/11]
-
Minor fix to ml-ulex backend for regexps that match any character and perform a single action. Previously the emitted code would not allow the regexps to match any character at all.
Aaron Turon
- [2008/08/05]
-
Added build support for OpenBSD (thanks to Brian O’Hanlon).
- [2008/07/12]
-
Fixed Int64.fromString to use base-10.
- [2008/04/12]
-
Various updates to the ml-lpt tree. The documentation has been updated; bugs in the parsing of negation and character classes in ml-ulex have been fixed; and changes have been made to make the ml-lpt tools more compatible with MLton (and other SML implementations). Thanks to Matthew Fluet and Aaron Turon for their patches.
- [2008/20/04]
-
Implemented timer-based profiling on Windows, with behavior as close to the *nix ITIMER-based profiling as possible.
Lars Bergstrom
- [2008/07/04]
-
Finished off the Windows subset of the basis library. Added process support and various configuration and system identification utils.
Lars Bergstrom
- [2008/03/18]
-
Major changes to the RegExp library: see smlnj-lib/CHANGES for details.
- [2008/02/14]
-
Added the Windows Status structure
Lars Bergstrom
- [2008/02/14]
-
Added the Windows DDE structure
Lars Bergstrom
- [2008/02/05]
-
Added the Windows Config structure
Lars Bergstrom
- [2008/01/31]
-
Added outline of the Windows basis library and the basic registry functionality.
Lars Bergstrom
- [2008/01/23]
-
Fixed the amd64 code generator to compile with the current MLRISC.
- [2007/11/26]
-
nlffi was updated to work on Windows. It needed to pass in the correct value for the name of the kernel32 DLL to obtain base bindings. Additionally updated the README for the most basic nlffi sample with what you need to do on MacOSX and on Windows to make it work.
Lars Bergstrom
- [2007/11/21]
-
Overwrite the SMLNJ_HOME environment variable on installation Properly change the package code so that subsequent version installations prompt for uninstall (instead of repair/remove)
Lars Bergstrom
- [2007/11/14]
-
Cleaned up WININSTALL file for new MSI-based setup.
Lars Bergstrom
Version 110.67; 2007/11/13
- [2007/11/12]
-
Ensure that the size of the allocation space is at least 128K.
- [2007/11/05]
-
Fixed type error in ml-lpt library that occurs when compiling against a basis that was compiled with the USE_64_BIT_POSITIONS symbol set. (Thanks to Johannes Joemann)
- [2007/11/03]
-
Fixed the amd64 code generator to compile with the current MLRISC.
- [2007/11/02]
-
Made sml.bat more resilient to either not having run the installer and having no SMLNJ_HOME set or having just shuffled the directory around.
Lars Bergstrom
- [2007/11/01]
-
A collection of bug fixes for machine.sml in the Reactive library. (Thanks to Timothy Bourke)
- [2007/10/28]
-
Patches for Mac OS X 10.5 (Leopard).
- [2007/10/28]
-
Fixed some bugs in the AMD64 floating-point spilling code.
- [2007/10/25]
-
Added support for the atomic XCHG instruction.
- [2007/10/22]
-
Added AMD64 support for floating-point negation.
- [2007/10/22]
-
Fixed ^C handling in Windows Added a Windows installer Made it possible to build for Windows on a mapped drive from Parallels
Lars Bergstrom
- [2007/10/22]
-
Added AMD64 support for the atomic fetch and add instruction.
- [2007/10/18]
-
The GAS output now favors p2align over align, since the former is guaranteed to be consistent over multiple architectures and the latter is not.
- [2007/10/18]
-
Fixed a bug in register spilling.
- [2007/10/2]
-
Added demo support for AMD64 for quick testing and fixed support for 64-bit label constants.
- [2007/09/20]
-
Added support for the MLRISC COND instruction and the x86-64 CMOVCC instruction.
- [2007/09/17]
-
Fixed an instruction-selection bug when loading 64-bit labels.
- [2007/09/14]
-
Fixed Elaborator and Translate performance bugs
- [2007/09/12]
-
Fixed xorl memory argument bug.
- [2007/07/27]
-
Added f64sgn (for Real64.signBit) as a primop defined in MLRiscGen. signBit(~0.0) not handled correctly.
- [2007/06/21]
-
Fixed bug in {TextIO,BinIO}.StreamIO.endOfStream that would incorrectly signal end of stream.
- [2007/06/12]
-
Eliminated config/allsources. The information is now drawn directly from config/actions.
Version 110.65; 2007/06/07
- [2007/06/06]
-
-
Aaron: fixed a number of bugs in ml-ulex.
-
Matthias:
-
added CM control cm.force-tools; this is false by default; when set to true, then tools like ml-yacc, ml-lex, ml-ulex, etc. will be forced to run regardless of whether or not their targets are up-to-date
-
changed installer code so that config/install.sh will re-build heap images for all tools even if those heap images already existed
-
-
- [2007/06/04]
-
After Aaron Turon’s bug fix for ml-ulex (handling the ^ character in legacy mode), re-ran the lexer generator on all lex input files and committed the results.
This should fix the problem with ckit and nlffi that was reported by Vesa A. Norrman.
Version 110.64; 2007/05/31
- [2007/05/31]
-
3rd merge of base from primop-branch-3 into the trunk. Additional bug fixes included:
-
Timer.cpu_timer, etc. type printing corrected (by making Timer have opaque sig constraint in basis/Implementation/timer.sml)
-
Infinite loop in FLINT (tests/typing/tests/25.sml) (fix by Stefan Monnier)
Dave MacQueen
-
- [2007/05/31]
-
Fixed some bugs in new Div code in FLINT/trans/translate.sml.
Also, changed the handling of "no core access": When translate.sml needs access to a core exception at a time when the core has not been set up yet (this only happens when compiling system/smlnj/init/*), then don’t bother generating the corresponding tests.
The old scheme was to generate a bogus value to be used in place of the exception. Unfortunately, that confuses the plambda type checker. Moreover, it does not do any good, because at runtime we don’t expect such an exception to be ever raised. (The code in system/smlnj/init/* has to be written very carefully with this in mind!)
- [2007/05/29]
-
Added FSQRT instructions for the AMD64 code generator.
- [2007/05/29]
-
FLINT/trans/translate.sml now wraps all DIV/MOD/QUOT/REM operations with an explicit test for zero division. This should fixe several regressions and makes it possible for downstream optimization phases to treat these operations as "pure" when they are applied to unsigned operands.
- [2007/05/29]
-
Added the new MLRISC code generator for the AMD64. This version, in contrast to the previous one, uses SSE registers and instructions for all floating-point computations.
- [2007/05/29]
-
A number of fixes related to the formatting of dates. These include fixes for bugs #1415 and #1416. We also now correctly handle format characters that lie outside the specified set.
- [2007/05/23]
-
CMB (and CM) now automatically defines the CM "preprocessor" symbol NO_PLUGINS during "makeml -rebuild" or when CM operates in "slave" mode.
(In addition, CMB_REBUILD_MODE is defined for +makeml -rebuild+, CM_SLAVE_MODE is defined in attached slaves while running CM.make or CM.rebuild, and CMB_SLAVE_MODE is defined in attached slaves while running +CMB.make+. The point is that the single symbol NO_PLUGINS is definde in all three cases.)
I changed the three locations within the sources that get compiled during CMB.make where ml-yacc or ml-lex input is processed: When NO_PLUGINS defined, then the use of the mlyacc and mllex tools is bypassed.
When bootstrapping new versions of the compiler, there can be situations where the plugin tools for ml-yacc and ml-lex (or ml-ulex) are not available or otherwise not operational. In this case one can manually define the NO_PLUGINS symbol prior to running CMB.make(). To do so, the following command should be issued at the interactive prompt:
#set (CMB.symval "NO_PLUGINS") (SOME 1);
A CMB.make with NO_PLUGINS defined relies on the existence of the files that normally would be generated by ml-yacc and ml-lex. (Copies of these files are in the repository.)
- [2007/5/23]
-
Second merge of base from primop-branch-3 into the trunk. Additional bug fixes included:
-
Date.scan and Date.fromString fixed;
-
Overloading resolution fixed and some type printing problems corrected.
+ David MacQueen
- [2007/05/23]
-
Changed the installation mechanism for CM tool plugins. These are just libaries and now get installed like ordinary libaries.
There are now a number of new installation targets that give some fine-grain control over what classes and suffixes are known, and what they will map to. See config/targets for details.
The code that caused plugin installation as part of running a tool’s "build" script has been removed. (The build script is for building, not for installing.)
- [2007/05/22]
-
Added a boolean control named cm.tolerate-tool-failures (env. variable name: CM_TOLERATE_TOOL_FAILURES). The default is false and makes CM fail if a shell tool reports a non-success exit status. If the control is set to true, then CM will press on after tool failures in the event that the target files exist (even though they are considered outdated). Turning the control to true can be useful for bootstrapping.
- [2007/05/19]
-
Merge of ml-lpt revisions for 110.64.
The name of several ml-lpt-lib modules has changed:
Repair
⇒
AntlrRepair
StreamPos
⇒
AntlrStreamPos
ErrHandlerFn
⇒
AntlrErrHandler
EBNF
⇒
AntlrEBNF
The ml-antlr specification format has changed: declarations such as %tokens and nonterminal definitions can occur multiple times in the same specification. The semantics are such that each new declaration extends the previous ones. This does not apply to %start or %name, of course.
Importing a grammar via %import now includes all declarations in from the imported grammar, except for %name, %entry, and %start. Tokens and nonterminals can be dropped using the new %dropping clause of the %import directive; the separate %drop and %extend have been removed.
We now allow optional type annotations on nonterminals, using the %nonterms directive as in ml-yacc.
The refcell construct is now implemented using SML’s regular reference cells, so the :== and !! notation has been deprecated.
The ml-antlr tool now does much more checking of specifications, and its error messages have been greatly improved. Error repair for generated parsers has been completely rewritten, and is now both much faster and more accurate.
ml-ulex is now more lenient with escape codes (non-SML-standard escape codes are now interpreted literally, so e.g., \| denotes "|"). Also, character classes may now include a "-" character at the beginning as is standard in most other regexp tools.
All of these changes are documented in the user guide, which has been updated and improved with this merge.
- [2007/05/03]
-
Merge of the primop3 branch (base) into the trunk to create 110.63.1. Significant changes in FLINT and the front end, mostly having to do with a reorganized system for handling primops. Various bug fixes and improvements in printing signatures.
- [2007/05/02]
-
Preliminary commit of large ml-lpt revisions (more to come for 110.64). The ml-antlr specification format has changed: declarations such as %tokens and nonterminal definitions can occur multiple times in the same specification. The semantics are such that each new declaration extends the previous ones. Grammar extension constructs have also changed. We now allow type annotations on nonterminals. Finally, the refcell construct is now implemented using SML’s regular reference cells, so the :== and !! notation has been deprecated. All of these changes will appear in the 110.64 user guide for ml-lpt.
The ml-antlr tool now does much more checking of specifications, and its error messages have been greatly improved. There has also been some work on the error repair process for generated parsers, but this will be further improved in 110.64.
- [2007/04/24]
-
More Basis fixes: The Char.fromString (etc.) functions did not handle the "\uxxxx" escape sequence. There is still an outstanding bug with String.fromString the tail is a format escape. I added a comment to this effect in Basis/Implementation/string.sml. Thanks to Andreas Rossberg.
- [2007/04/24]
-
Added next function to Fifo and Queue modules in the SML/NJ Library.
- [2007/04/23]
-
More Basis fixes: Time.fmt dropped the leading "~" for negative time values that had no whole part.
- [2007/04/23]
-
More Basis fixes: the OS.Path module did not include the InvalidArc exception and did not do sufficient argument checking. Thanks to Stephen Weeks and Adam Chilpala.
- [2007/04/16]
-
Fixed an unbound functor bug in the AMD64 CM file.
- [2007/04/12]
-
Substantially changed the signature and implementation of AMD64 SVID. It now looks similar to the ia32 SVID, yet uses staged allocation.
- [2007/04/07]
-
More Basis fixes: the WORD signature was missing {to,from}Large. Thanks to Andreas Rossberg.
Version 110.63; 2007/03/22
- [2007/03/19]
-
Fixed bogus operand sizes in AMD64 instruction spilling.
- [2007/03/19]
-
Fixed a number of inconsistencies between the Posix.TTY structure and the Basis specification. Thanks to Adam Chilpala.
- [2007/02/26]
-
Added preliminary support in MLRISC for Staged Allocation, a technique for specifying calling conventions (see http://www.eecs.harvard.edu/~nr/pubs/staged-abstract.html). Initially, we plan to use this code to generate C calls for the AMD64.
The staged allocation code base resides in MLRISC/staged-allocation, and specialized calling conventions go in MLRISC/ARCH/staged-allocation.
- [2007/02/20]
-
Bug fix: when SaveCState was called with two values to save, a subsequent GC could cause the RestoreCState to fail because the saved state had been promoted to tagless pair.
- [2007/02/20]
-
Fixed bug triggered by:
val a1 = Word8Array.array(a1, 0w0); val _ = Word8Array.update(a1, 0, 0w128);
The x86MCEmitter crashed when the immediate operand to MOVB was outside of the range -128 … 127. I’ve changed the code so that the range check is disabled. Only the low order 8 bits of the immediate operand are now significant.
Allen Leung
- [2007/02/15]
-
Eliminated any mention of lexgen, which was an early precursor to ml-ulex.
You should update your admin directory, so the shell scripts for maintaining your local copy of the repository reflect this change.
- [2007/02/14]
-
Fixed bug in CM’s parallel make facility that failed to have the master re-link modules after letting slaves compile them.
- [2007/02/12]
-
Fixed typo in ml-build script that prevented library anchors from being registered.
Version 110.62; 2007/02/02
- [2007/01/31]
-
Brought ml-lpt manual up-to-date with the code. Many minor improvements to the tools, and a few minor bugfixes. Prepared ml-lpt-lib for integration with new UTF8 structure. Changed the interface for creating streams in ml-ulex (we now support stream creation from several kinds of sources). Overall, the tools are now quite stable, and their interfaces are unlikely to change in a way that would break compatibility. More work, however, is needed in the documentation.
- [2007/02/01]
-
Implemented library installer. Moved CM plugin code for ml-burg, ml-lex, and ml-yacc out of CM source tree and into their respective trees. Implemented CM plugin for ml-ulex and ml-antlr. Used library installer for ml-burg, ml-ulex, and ml-antlr.
For ml-yacc and ml-lex we continue to have permanently "plugged-in" CM tools. (It turns out to be too messy to do otherwise because there is too much code that during installation relies on the presence of these tools — resulting in a tricky ordering problem.)
- [2007/01/30]
-
Added SMLofNJ.shiftArgs which is like a shell’s "shift" command. Modified CM’s startup code to use shiftArgs as it processes command line arguments. This way, the init code in each .sml-file or library that is mentioned at the top level will see only those arguments that have not yet been processed at this point. In other words, the init code can "seize control" and process the remaining command line.
- [2007/01/30]
-
Added fromList function to the ORD_SET interface and lookup to the ORD_MAP interface. See the SML/NJ Library CHANGES file for details.
- [2007/01/28]
-
Added the UTF8 structure and signature from the Moby compiler to the SML/NJ library (and the CML library). These modules will replace the version in the ml-lpt-lib.
- [2007/01/26]
-
Added entries to handle ml-lpt-lib.cm in installer.
Version 110.61.1; 2006/12/15
- [2006/12/15]
-
Fixed brown-paper-bag bug with CM’s pathname handling, which made installation fail under Win32.
This supersedes the pre-brown-paper-bug release (see below).
Version 110.61; 2006/12/14
- [2006/14/06]
-
Fixed the code in runtime/c-libs/posix-tty/{tcgetattr,tcsetattr}.c to get the c_cc termios data copied correctly. Also moved the allocation of the string to avoid problems if it caused a GC.
Thanks to Timothy Bourke for the bug report and fix.
- [2006/12/08]
-
Added code to CM’s "standard shell tool" implementation which causes it to tolerate (with a warning) the situation where the shell command fails (e.g., due to the shell command’s non-existence) as long as all target files exist.
This makes it possible to, e.g., build ml-yacc from sources even if svn checkout messed up the time stamps on files in such a way that yacc.grm is younger than yacc.grm.sml or yacc.grm.sig. (Ml-yacc would be needed to re-process yacc.grm, but obviously it might not yet be available at that time.)
- [2006/12/06]
-
Fixed the types of recvVecFrom, recvVecFrom', recvVecFromNB, and recvVecFromNB' in the SOCKET signature. This error is actually in the SML Basis specification too.
- [2006/12/05]
-
CM now reports undefined anchors as errors and aborts execution rather than silently pressing on using bogus values.
- [2006/11/29]
-
Use Say.vsay for printing the "[autoloading]" message, so #set CM.Control.verbose false (or -Ccm.verbose=false) can be used to suppress them.
- [2006/11/10]
-
Fixed bug in CM where "with:" specifications that affect compilation (as opposed to parsing) were ignored.
Version 110.60; 2006/11/09
- [2006/11/09]
-
This is the first subversion-hosted release. There are also changes to the directory layout. Here is a table:
config
⇒
config
src/cm
⇒
base/cm
src/compiler
⇒
base/compiler
src/runtime
⇒
base/runtime
src/system
⇒
base/system
src/cm/pgraph
⇒
pgraph
src/READMES
⇒
base/READMES
src/$note
⇒
base/NOTES/$note
for note in BOOT CVSNOTES CYGWININSTALL HISTORY INSTALL MACOSXINSTALL WININSTALL
src/smlnj-lib
⇒
smlnj-lib
src/MLRISC
⇒
MLRISC
ckit
⇒
ckit
src/cml
⇒
cml
src/eXene
⇒
eXene
src/heap2asm
⇒
heap2asm
src/lexgen
⇒
lexgen
src/ml-burg
⇒
ml-burg
src/ml-lex
⇒
ml-lex
src/ml-yacc
⇒
ml-yacc
src/ml-nlffi-lib
⇒
nlffi/lib
src/ml-nlffigen
⇒
nlffi/gen
src/smlnj-c
⇒
smlnj-c
src/tools/TraceDebugProf
⇒
trace-debug-profile
(All pathnames are relative to the SML/NJ "root" directory.)
In addition, there is also a new
ml-lpt
directory containing two new program generator tools: ml-ulex and ml-antlr (a lexer generator that handles unicode and an ANTRL-inspired LL(k) parser generator). These tools are currently "beta-quality"
The latest versios of the sources can now be obtained anonymously via subversion. For this, it is useful to first check out
svn://smlnj-gforge.cs.uchicago.edu/smlnj/admin
and put the resulting directory on your shell’s PATH. This provides access to three shell scripts: checkout-all.sh, stat-all.sh, and refresh-all.sh.
To create a freshly checked-out copy of the sources, do
checkout-all.sh [dir]
where dir is the optional SML/NJ root directory (default is ".").
This creates the above directory layout. Each subdirectory of the root is under individual subversion control. The stat-all.sh and refresh-al.sh scripts apply "svn stat" or "svn update" to each of these subtrees.
- [2006/11/02]
-
Reorganized directory layout.
This is a temporary solution, more reorganization is to come.
The basic idea is to have a number of toplevel trees, each corresponding to a well-defined part of the overall system. Each part can be maintained individually, even in separate source repositories, although currently we still serve everything out of the main smlnj-gforge tree.
Installer and and scripts have been updated to reflect the new layout. The installer (base/src/system/smlnj/installer) is now "scriptable" to avoid burning too much knowledge about the layout into SML source code. The main script used by the installer is in config/actions.
The main change is that many of the subdirectories of what used to be known as "src" have moved to the toplevel. The "src" directory itself has moved down into a subtree called "base". (We may eventually get rid of the extra level of indirection represented by "src".)
The layout is now as follows:
toplevel tree name default repository (using svn://smlnj-gforge.cs.uchicago.edu/smlnj for $gf) config
$gf/config/trunk
base
$gf/sml/trunk
smlnj-lib
$gf/smlnj-lib/trunk
MLRISC
$gf/MLRISC/trunk
ml-yacc
$gf/ml-yacc/trunk
ml-lex
$gf/ml-lex/trunk
ml-burg
$gf/ml-burg/trunk
lexgen
$gf/lexgen/trunk
heap2asm
$gf/heap2asm/trunk
cml
$gf/cml/trunk
eXene
$gf/eXene/trunk
ckit
$gf/ckit/trunk
nlffi
$gf/nlffi/trunk
smlnj-c
$gf/smlnj-c/trunk
In $gf/admin there are a few useful shell scripts for checking out and maintaining the entire collection of trees:
- admin/checkout-all.sh [dir]
-
optionally creates dir and checks out all trees from their default repositories; if dir is missing, checkout into the current working directory.
- admin/refresh-all.sh [dir]
-
looks at all trees (from the above list) in dir (default: .) and runs "svn update" if the tree exists and is under subversion control; non-existing or non-subversion trees are skipped
- admin/stat-all.sh [dir]
-
like refresh-all.sh, but runs "svn stat" instead
- [2006/10/05]
-
Merged code for AMD64 backend (Mike Rainey’s work). Everything is hooked up but untested.
Version 110.59; 2006/05/17
- [2006/05/17]
-
I am freezing 110.59. Changes other than the version-number increase:
- eXene
-
committed changes to eXene from Alley Stoughton: "fixed bugs in X authorization and resource handling, as well as in the pile and viewport widgets"
- Runtime
-
fixed linking problem with *NetBSD 3.x*.
- Lexgen
-
-
lexgen tool handles non-ascii characters in 7-bit mode the same way that ml-lex does
-
lexgen propagates exceptions the same way that ml-lex does
-
- CML
-
Fixed a bug in the SyncVar polling functions (iGetPoll, mTakePoll, and mGetPoll) that could lead to livelock.
- [2006/05/12]
-
Implemented ml-makedepend (i.e., CM.sources) in a better (more robust) way. This should hopefully fix the ml-makedepend problem permanently.
- [2006/05/12]
-
Fixed long-standing bug with ml-makedepend where it would output a spurious dependency to a non-existing file. (This is a simple fix. It might need further looking into.)
- [2006/04/20]
-
Committed patches received from Johannes 5 Joemann<EMAIL_ADDRESS>that enable heap2exec under Linux and FreeBSD.
- [2006/04/14]
-
MLRISC changes:
-
renamed GAS_PSEUDO_OPS to AS_PSEUDO_OPS and put it in its own file.
-
added support for NOTB and XORB operators in pseudo-op expressions
-
added DarwinPseudoOp functor that supports Darwin’s assembler syntax.
-
added support for 64-bit integer literals
-
Version 110.58; 2006/03/03
- [2006/03/01]
-
Incorporated several bugfixes to lexgen. Compiler now compiles to fixpoint when using lexgen instead of ml-lex.
- [2006/02/28]
-
Removed ml-flex and added lexgen instead, using Aaron Turon’s newly provided tarball. The generated lexers still have problems.
- [2006/02/26]
-
Removed ml-flex's dependency on regexp-lib.cm. Turned installation of ml-flex on by default.
- [2006/02/24]
-
Added ml-flex sources. Partially integrated, but should not be turned on yet! (Read: leave it commented-out in config/targets!)
- [2006/02/23]
-
Changes to support building on x86-64 systems (using the 32-bit mode). Also cleaned up signal handling on Linux. Support for pre-2.2 Linux kernels dropped.
- [2006/02/22]
-
CM has changed. Updated the script for rebuilding the MLRISC generated files.
Allen Leung
- [2006/02/14]
-
Hooked code for Darwin-specific Intel ABI into main compiler. (This is a temporary solution which relies on the fact that the compiler itself does not use NLFFI. Eventually we need to divorce intel mac from generic x86 unix code and make separate sets of binaries.)
- [2006/02/13]
-
Changed MLRISC x86 CCalls for partial support of Mac OS X ABI.
- [2006/02/06]
-
Changes to support Mac OS X on Intel hardware. The C-calls support in MLRISC must also be updated to support the Mac OS X ABI.
- [2005/12/16]
-
Improved error reporting and handling in CM.
- [2005/11/21]
-
Enabling $/html-lib.cm in config/preloads did not work. This is fixed now. (Since the anchor mapping for html-lib.cm is not yet in effect at the time when config/preloads is processed, the library has to be referred to by another name. In 110.57 this would be $SMLNJ-LIB/HTML/html-lib.cm. I arranged for $smlnj/smlnj-lib/html-lib.cm to be valid as well.)
Thanks to Todd Wilson (Fresno) for alerting me to this issue.
Version 110.57; 2005/11/19
- [2005/11/19]
-
Fixed a problem in config/install.sh where it tries to "fish" the name of the CM metadata directory from the wrong place (because the physical location of basis.cm has changed). Also, corrected the path anchor for $/html-lib.cm. (Thanks to M. Fluet for pointing out these problems.)
Version 110.57; 2005/11/16
- [2005/11/16]
-
Fixed problem with bogus exception message when using back-trace facility.
- [2005/11/15]
-
Added simple implementation of Array2.copy. (Warning: mostly untested.)
- [2005/11/15]
-
Reversed change to src/system/smlnj/internals/versiontool.cm. This file gets loaded as a tool — by the equivalent of CM.make during the run of CMB.make. Thus, CMB’s path configuration is meaningless for it. Instead, it has the status of "user code", so it should use $/basis.cm to refer to the Basis library. (At least that’s true for the purpose of bootstrapping the previous change. In the future it might make sense to have versiontool.cm refer to $smlnj/basis/basis.cm, i.e., the version of the Basis that the compiler itself uses.)
Also patched src/system/testml to have it activate those extra anchor bindings in config/extrapathconfig.
- [2005/11/15]
-
This change affects the way the following libraries are tied into the system:
$/basis.cm $/smlnj-lib.cm $/pp-lib.cm $/controls-lib.cm $/html-lib.cm $/ml-yacc-lib.cm
These libraries are now internally (as seen from the source code of the implementation itself) known by the following names:
$smlnj/basis/basis.cm $smlnj/smlnj-lib/smlnj-lib.cm $smlnj/smlnj-lib/pp-lib.cm $smlnj/smlnj-lib/controls-lib.cm $smlnj/smlnj-lib/html-lib.cm $smlnj/ml-yacc/ml-yacc-lib.cm
This makes it possible to work with code that requires different versions of these libraries, and which refers to these libraries using their "default" names (i.e., the first set of names above). In other words, one can un-define or re-define those default names without compromising the proper functioning of the compiler itself.
A similar procedure had already been performed for several of the MLRISC libraries that are linked into the compiler. I did some cleanup on this code.
A new file in the config directory (named extrapathconfig) is responsible for setting up path anchors that the compiler itself does not need, but that are typically required by user code.
- [2005/11/07]
-
Fixed erroneous out-of-bounds test in the "update" function of various *ArraySlice modules. (Thanks to Vesa A. Norrman for pointing out the problem.)
Pushed some Basis changes through ML-Lex, CML, and eXene.
Matthias Blume
- [2005/11/07]
-
Fixed a Basis incompatibility: The depreciated function Substring.all was removed (use Substring.full instead).
- [2005/11/05]
-
Tweaked interval set API in SML/NJ library; see the CHANGES file for details.
- [2005/11/02]
-
-
Runtime system bootstrap code now accepts hex digits in BOOTLIST in either upper case or lower case format.
-
Pushed changes to names of Pack<N>{Big,Little} structures through CML and eXene.
-
- [2005/11/02]
-
Fixed a Basis incompatibility: Pack<N>{Big,Little} structures should be named PackWord<N>{Big,Little}.
- [2005/10/28]
-
Fixed a minor Basis incompatibility: hex digits should be upper case.
Version 110.56; 2005/10/25
- [2005/10/25]
-
Added interval sets to utility library (signatures INTERVAL_DOMAIN and INTERVAL_SET, and functor IntervalSetFn).
- [2005/10/14]
-
Add Zhong Shao’s fix for datatype equality functions.
- [2005/10/14]
-
Bug fix a bug found by Carl Hauser. There was a typo in the reload code for FCMP in x86SpillInstr.sml.
Allen Leung
- [2005/10/14]
-
Removed some debugging code in file x86Asm.sml. The function emit_operand was printing out debugging output.
Allen Leung
- [2005/07/27]
-
Fixed ml-lex to recognize "\r" as representing carriage return.
- [2005/07/27]
-
Fixed ml-yacc to work on files with non-native end-of-line encodings (e.g., Windows text file on a Unix system).
- [2005/07/20]
-
Added changes from Dominic Evans (oldmanuk (at) gmail (dot) com) to support HPUX 11.
- [2005/07/06]
-
Changes to the SML/NJ Library. See smlnj-lib/CHANGES for details.
- [2005/07/06]
-
Fixed reversed logic for deciding whether to "copy up" or "copy down" in *-array-slice.sml.
- [2005/05/31]
-
A typo in the Cygwin code fixed.
Allen Leung
- [2005/05/31]
-
Updated Cygwin’s fault/signal handling to match the Windows version. Updated the export list.
Allen Leung
Version 110.54; 2005/05/18
- [2005/05/18]
-
Added support scripts for Mac OS X PackageMaker and modified config/install.sh so that it supports re-dumping a heap image after customization.
- [2005/05/18]
-
Un-overloaded / to work around bug in overloading resolution code.
- [2005/05/16]
-
Added mechanism for re-creating a heap file for the interactive system after configuration variables have been changed.
CM.redump_heap : string -> unit
This is much like SMLofNJ.exportML, but starting from the resulting heap does not return to the caller of CM.redump_heap but restarts the interactive system from scratch. The original call of CM.redump_heap does not return but ends the interactive session. Thus, CM.redump_heap is a lot like SMLofNJ.exportFn.
Internally, redump_heap winds the dynamic execution context back to the point where the original heap image was created and re-executes the heap image generation code in the boot code.
- [2005/05/09]
-
Added a hack to the existing hack known as Word64 to make fromString behave correctly. I am still not sure whether Word64.scan will work as specified with respect to the interaction of radix and prefix.
- [2005/05/04]
-
Added a gc protocol checking phase. This phase is enabled with the flag "check-gc". "debug-check-gc" turns on the verbose mode.
Allen Leung
- [2005/05/04]
-
Fixed a bug in the implementation of div and mod for IntInf. Thanks to Neophytos Michael for reporting the problem.
- [2005/05/04]
-
Added the join combinator to the ParserComb module in the SML/NJ Library.
- [2005/02/28]
-
Fixed serious bug (brown paper bag variety) in new implementation of structure Atom in CML. (I had accidentally used a mailbox instead of an mvar, leaving the door open for races.)
Version 110.53; 2005/02/25
- [2005/02/25]
-
Brought back SMLofNJ.Susp. The underlying suspension type is the one implemented in Core, which means that it is the same as the one used by the lazy extension.
- [2005/02/24]
-
Simpler and at the same time more general implementation of structure Atom in CML.
- [2005/02/15]
-
Created new "tools" directory under "src" and moved "TraceDebugProf" there.
- [2005/02/10]
-
Implemented "long long" arguments and results for NLFFI. (Only the PPC/MacOS implementation is complete, the other backends still need to be updated.)
- [2005/01/24]
-
Minor cleanup in ML-Yacc rule printing mechanism. This should fix a problem with certain "as" patterns which previously got rendered using incorrect syntax.
- [2005/01/18]
-
Made time profiling code (interrupt handler) in runtime system aware of new array representation.
- [2005/01/14]
-
Implemented new (but still experimental) heap2exec facility. This is tested under Mac OS X and should work under Linux (will test shortly). It will probably also work on the Sparc (will test some time later). Also removed old "HACKED_STANDALONE" hack from runtime
To be able to test heap2exec, uncomment the request for "heap2asm" in config/targets prior to installation. (Notice that this is different from "heap2exec" mentioned below. Not a typo.)
To perform an actual test, run the command
$ bin/heap2exec heapfile execfile
(You can put heap2exec on your shell’s path.)
For example, run
$ bin/heap2exec bin/.heap/ml-yacc.ppc-darwin mly
This will create a standalone executable called "mly" that you can then invoke directly as a command.
- [2005/01/07]
-
fixed off-by-one error in ML_STRING macro (globals.c)
- [2004/12/23]
-
Made ml-build script "smarter" (but only very little).
- [2004/12/21]
-
-
Implemented access to signed and unsigned long long data in NLFFI. (The parameter-passing part of the picture has not complete. But data structure access seems to work.)
-
Fixed CM's incorrect assumption that the PPC is little-endian. (On the Mac, it is big-endian. And that’s currently our only PPC platform.)
-
- [2004/12/21]
-
Some cleanup in the $c/memory.cm library: separated some concerns by moving allocation code and memory access code each into their own files.
- [2004/12/17]
-
The Unix I/O library of SML/NJ on Cygwin does not understand Windows style pathname, so problems arise when SMLNJ_HOME is set to a Windows style pathname. The _run-sml script now converts SMLNJ_HOME to a POSIX pathname on Cygwin.
Allen Leung
- [2004/12/16]
-
Last-minute changes incorporated into 110.52. Release tag moved.
The changes: - HashString.hashString' → HashString.hashSubstring - bug fix in UnivariateStats
- [2004/12/15]
-
-
+HashString.hashString' → HashString.hashSubstring
-
corresponding changes in atom.sml
-
"de-compressed" (aka. un-obfuscated) code for UnivariateStats and added some comments
-
Version 110.52; 2004/12/15
- [2004/12/15]
-
More on the space problem (this time for Win32).
- [2004/12/14]
-
Hacked some of the scripts (in particular: the installer) to cope with spaces in filenames a bit better. But beware: the current "solution" is likely still full of bugs and inherently incomplete. (We need to do away with those shell scripts for a comprehensive solution.)
- [2004/12/13]
-
Fixed bug in code for ml-makedepend.
- [2004/12/09]
-
Added two simple but potentially useful statistics modules to SML/NJ Library. (See CHANGES file there.)
- [2004/12/01]
-
Updates to SML/NJ Library
-
Added function HashString.hashString' for substrings.
-
Hand-inlined CharVector.foldl into HashString (for speed).
-
Modified implementation of structure Atom to avoid extracting strings from substrings unless necessary.
(Also see CHANGES file for smlnj-lib.)
-
- [2004/11/24]
-
Made sure CML compiles when the Position structure is Int64.
- [2004/11/24]
-
The compiler can now be compiled in a mode that makes structure Position equal to Int64. The default, however, is unchanged (Position is Int31) for the time being.
To enable 64-bit positions, use the following procedure:
-
Start sml
-
Autoload $smlnj/cmb.cm (if not already autoloaded)
-
Type
#set (CMB.symval "USE_64_BIT_POSITIONS") (SOME 1);
-
Run CMB.make() as usual.
This is barely tested. The only test so far was a little SML program counting the number of characters in an 8-gigabyte file by reading it character-by-character. That test was successful.
In support of 64-bit positions, a number of new functions have been added to the runtime system.
-
- [2004/11/23]
-
Fixed a problem with unhelpful error messages related to problems with .cm or .sml files that appear as part of the sml command line.
Version 110.51; 2004/11/18
- [2004/11/18]
-
Enabled dlopen and friends for FreeBSD (as recommended by Johannes 5 Joemann).
- [2004/11/17]
-
Added support for MLTree constructs LIVE and KILL to all the architectures.
Allen Leung
- [2004/11/13]
-
-
Stripped down the versiontool: It now only handles the version number. The date string is generated at bootstrap time (during makeml).
-
In a previous commit, fixed a minor issue with how polyequal is being translated. In particular, the code now "looks through" abstractions. This results in slightly fewer polyEqual warnings and hopefully slightly more efficient code. Important examples for where this matters are the new int64 and word64 types.
-
- [2004/11/12]
-
Structure Int64 fully hooked in. (The implementation is not very efficient, though.)
- [2004/11/11]
-
All the pieces of Word64 are now there, with the exception of the conversions from and to LargeWord. (Eventually these need to be identities, but for the time being they don’t even make sense because LargeWord is 32-bit wide.)
Also started to add similar support for Int64, but major pieces of that are still missing.
- [2004/11/11]
-
Structure Word64 is now (almost) complete, word literals and patterns seem to work. There are a few odd pieces missing. In particular, I didn’t do the {from,to}LargeWord parts because LargeWord is still Word32 at the moment.
Making Word64 official would mean that LargeWord becomes Word64. But this requires extreme care because most word-word conversions have to go through LargeWord, so making a mistake means loss of efficiency or worse. Eventually there will be a solution similar to (but actually simpler than) what I did with IntInf.
- [2004/11/10]
-
More 64-bit hacking (but still not even half-way there yet). Also, some assorted improvements to the handling of 8-bit words.
- [2004/11/09]
-
Started adding some infrastructure for supporting 64-bit int- and word-types. (Still in its very early stages.)
Version 110.50; 2004/10/28
- [2004/10/28]
-
-
Changend config/srcarchiveurl from a file just containing the URL string into a file containing shell script code. The code has access to the $VERSION variable.
-
Made corresponding changes to config/install.sh and config/unpack.
-
Default contents of config/srcarchiveurl uses $VERSION and normally does not have to be edited to reflect a version change.
(As a result, a version change can be done by just editing config/version, the rest is now automatic.)
-
- [2004/10/27]
-
BackTrace.monitor now also reports the source of the exception that triggered the trace.
- [2004/10/27]
-
This is the HISTORY entry for two earlier commits, both concerning the x86 c-calls code in MLRISC:
-
added a missing LOAD in the code that deals with struct arguments
-
made sure the caller does not add the wrong number of bytes to the stack pointer after a call of a function returning a struct (the callee already pops the implicit argument which points to the space reserved for the result)
-
- [2004/10/24]
-
John discovered a bug in the syntax of fucomip. The opcodes FU?COMIP? have been changed to
fu?comip? %st(i), %st
Allen Leung
- [2004/10/20]
-
Added a mechanism for getting back-trace information from standalone programs. Here is how it works:
-
The part of the program from which you want to get backtrace information (usually the whole program) should be wrapped with BackTrace.monitor. This is a (unit→'a)→'a function, and your main program could be modified from something like
fun main (pgm, args) = ...
to
fun main (pgm, args) = BackTrace.monitor (fn () => ...)
-
To be able to access BackTrace.monitor, you have to add the library $smlnj-tdp/plugins.cm to the .cm file that contains your main function.
-
Remove all compiled code (i.e., all the .cm/ subdirectories that CM might have created in the past for your project).
-
Build the system using this command line:
ml-build -Ctdp.instrument=true \$smlnj-tdp/back-trace.cm myprog.cm MyProg.main myprog
instead of the usual
ml-build myprog.cm MyProg.main myprog
I changed the library name $/trace-debug-profile.cm to $smlnj-tdp/plugins.cm, and added the following new libraries:
- $smlnj-tdp/back-trace.cm
-
when loaded causes the back-trace plugin to be installed
- $smlnj-tdp/coverage.cm
-
when loaded causes the coverage plugin to be installed
-
- [2004/10/18]
-
Added an "obsolete" warning for the "group owner" syntax to CM's parser.
Eliminated group owner specs from .cm files throughout the source tree.
- [2004/10/15]
-
-
Test coverage tool added!
-
Further reorganization of tracing-, debugging-, and profiling support:
-
moved original BTImp — now called BackTrace — into a separate library called $/trace-debug-profile.cm
-
eliminated all mentions of BTrace from SMLofNJ.Internals
-
only the instrumentation mechanism is now left in the compiler proper
-
BackTrace module is a plugin which is NOT plugged in by default
-
Coverage module is another such plugin
-
To get the benefits of any of these plugin modules, the code in question must be compiled with TDP instrumentation turned on. This can be done by setting SMLofNJ.Internals.TDP.mode to true. (The ref cell is also controlled via the -Ctdp.instrument=… switch.)
Plugins are selected at link time. (Pre-compiled instrumented code can be re-loaded with different plugins in effect.) When an instrumented module is linked, whatever plugins are at that time enabled will come into effect for that module.
To enable the back-trace plugin, load library $/trace-debug-profile.cm and invoke BackTrace.install() (e.g., from the interactive prompt). To enable the coverage plugin, load the same library and invoke Coverage.install().
Back-traces are generated automatically on uncaught exceptions and when the code in question explicitly invokes BackTrace.trigger().
Coverage (and execution frequency-) information must be queried explicitly by calling Coverage.not_covered and Coverage.hot_spots.
-
- [2004/10/14]
-
Snapshot of a significant overhaul of how the trace/debug/profile support is hooked into the system (specifically: Core and SMLofNJ.Internals).
- [2004/10/13]
-
Some rationalization of names:
structure BTrace -> structure TDPInstrument etc.
This is is preparation of using the original back-trace instrumentation for other purposes. "TDP" stands for Trace/Debug/Profile.
The control flag controlling whether instrumentation is on or off is now registered under a different name, so instead of running sml as
sml -Cinstrument.btrace-mode=true
one has to say
sml -Ctdp.instrument=true
- [2004/10/11]
-
Made some minor modifications to elabcore.sml to have source regions be propagated more tightly — resulting in better (i.e., smaller) regions being reported in error- and debug messages.
- [2004/10/08]
-
Fixed handling of keywords in .cm files: After seeing "is" the lexer treats subsequent occurrences of "group", "library", "source", "is", "*", and "-" as ordinary identifiers rather than keywords.
Most seriously, this fixes a problem with CM’s "shell" tool. The tool is supposed to accept a tool argument called "source", but this did not work because of the clash with the keyword.
- [2004/10/07]
-
Assorted cleanup work:
-
got rid of intstrmap in favor of using the library’s hash table implementation
-
threw out most of the pathnames stuff, as it was not used anyway
-
simplified tokentable implementation
-
fixed some minor spelling errors
-
- [2004/10/06]
-
Cleaned up the absyn to reflect the invariant that HANDLE always carries a FNexp as part of the type definition. This eliminates some superfluous sanity checks at runtime down the road.
Some minor cleanup of the btrace code.
- [2004/10/01]
-
Added hack to make slave mode work in the presence of the version tool. (Still, since the master does two passes over the code for CMB.make, the release number gets bumped twice when slaves are attached. I don’t know if this is worth fixing…)
- [2004/09/30]
-
-
Moved the "version" magic into its own little library under src/system/smlnj/internal. This avoids expensive reconstruction of a stable src/compiler/core.cm.
-
At the same time, structure CompilerVersion is now known as structure SMLNJVersion.
-
Arranged for the version tool to NOT kick in when rebuilding the system (makeml -rebuild, fixpt). Otherwise one would never reach a fixpoint. Also, loading the versiontool does not work when rebuilding the system because CM is not properly initialized at that time.
-
- [2004/09/29]
-
Implemented some CM magic to have file src/compiler/TopLevel/main/version.sml generated automagically. The version is taken from two files: config/version and config/release. The first is expected to contain a two-part version number such as 110.49. The second should contain a single number, but it may be missing.
If the environment variable VERSIONTOOL_BUMP_RELEASE is defined at the time the version tool is loaded (which is the first time you say CMB.make), then the tool will increment the value stored in config/release every time CMB.make is invoked.
The binfile format is now insensitive to anything beyond the first two components of a version number, so bumping the release does not render binfiles incompatible. Auto-bumping can be used to keep track of versions during development without invalidating existing binfiles.
In any case, every CMB.make updates the date information in version.sml. (This is the date that is printed in the banner.)
- [2004/09/28]
-
Some cleanup of the controls code.
- [2004/09/27]
-
Added two pieces of functionality to the Controls interface:
val save'restore: 'a control -> unit -> unit
grabs the current value of the control in stage 1 and restores it in stage 2.
val set' : 'a control * 'a -> unit -> unit
stores the given value into the control in stage 2 (i.e., delayed) but does all error checking in stage 1. (This is for string controls that need to do parse their argument — something that might fail. In some cases, notably in CM, one already knows the intended argument but wants to delay the actual assignment until a time when error recovery would be more difficult.)
Also changed the handling of controls in tool arguments to classes "sml" and "lazysml":
-
use Controls.save’restore as a more robust way of restoring the old value (in particular: without having to re-parse the string)
-
use controls to handle the "overload" keyword in the init group (I believe this change actually fixes a long-standing obscure bug.)
-
- [2004/09/27]
-
Added a new tool class called "lazysml" to CM’s tool chest. The only difference to "sml" is that compilation is done with Control.lazysml set to true. A source of class "lazysml" is automatically recognized by a file name suffix of ".lml".
In addition to the above feature, the original class "sml" now also supports a tool argument "lazy" which has the same effect. As a result, the following three lines are equivalent:
foo.sml : lazysml foo.sml : sml (lazy) foo.sml (lazy)
The setting goes into effect both during parsing and during compilation. The original setting is restored right after parsing and after compilation, respectively.
In addition to all the above, there is also a general mechanism to set ANY of the "controls" that are available at the command line via "-C…" on a per-sml-file basis. The same rules that apply for "lazy" apply as well. (In fact, "lazy" is implemented as a special case of the general mechanism.)
The .cm file syntax uses a new keyword tool argument called "with". There are several ways of indicating the desired settings:
foo.sml (with:parser.quotations=true) foo.sml (with:(name:parser.quotations value:true)) foo.sml (with:(name:name1 value:value1 name:name2 value:value2 ...)) foo.sml (with:(name1=value1 name2=value2 ...)) foo.sml (with:(name1=value1 name:name2 value:value2 name3=value3 ...))
Another possible abbreviation is to leave out the =v or value:v part if the name refers to a boolean control (in which case the value is taken to be true). Thus, one could get lazy sml also by saying:
foo.sml (with:parser.lazy-keyword=true) foo.sml (with:parser.lazy-keyword) foo.sml (with:(name:parser.lazy-keyword value:true)) foo.sml (with:(name:parser.lazy-keyword))
- [2004/09/24]
-
Turned message about "emiting long form of branch" off by default. Added a control flag to turn it back on when desired.
- [2004/09/24]
-
Applied patch for setting rounding modes under Mac OS X. Thanks to Melissa O’Neill for providing the code!
- [2004/09/23]
-
-
Changed definition of type ControlRegistry.registry_tree to include control_info (i.e., the name of the controlling environment variable).
-
Added command-line flags -e and -E to print the names of environment variables that can be used to control internal settings. (This uses the new API mentioned in 1.)
-
Version 110.49; 2004/09/13
- [2004/09/13]
-
Put target "mlrisc" back into the default list. (There is no harm in having it, and some users have expressed their wish to have "mlrisc" included by default.)
- [2004/09/13]
-
Fixed the signal masking code to properly nest mask/unmask operations on a per-signal basis.
- [2004/09/08]
-
Bumped the heap magic number to 0x09082004 to account for the changed layout of the ML frame under Mac OS X.
- [2004/09/03]
-
Added a patch to _arch-n-opsys to enable the Cygwin runtime. The Cygwin runtime is turned on by setting the environment variable SMLNJ_CYGWIN_RUNTIME to 1.
Allen Leung
- [2004/08/31]
-
Added some exports to src/compiler/core.cm upon request by J. Joemann.
- [2004/08/30]
-
Upon request by Johannes Joemann:
-
improved ML code of installer to fall back to coping when renaming fails (i.e., when source and target are on different file systems); the code compiles but has yet to be tested in anger
-
removed mlrisc from list of default targets (config/targets)
-
- [2004/08/27]
-
Added ptreql primop to structure InlineT (upon request from Larry Paulson).
- [2004/08/15]
-
Another bug fix from Carl Hauser:
diff /net/niflab/smlnj48/src/MLRISC/graphs/udgraph.sml udgraph.sml > 48c48 > < | rmv((e as (k,_))::es,L) = rmv(es,if k = i then es else > e::L) > --- > > | rmv((e as (k,_))::es,L) = rmv(es,if k = i then L else e::L)
Without this, any deletion of an edge in an undirected graph does severe violence to the graph.
Allen Leung
- [2004/08/10]
-
The IBM/MacOS syntax switch on PPC was incorrectly swapped.
Allen Leung
Version 110.48; 2004/08/10
- [2004/08/09]
-
Bug fix from Carl Hauser:
single_source_shortest_paths in dijkstra.sml was observed to get wrong answers (by comparing to single_source_shortest_paths in bellman-ford.sml).
The problem is that following the expression A.update(dist,s,Num.zero) it is necessary to update the priority queue using Q.decreaseWeight(Q,s).
Allen Leung
- [2004/08/06]
-
Fiddled with handling of command-line options:
-
sml now quits after processing the command line if -H, -S, -h<n>, or -s<n> appears as the last command-line argument
-
a new option -q terminates the session when encountered on the command line; subsequent arguments will be ignored
-
bug fixes: short (erroneous) arguments are no longer ignored completely
-
- [2004/08/04]
-
-
Added minimal IBM assembly syntax support for PowerPC.
-
Cygwin: manually changed the file cygwin.def. Some exported symbols have been altered in the runtime. We need an automatic way to keep the file in sync.
Allen Leung
-
Version 110.47; 2004/08/04
- [2004/08/03]
-
Added low-level support for choosing C calling conventions by twiddling the type of rawccall. (See src/compiler/Semant/types/cproto.sml for details.)
- [2004/08/02]
-
Backed out of change to win32-filesys.c. The earlier patch to get_file_time caused CM to produce files with the wrong time stamp.
- [2004/08/02]
-
Added NLFFI support for Win32, adapted from a patch provided by David Hansel. This is currently completely untested. Also, the issue concerning stdcall vs. ccall is still unresolved.
- [2004/07/30]
-
Gearing up towards 110.47…
-
various minor bugfixes to ml-nlffigen
-
a beginning of a manual for nlffi
-
eliminated export name=value in config/install.sh as this does not work with certain versions of /bin/sh (Thanks to David King at Motorola for catching this.)
-
several bugfixes provided or suggested by David Hansel at Reactive Systems:
-
added a test for tm==NULL to gmtime.c and localtime.c
-
applied patch for incorrect GetFileTime under win32
-
toSeconds → toMilliseconds in Win32/win32-process.sml
-
-
- [2004/07/21]
-
-
Fixed minor issue in ml-nlffigen: Now generate structure T_foo for a typedef to an incomplete type, but leave out the "typ" member. (This is just for consistency.)
-
Started to produce what is supposed to become better (i.e., comprehensive) documentation of what ml-nlffigen does and produces.
-
- [2004/07/14]
-
Added C_UNION to c-calls/c-types.sml and updated the machinery (ml-nlffigen, cproto.sml) that conveys C function interface information to the code generator.
However, the actual architecture-specific implementation of function arguments and results that are C unions is still not implemented.
- [2004/07/14]
-
Added these instructions to the PowerPC architecture: LBZU(X), LHZU(X), LWZU(X), STWU(X), STFDU, STFSU, etc…
Note: I haven’t added their instruction encoding into the description.
Allen Leung
- [2004/07/13]
-
Added the two instructions LWARX and STWCX to the PowerPC instruction set.
A (untested) rewrite of loop-structure.sml. The old version is completely broken.
Allen Leung
- [2004/07/13]
-
-
use paramAlloc to report c-calls with too many arguments (for PPC version where parameter area is pre-allocated)
-
added ccall_maxargspace to machspec (to implement the above)
-
made "make" commend in CM’s "make" tool configurable
-
added option (default: on) for passing the name of the SML/NJ’s "bin" directory to "make"; the call looks like this:
make <options> SMLNJ_BINDIR=<dir> <target>
This can be used by the Makefile to, e.g., pick the "right" version of ml-nlffigen. - minor code tweaks
-
Version 110.46.1; 2004/07/12
- [2004/07/12]
-
NLFFI under Mac OS X now working (sort of). This is largely untested, though.
Note:-
You have to make a new, clean build of the runtime system.
-
There are new BOOTFILES, you have to use them! (Doing the bootstrap process yourself would be very painful! If you absolutely have to do it, build the system under a different architecture and then cross-compile.)
Version bumped to 110.46.1 to account for runtime data format changes.
-
- [2004/06/18]
-
Changed the implementation of structure Unix so that the same stream is returned every time one of the {text,bin}{In,Out}streamOf functions is invoked on the same proc. This is not what the spec currently says — although IMO it arguably should. (See discussion below.)
Version 110.46; 2004/06/17
- [2004/06/17]
-
Changed the interface of structures Timer and Unix to match the most recent Basis spec.
In the case of Unix there still seems to be an open/weird issue:
The {text,bin}{In,Out}streamOf functions are supposed to create fresh streams whenever they are called -- as opposed to have them return the same stream every time. This design is supposed to prevent space leaks caused by proc values hanging on to streams.
The reap function, on the other hand, is supposed to close the streams. This cannot be done without having a handle on the stream in proc after all...
I took the liberty to implement the following stopgap solution:
The proc value hangs on to the most recently created stream(s). Reap closes those. If either or both of the two streams hadn't been created at all yet, then reap will close the corresponding file descriptors directly.
PS: I don’t understand the original space leak argument anymore. If a proc hangs on to the imperative stream, then I/O operations on those will advance the state of the cached stream and avoid the space leak.
- [2004/05/28]
-
Added signature PACK_REAL and exported functor PrimIO.
- [2004/05/25]
-
CM now ignores (but still accepts) the "owner" information in group descriptions. The owner of a group is its next enclosing library. Each group must have a unique owner. (There is a virtual "toplevel" library that owns groups which are not nested within a real library.) Previously, each group had to explicitly declare its owner, and CM would check that such a declaration is correct. The new scheme is to have CM check that for each group there is precisely one owning library.
The advantage of the new scheme is that the programmer no longer needs to maintain the somewhat annoying owner information. The downside is that CM cannot enforce the ownership rule across multiple runs of CM.make. Fortunately, enclosing the same group in two different libraries A and B which are not part of the same program does not cause real problems.
- [2004/05/20]
-
Made the win32 version work again. (Strangely, a misplaced comma had slipped into win32-process.c which prevented the runtime from being compiled correctly.)
Also, included a minor addition to ml-build.bat analogous to what was done in blume-20040519-ml-build.
- [2004/05/19]
-
Arranged for ml-build to clean up after itself a little bit better. The script generates a temporary SML source file and compiles it using CM, so CM generates metadata (GUID, SKEL, objectfile) for it. It now gets rid of those at the end, so they don’t accumulate under .cm.
This required a minor change to install.sh because the name of the metadata directory (default: .cm) is actually configurable at installation time.
- [2004/05/18]
-
Added Posix.IO.mk{Bin,Text}{Reader,Writer} by lifting their respective implementations from internal modules PosixBinPrimIO and PosixTextPrimIO.
- [2004/05/11]
-
Added previously missing support for many socket-related functions under win32. Thanks to David Hansel<EMAIL_ADDRESS>for the voluminous patch!
(I have not tested this patch under win32 yet.)
Here is David’s e-mail:
Hi,
Attached to this email you find a diff against sml/nj 110.45 that will enable socket support under Windows.
To apply the patch (using unix or cygwin) 1) gunzip runtime.diff.gz 2) "cd" into "src/runtime" in the source tree of a fresh 110.45 installation. 3) patch -p 1 < [your/path/to]runtime.diff
The code compiles fine but has NOT yet been extensively tested. I only ran a few tests for basic socket client functionality (which worked fine). Especially the functions that use ioctl are not tested at all and might not work (see below).
I implemented this since we want to move to a newer version of sml/nj but need socket support in order to use it. This is the first time I even had a look at the sml/nj source, so please review my changes before making this part of the distribution! Here are a few issues that I think might be better for someone to solve who is more familiar with the sml/nj source (and socket programming):
-
getnetbyaddr.c and getnetbyname.c will raise a "not implemented" exception since I could not figure out what the windows equivalent of these functions is
-
In sockets-osdep.h there are a some #include statements that are only used in a few files that include sockets-osdep.h
-
In smlnj-sock-lib.c, function init_fn() calls WSAStartup() but does not process its return value since I don’t know how to report an error upwards.
-
It would probably be good to have a call to WSACleanup() when the library is unloaded (if there is such a possibility). Otherwise I think Windows will take care of this automatically when the process finishes.
-
I used ioctlsocket() as a replacement for ioctl() but I have no idea if that is actually the proper replacement on Windows.
-
All these issues are marked in the code by "FIXME" comments.
We use sml/nj extensively in our products and are quite happy with it. I hope this contribution will help you.
Keep up the good work!
David
-
- [2004/05/11]
-
Fixed two bugs in installml script. (Thanks to Vesa A. Norrman for the patch.)
- [2004/05/11]
-
Added support for nlffi under netbsd. (Thanks to Vesa A. Norrman for the patch.)
- [2004/05/11]
-
As per request by Adam Chlipala<EMAIL_ADDRESS>extended various export lists in compiler-related .cm-files.
- [2004/05/11]
-
The installer now honors the "src-smlnj" target again, although its meaning has changed from "all sources required for the compiler" to "all sources the installer knows about". In other words, if you enable "src-smlnj" in the "targets" file, then the installer will pull in sources for everything. (Notice that this refers to source code only. Compiled code is still only installed for modules that were requested explicitly or which are required for other modules that were requested explicitly.)
- [2004/04/23]
-
Fixed IEEEReal.scan (and .fromString) so that if there is an overflow in the exponent calculation we get INF or ZERO (depending on the mantissa and the sign of the exponent).
- [2004/04/23]
-
The ml-build script now terminates with a non-0 status when something goes wrong.
- [2004/04/22]
-
Made exception Option to be the same as exception Option.Option (as it should be).
- [2004/03/19]
-
Fixed the runtime so that ml-nlffi-lib runs on the cygwin version of SML/NJ. The problem is that
lib = dlopen(NULL, ...) f = dlsym(lib, "malloc");
does not work on Windows unless we explicitly export symbols such as malloc during linking. We fixed this by explicitly exporting the required symbols with the magic gcc incantation:
-Wl,--export-all cygwin.def
where cygwin.def is a file containing all the symbols that we wish to export.
I suspect this is a Windows problem and we’ll have to do the same (somehow with windows compilers) when we build the native win32 version with the system calls LoadLibrary/GetProcAddress.
Allen Leung
- [2004/03/04]
-
Fixed problem with IntInf.fmt (sign would show up on the right instead of on the left for BIN, OCT, and HEX).
- [2004/03/04]
-
Fixed problem with installer script (unix only) where bin/ml-yacc and friends pointed (via symlinks) to absolute locations instead of just .run-sml. This was reported by Vesa A Norrman.
Version 110.45; 2004/02/13
- [2004/01/26]
-
Improved handling of exceptions at the interactive toplevel.
- [2004/01/26]
-
Type of top-level "app" corrected. Added code for setting vp_limitPtrMask to Win32-specific runtime.
- [2003/11/18]
-
-
changed Timer interface to what might become the spec
-
POSIX_FLAGS → BIT_FLAGS according to spec
-
some other minor discrepancies wrt. spec eliminated
-
Version 110.44; 2003/11/06
- [2003/11/04]
-
Eliminated the "dont_move_libraries" directive in config/targets. (The mechanism was broken and could not be fixed easily. Moreover, there does not seem to be any reason not to move all libraries into lib during installation. I originally implemented this directive as a backward-compatibility feature when I first introduced the new CM. Now that things have been stable for a long time and going back to the old CM is not an option, there is no reason to keep it around.)
- [2003/11/03]
-
Made installer honor INSTALLDIR variable again. (Thanks to Chris Richards for pointing out the problem and providing the solution.)
- [2003/10/01]
-
MLRISC bug fix from Lal.
- [2003/09/30]
-
-
Added openVector, nullRd, and nullWr to PRIM_IO.
-
Improved .bat files (for Win32 port) to make things work under Win95. (thanks to Aaron S. Hawley for this one)
-
- [2003/09/26]
-
Added missing wrapper for privilege "primitive" in $smlnj/viscomp/core.cm.
Version 110.43.3; 2003/09/26
- [2003/09/26]
-
I modified the read-eval-print loop so that the autoloader gets invoked whenever the prettyprinter tries to look up a symbol that is not currently defined in the toplevel environment but which appears in CM’s autoload registry. As a result, we see far fewer of those ?.Foo.Bar.xxx names in the prettyprinter’s output.
In addition to this I tried to clean up some pieces of the Basis implementation (e.g., Socket, Word8Array) in order to prevent other instances of these ?.Foo.Bar.xxx names from being printed.
The mechanism that picks names for types still needs some work, though. (Right now it seems that if there is a type A.t which is defined to be B.u, but B is unavailable at toplevel, then A.t gets printed as "?.B.u" although the perhaps more sensible solution would be to use "A.t" in this case. In other words, the prettyprinter should follow a chain of DEFtycs not farther than there are corresponding toplevel names in the current environment.)
- [2003/09/24]
-
Another installer tweak: All the ML code for the installer is now compiled during CMB.make and put into a little library called $smlnj/installer.cm. The installation then simply invokes
sml -m $smlnj/installer.cm
and everything happens automagically.
Win32: ML code senses value of environment variable SMLNJ_HOME. Unix: ML code senses values of environment variables ROOT, CONFIGDIR, and BINDIR.
The new scheme guarantees that the ML code responsible for the installation is in sync with the APIs of the main system. Also, the installer is somewhat faster because the installer script is precompiled.
- [2003/09/24]
-
Added a signature SYNCHRONOUS_SOCKET to basis.cm. This is like SOCKET but excludes all non-blocking operations. Defined SOCKET (in Basis) and CML_SOCKET in terms of SYNCHRONOUS_SOCKET. Removed superfluous implementations of non-blocking operations from CML’s Socket structure.
- [2003/09/24]
-
-
Fixed SOCKET API and implementation to match Basis spec. This required changing the internal representation of sockets to one that remembers (for each socket file descriptor) whether it is currently blocking or non-blocking. This state is maintained lazily (i.e., a system call is made only if the state actually needs to change).
-
OS-specific details of sockets were moved into separate files, thus making it possible to unify the bulk of the socket implementations between Unix and Win32.
-
CML’s socket API changed accordingly. (Note that we need to remove non-blocking functions from this API since they are redundant in the case of CML!)
-
CML’s socket implementation now makes use of non-blocking functions provided by Basis, thus removing all OS-dependent code from this part of CML.
-
Changed Real64.precision from 52 to 53. Minor cleanup in Real64 code.
-
Version 110.43.2; 2003/09/22
- [2003/09/22]
-
Made a new interim version and bootfiles for developer’s bootstrapping convenience.
- [2003/09/19]
-
-
new-install.sh → install.sh
-
changed default CM "metadata" directory name to ".cm" (instead of "CM")
-
tweaked installer so that another name instead of .cm can be chosen at install time (by setting the CM_DIR_ARC environment variable during installation); once installation is complete, the name is fixed
-
Version 110.43.1; 2003/09/18
- [2003/09/18]
-
Made a new interim version and bootfiles for developer’s bootstrapping convenience.
- [2003/09/18]
-
-
Exported fractionsPerSecond etc. from TimeImp (but not from Time as this seems to be controversial at the moment) and used those in Posix.ProcEnv.times.
-
Added Time.{from,to}Nanoseconds to Time.
-
Improved Real.{from,to}LargeInt by avoiding needless calculations. For example, fromLargeInt never needs to look at more than 3 "big digits" to get its 53 bits of precision.
-
- [2003/09/17]
-
Added an entry to the primitive environment (compiler/Semant/statenv/prim.sml) for int32→real64 conversion and added code to compiler/CodeGen/main/mlriscGen.sml to implement it.
Removed some of the "magic" constants in real64.sml and replaced them with code that generates these values from their corresponding integer counterparts.
Made all(?) the slice-related changes to the Basis and made everything compile again…
- [2003/09/15]
-
Fixed bug in Real.fromLargeInt.
- [2003/09/13]
-
Minor bugfix in config/libinstall (set anchor with path to standalone tool after installing it, otherwise libraries that need ml-lex or ml-yacc won’t compile the first time the installer runs).
- [2003/09/12]
-
-
fixed bug in Real.toLargeInt
-
fixed bug in Posix.ProcEnv.times
-
changed inputLine functions to return an option
-
minor installer improvements / bugfixes
-
changed default @SMLalloc parameter for x86/celeron to 64k
-
Version 110.43; 2003/09/09
- [2003/09/09]
-
Rewrote large parts of config/install.sh in SML (config/libinstall.sml). Modified config/install.bat to take advantage of it. Also modified config/install.sh (and called it config/new-install.sh) to take advantage of it on Unix systems. (The SML code is (supposed to be) platform- independent.)
The installer can now install everything under Win32 as well as under *nix as long as it compiles.
Other changes:
-
made CML compile again under Win32
-
made eXene compile under Win32 (by providing a fake structure UnixSock and by using OS.Process.getEnv instead of Posix.ProcEnv.getenv)
-
fixed a bug in nowhere: it assumed that type OS.Process.status is the same as type int; under Win32 it isn’t
-
fixed some slice-related problems in the win32-specific parts of CML
-
added a functor argument "sameVol" to os-path-fn.sml in the Basis (under Win32, the volume name is case-insensitive, and the OS.Path code compares volume names for equality)
-
- [2003/09/08]
-
Made Win32 version of OS.FileSys.fullPath return current directory when given an empty string. This is what the spec says, and incidentally, CM depends on it. (CM otherwise goes into an infinite loop in certain cases when presented with the name of a non-existing .cm file.)
- [2003/09/04]
-
-
Changed interface to vectors and arrays in Basis to match (draft) Basis spec.
-
Added signatures and implementations of slices according to Basis spec.
-
Edited source code throughout the system to make it compile again under 1. and 2. (In some cases code had to be added to have it match the new signatures.)
-
MLRISC should be backward-compatible: the copies of the originals of files that needed to change under 3. were retained, the .cm files check the compiler version number and use old versions when appropriate.
-
Changed type of OS.FileSys.readDir and Posix.FileSys.readdir to dirstream → string option (in accordance with Basis spec).
-
When generating code that counts lines, ml-lex used function CharVector.foldli, taking advantage of its old interface. This has been replaced with the corresponding code from CharVectorSlice. (html-lex must be re-lexed!)
-
BitArray in smlnj-lib/Util has been extended/modified to match the new MONO_ARRAY signature. (Do we need BitArraySlice?)
-
Removed temporary additions (fromInternal, toInternal) from the (now obsolete) IntInf in smlnj-lib/Util.
-
Cleaned up structure Byte.
-
Added localOffset, scan, and fromString to Date (according to spec). Cleaned/corrected implementation of Date. (Still need to check for correctness; implement better canonicalizeDate.)
-
Added "scan" to signature IEEE_REAL.
-
Some improvements to IntInf [in particular: efficiency-hack for mod and rem when second operand is 2 (for parity checks).]
-
Changed representation of type Time.time, using a single IntInf.int value counting microseconds. This considerably simplified the implementation of structure Time. We now support negative time values; scan and fromString handle signs.
-
Functor PrimIO now takes two additional arguments (VectorSlice and ArraySlice).
-
- [2003/08/28]
-
This is a major update which comes with a version number bump (110.42.99 — yes, we are really close to 110.43 :-), NEW BOOTFILES, and an implementation of IntInf in the Basis.
There are a fairly large number of related changes and updates throughout the system:
+ Basis: - Implemented IntInf. - Made LargeInt a projection of IntInf (by filtering through INTEGER). - Added some missing Real64 operations, most notably Real.toLargeInt. - Added FixedInt as a synonym for Int32.
+ compiler: * Added support for a built-in intinf type. — - literals - pattern matching - conversion shortcuts (Int32.fromLarge o Int.toLarge etc.) - overloading on literals and operations — This required adding a primitive type intinf, some additional primops, and implementations for several non-trivial intinf operations in Core. (The intinf type is completely abstract to the compiler; all operations get delegated back to the Core.)
+ * Intinf equality is handled by polyequal. However, the compiler does not print its usual warning in this case (since polyequal is the right thing to do there).
+ * Improved the organization of structure InlineT.
+ * A word about conversion primops: If conversions involving intinf do not cancel out during CPS contract, then the compiler must insert calls to Core functions. Since all core access must be resolved already during the FLINT translate phase, it would be too late a the time of CPS contract to add new Core calls. For this reason, conversion primops for intinf carry two arguments: 1. the numeric argument that they are supposed to convert, and 2. the Core function that can help with this conversion if necessary. If CPS contract eliminates a primop, then the associated Core function becomes dead and goes away. Intinf conversion primops that do not get eliminated by CPS contract get rewritten into calls of their core functions by a separate, new phase.
+ interactive system: - Control.Print.intinfDepth controls max length of intinf constants being printed. (Analogous to Control.Print.stringDepth.) - Cleanup in printutil and pputil: got rid of unused stuff and duplicates; replaced some of the code with code that makes better use of library functionality.
+ CM: Bugfix: parse-errors in init group (system/smlnj/init/init.cmi) are no longer silent.
+ CKIT: Fixed mismatched uses of Int32 and LargeInt. I always decided in favor of LargeInt — which is now the same as IntInf. CKIT-knowledgable people should check whether this is what’s intended and otherwise change things back to using Int32 or FixedInt.
+ Throughout the code: Started using IntInf.int literals and built-in operations (e.g., comparison with 0) where this seems appropriate.
+
- [2003/08/13]
-
Merging changes from the mcz-branch development branch into trunk. These changes involve replacement of the emulated old prettyprinter interface with direct use of the SML/NJ Lib PP library, and fixing of a couple of bugs (895, 1186) relating to error messages. A new prettyprinter for ast datatypes (Elaborator/print/ppast.{sig,sml}) has been added.
Dave MacQueen
Version 110.42.9; 2003/08/11
- [2003/08/11]
-
This patch restores SML/NJ’s ability to run under win32. There are a number of changes, including fixes for several bugs that had gone unnoticed until now:
-
uname "CYGWIN_NT*" is recognized as win32 (This is relevant only when trying to run the win32 version from within cygwin.)
-
There are a number of simple .bat scripts that substitute for their corresponding Unix shell-scripts. (See below.)
-
The internals of ml-build have been modified slightly. The main difference is that instead of calling ".link-sml" (or link-sml.bat) using OS.Process.system, the ML process delegates this task back to the script. Otherwise problems arise in mixed environments such as Cygwin where scripts look and work like Unix scripts, but where OS.Process.system cannot run them.
-
In CM, the srcpath pickler used native pathname syntax — which is incorrect in the case of cross-compilation. The new pickle format is independent of platform-specific naming conventions.
-
Path configuration files (such as lib/pathconfig) can now choose between native and standard syntax. Placing a line of the form
standard!
into the file causes all subsequent paths to be interpreted using CM standard pathname syntax (= Unix conventions); a line
native!
switches back to native style. This was needed so that path config files can be written portably, see src/system/pathconfig.
-
Runtime system:
-
win32-filesys.c: get_file_time and set_file_time now access modification time, not creation time.
-
I/O code made aware of new array representation.
-
Bug fixes in X86.prim.masm.
-
src/system/makeml made aware of win32. (For use under cygwin and other Unix-environments for windows.)
-
In Basis, fixed off-by-one error in win32-io.sml (function vecF) which caused BinIO.inputAll to fail consistently.
-
-
.bat scripts:
Windows .bat scripts assume that +SMLNJ_HOME+ is defined.
-
sml.bat, ml-yacc.bat, ml-lex.bat: Driver scripts for standalone applications (sml, ml-yacc, ml-lex).
-
ml-build.bat: analogous to ml-build.
-
config\install.bat: Analogous to config/install.sh. This requires that SMLNJ_HOME is set and that Microsoft Visual C is ready to use. (nmake etc. must be on the path, and vcvars32 must have been run.) Moreover, sources for ml-lex and ml-yacc need to exist under src, and the bootfile hierarchy must have been unpacked under sml.boot.x86-win32. The script is very primitive and does a poor job at error checking. It only installs the base system, ml-lex, and ml-yacc. No other libraries are being installed (i.e., you get only those that are part of the compiler.)
-
link-sml.bat: analogous to .link-sml, but not currently used
-
-
Unrelated bug fixes:
-
ml-nlffigen now exports structures ST_* corresponding to incomplete types.
-
Added getDevice to PP/src/pp-debug-fn.sml. (Would not compile otherwise.)
-
-
- [2003/06/17]
-
Modified compiler/Elaborator/print/pptype.sml to fix bug 895. Tag will be used for new development branch (mcz-branch) for use by MacQueen, (Lucasz) Zairek, and (George) Cao at uchicago.
Dave MacQueen
- [2003/05/27]
-
Tried to eliminated most cases of polymorphic equality.
- [2003/05/21]
-
Two changes:
-
Added a flag for controlling whether non-exhaustive bindings will be treated as errors (default is false).
-
Cleaned up the entire source tree so that CMB.make goes through without a single non-exhaustive match- or bind warning.
-
- [2003/05/17]
-
-
Added cases for IF, WHILE, ANDALSO, and ORELSE to Absyn.
This mainly affects the quality of error messages. However, some of the code is now more straightforward than before. (Treatment of the above four constructs in translate.sml is much simpler than the "macro-expansion" that was going on before. Plus, the mach- compiler no longer gets invoked just to be able to compile an if-expression.)
-
The ErrorMsg.Error exception is now caught and absorbed by the interactive loop.
-
- [2003/05/16]
-
Ported the runtime system to cygwin, which uses the unix x86-unix bin files. Missing/buggy features:
-
getnetbyname, getnetbyaddr: these functions seem to be missing in the Cygwin library.
-
Ctrl-C handling may be flaky.
-
Windows system calls and Windows I/O are not supported.
A new set of binfiles is located at:
+ This is only needed for bootstrapping the cygwin version of smlnj. Other x86 versions can use the existing binfiles.
+ Allen Leung
- [2003/04/08]
-
-
Added a target mlrisc to installer.
-
Added missing elements to structure ListPair.
Matthias Blume
-
- [2003/01/07]
-
Fixed a bug in Int.rem(x,y) where y is a power of 2 on x86. The arguments to the SUBL instruction were swapped.
Allen Leung
- [2002/12/12]
-
Fixed a serious bug in the rewrite code for FP spilling/reloading that sent the RA into an infinite loop when floating point registers get spilled. (Because of this bug, e.g., nucleic stopped compiling between 110.37 and 110.38.) There was another set of potential problems related to the handling of MLRISC annotations (but those did not yet cause real problems, apparently).
Matthias Blume
- [2002/12/06]
-
Added a call of SrcPath.sync at the beginning of Parse.parse (in CM). This fixes the problem of CM getting confused by files that suddenly change their identity (e.g., by getting unlinked and recreated by some text editor such as vi). There might be a better/cheaper/cleaner way of doing this, but for now this will have to do.
Matthias Blume
- [2002/10/28]
-
Exported structure Typecheck from $smlnj/viscomp/core.cm.
Matthias Blume
Version 110.42.1; 2002/10/17
- [2002/10/17]
-
In good old tradition, there has been a slight hiccup so that we have to patch 110.42 after the fact. The old release tag has been replaced (see below).
The change solves a problem with two competing approaches the configuration problem regarding MacOS 10.1 vs. MacOS 10.2 which got in each other’s way.
This change only affects the runtime system code and the installer script. (No new bootfiles.)
Matthias Blume
Version 110.42; 2002/10/16
- [2002/10/10]
-
The mltree operator DIVS must be implemented with an overflow check on the PPC because the hardware indicates divide-by-zero using "overflow" as well.
Matthias Blume
- [2002/07/23]
-
Sml now senses the SMLNJ_HOME environment variable. If this is set, then the bin dir is assumed to be in $SMLNJ_HOME/bin and (unless CM_PATHCONFIG is also set), the path configuration file is assumed to be in $SMLNJ_HOME/lib/pathconfig. This way one can easily move the entire tree to some other place and everything will "just work".
(Companion commands such as ml-build and ml-makedepend also sense this variable.)
Matthias Blume
- [2002/07/12]
-
Exported two useful "step" functions from liveness module (MLRISC).
Matthias Blume
Version 110.41; 2002/07/05
- [2002/07/05]
-
Exported structure BTImp from $smlnj/viscomp/debugprof.cm so that other clients can set up backtracing support.
Matthias Blume
- [2002/06/25]
-
Fixed a bug in translation of INLMAX (and INLMIN) for the floating-point case. (The sense of the isNaN test was reversed — which made min and max always return their first argument.)
Matthias Blume
- [2002/06/11]
-
Back-ported OS.Path.{from,to}UnixPath from idlbasis-devel branch.
Matthias Blume
- [2002/06/10]
-
I back-ported my implementation of IEEEReal.fromString from the idlbasis-devel branch so that we can test it.
Another small change is that ppDec tries to give more information than just "<sig>" in the case of functors. However, this code is broken in some mysterious way if the functor’s body’s signature has not been declared by ascription but gets inferred from the implementation. This needs fixing…
Matthias Blume
- [2002/05/31]
-
Resurrected SMLofNJ.Internals.BTrace.mode. (It accidentally fell by the wayside when I switched over to using Controls everywhere.)
Matthias Blume
- [2002/05/23]
-
Labels are now displayed in the graphical output to make the fall-through and target blocks obvious.
Lal George
- [2002/05/22]
-
John tweaked yesterday’s fix for 1131 to handle an out-of-memory situation that comes up when allocating huge arrays.
Matthias Blume
Version 110.40; 2002/05/21
- [2002/05/21]
-
John Reppy fixed GC bug 1131.
Matthias Blume
- [2002/05/21]
-
CM documentation update.
Matthias Blume
- [2002/05/21]
-
-
John tweaked runtime to be silent on heap export (except when GC messages are on).
-
I added a few more things (cross-compiling versions of CMB) to config/preloads (as suggestions).
Matthias Blume
-
- [2002/05/20]
-
-
Added ControlUtil structure to control-lib.cm.
-
Use it throughout.
-
Used Controls facility to define MLRISC controls (as opposed to registering MLRISC control ref cells with Controls after the fact)
-
Fixed messed-up controls priorities.
-
Removed again all the stuff from config/preloads that one wouldn’t be able to preload at the time the initial heap image is built. (Many libraries, e.g., CML, do not exist yet at this time. The only libraries that can be preloaded via config/preloads are those that come bundled with the bootfiles.)
Matthias Blume
-
-
- [2002/05/20]
-
Added a lot of commented-out suggestions for things to be included in config/preloads.
Matthias Blume
- [2002/05/18]
-
-
Made the mdl tool stuff compile and run again.
-
I’ve disabled all the stuff that depends on RTL specifications; they are all badly broken anyway.
Allen Leung
-
- [2002/05/17]
-
-
John Reppy made several modifications to the SML/NJ Library. In particular, there is a shiny new controls-lib.cm.
-
Pushed new controls interface through compiler so that everything compiles again.
-
Added FormatComb and FORMAT_COMB to the CML version of the SML/NJ Library (so that CML compiles again).
-
Modified init scripts because XXX_DEFAULT environment variables are no longer with us. (Boot-time initialization is now done using the same environment variables that are also used for startup-time initialization of controls.)
Matthias Blume
-
- [2002/05/15]
-
All pseudo-ops emitted before the first segment declaration such as TEXT, DATA, and BSS directives are assumed to be global declarations and are emitted first in the assembly file. This is useful in a number of situations where one has pseudo-ops that are not specific to any segment, and also works around the constraint that one cannot have client pseudo-ops in the TEXT segment.
Because no segment is associated with these declarations it is an error to allocate any space or objects before the first segment directive and an exception will be raised. However, we cannot make this check for client pseudo-ops.
These top level declarations are a field in the CFG graph_info. In theory you can continue to add to this field after the CFG has been built — provided you know what you are doing;-)
Lal George
- [2002/05/13]
-
A few minor bugfixes:
-
Stopgap measure for bug recently reported by Elsa Gunter (ppDec). (Bogus printouts for redefined bindings still occur. Compiler bug should no longer occur now. We need to redo the prettyprinter from scratch.)
-
CM pathname printer now also adds escape sequences for ( and )
-
commend and docu fixes for ml-nlffi
Matthias Blume
-
- [2002/05/10]
-
Applied the following bugfix provided by Emden Gansner:
Output is corrupted when outputSubstr is used rather than output.
The problem occurs when a substring
ss = (s, dataStart, dataLen)
where dataStart > 0, fills a stream buffer with avail bytes left. avail bytes of s, starting at index dataStart, are copied into the buffer, the buffer is flushed, and then the remaining dataLen-avail bytes of ss are copied into the beginning of the buffer. Instead of starting this copy at index dataStart+avail in s, the current code starts the copy at index avail.
Fix: In text-io-fn.sml, change line 695 from val needsFlush = copyVec(v, avail, dataLen-avail, buf, 0) to val needsFlush = copyVec(v, dataStart+avail, dataLen-avail, buf, 0)
Matthias Blume
- [2002/04/12]
-
-
Grabbed newer assyntax.h from the XFree86 project.
-
Fiddled with how to compile X86.prim.asm without warnings.
-
(Very) Minor cleanup in CM.
Matthias Blume
-
- [2002/04/01]
-
Added full support for div/mod/rem/quot on the x86, using the machine instruction’s two results (without clumsily recomputing the remainder) directly where appropriate.
Some more extensive power-of-two support was added to the x86 instruction selector (avoiding expensive divs, mods, and muls where they can be replaced with cheaper shifts and masks). However, this sort of thing ought to be done earlier, e.g., within the CPS optimizer so that all architectures benefit from it.
The compiler compiles to a fixed point, but changes might be somewhat fragile nevertheless. Please, report any strange things that you might see wrt. div/mod/quot/rem…
Matthias Blume
- [2002/03/29]
-
Fixed my broken div/mod logic. Unfortunately, this means that the inline code for div/mod now has one more comparison than before. Fast paths (quotient > 0 or remainder = 0) are not affected, though. The problem was with quotient = 0, because that alone does not tell us which way the rounding went. One then has to look at whether remainder and divisor have the same sign… :(
Anyway, I replaced the bootfiles with fresh ones…
Matthias Blume
Version 110.39.3; 2002/03/29
- [2002/03/29]
-
Primops have changed. This means that the bin/boot-file formats have changed as well.
To make sure that there is no confusion, I made a new version.
+ CHANGES:
-
removed REMT from mltree (remainder should never overflow).
-
added primops to deal with divisions of all flavors to the frontend
-
handled these primops all the way through so they map to their respective MLRISC support
-
used these primops in the implementation of Int, Int32, Word, Word32
-
removed INLDIV, INLMOD, and INLREM as they are no longer necessary
-
parameterized INLMIN, INLMAX, and INLABS by a numkind
-
translate.sml now deals with all flavors of INL{MIN,MAX,ABS}, including floating point
-
used INL{MIN,MAX,ABS} in the implementation of Int, Int32, Word, Word32, and Real (but Real.abs maps to a separate floating-point-only primop)
+ TODO items:
-
Hacked Alpha32 instruction selection, disabling the selection of REMx instructions because the machine instruction encoder cannot handle them. (Hppa, PPC, and Sparc instruction selection did not handle REM in the first place, and REM is supported by the x86 machine coder.)
-
Handle DIV and MOD with DIV_TO_NEGINF directly in the x86 instruction selection phase. (The two can be streamlined because the hardware delivers both quotient and remainder at the same time anyway.)
-
Think about what to do with "valOf(Int32.minInt) div ~1" and friends. (Currently the behavior is inconsistent both across architectures and wrt. the draft Basis spec.)
-
Word8 should eventually be handled natively, too.
-
There seems to be one serious bug in mltree-gen.sml. It appears, though, as if there currently is no execution path that could trigger it in SML/NJ. (The assumptions underlying functions arith and promotable do not hold for things like multiplication and division.)
Matthias Blume
-
- [2002/03/27]
-
Added support for all four division operations (ML’s div, mod, quot, and rem) to MLRISC. In the course of doing so, I also rationalized the naming (no more annoying switch-around of DIV and QUOT), by parameterizing the operation by div_rounding_mode (which can be either DIV_TO_ZERO or DIV_TO_NEGINF).
The generic MLTreeGen functor takes care of compiling all four operations down to only round-to-zero div.
Missing pieces:
-
Doing something smarter than relying on MLTreeGen on architectures like, e.g., the x86 where hardware division delivers both quotient and remainder at the same time. With this, the implementation of the round-to-neginf operations could be further streamlined.
-
Remove inlining support for div/mod/rem from the frontend and replace it with primops that get carried through to the backend. Do this for all int and word types.
Matthias Blume
-
- [2002/03/25]
-
I improved (hopefully without breaking them) the implementation of Int.div, Int.mod, and Int.rem. For this, the code in translate.sml now takes advantage of the following observations:
Let q = x quot y r = x rem y d = x div y m = x mod y
where "quot" is the round-to-zero version of integer division that hardware usually provides. Then we have:
r = x - q * y where neither the * nor the - will overflow d = if q >= 0 orelse x = q * y then q else q - 1 where neither the * nor the - will overflow m = if q >= 0 orelse r = 0 then r else r + y where the + will not overflow
This results in substantial simplification of the generated code. The following table shows the number of CFG nodes and edges generated for fun f (x, y) = x OPER y (* with OPER \in div, mod, quot, rem *)
+ OPER | nodes(old) | edges(old) | nodes(new) | edges(new) -------------------------------------------------------- div | 24 | 39 | 12 | 16 mod | 41 | 71 | 12 | 16 quot | 8 | 10 | 8 | 10 rem | 10 | 14 | 8 | 10
+ Matthias Blume
- [2002/03/25]
-
Fixed a bug in cproto (c prototype decoder).
Matthias Blume
- [2002/03/25]
-
I did some cleanup to Allen’s new primop code and replaced yesterday’s bootfiles with new ones. (But they are stored in the same place.)
Matthias Blume
- [2002/03/24]
-
Made the bootfiles that Allen asked for.
Matthias Blume
- [2002/03/23]
-
-
Changes to FLINT primops:
(* make a call to a C-function; * The primop carries C function prototype information and specifies * which of its (ML-) arguments are floating point. C prototype * information is for use by the backend, ML information is for * use by the CPS converter. *) | RAW_CCALL of { c_proto: CTypes.c_proto, ml_args: ccall_type list, ml_res_opt: ccall_type option, reentrant : bool } option (* Allocate uninitialized storage on the heap. * The record is meant to hold short-lived C objects, _i.e._, they * are not ML pointers. With the tag, the representation is * the same as RECORD with tag tag_raw32 (sz=4), or tag_fblock (sz=8) *) | RAW_RECORD of {tag:bool,sz:int} and ccall_type = CCALL_INT32 | CCALL_REAL64 | CCALL_ML_PTR
-
These CPS primops are now overloaded:
rawload of {kind:numkind} rawstore of {kind:numkind}
The one argument form is:
rawload {kind} address
The two argument form is:
rawload {kind} [ml object, byte-offset]
-
RAW_CCALL/RCC now takes two extra arguments:
-
The first is whether the C call is reentrant, i.e., whether ML state should be saved and restored.
-
The second argument is a string argument specifying the name of library and the C function.
These things are currently not handled in the code generator, yet.
-
-
In CProto,
An encoding type of "bool" means "ml object" and is mapped into C prototype of PTR. Note that "bool" is different than "string", even though "string" is also mapped into PTR, because "bool" is assigned an CPS type of BOGt, while "string" is assigned INT32t.
-
Pickler/unpicker
Changed to handle RAW_RECORD and newest RAW_CCALL
-
MLRiscGen,
-
Changed to handle the new rawload/rawstore/rawrecord operators.
-
Code for handling C Calls has been moved to a new module CPSCCalls, in the file CodeGen/cpscompile/cps-c-calls.sml
-
-
Added the conditional move operator
condmove of branch
to cps. Generation of this is still buggy so it is currently disabled.
Allen Leung
-
- [2002/03/22]
-
Implemented the Ball-Larus branch prediction-heuristics, and incorporated graphical viewers for control flow graphs.
Ball-Larus Heuristics:
See the file compiler/CodeGen/cpscompile/cpsBranchProb.sml.
By design it uses the Dempster-Shafer theory for combining probabilities. For example, in the function:
fun f(n,acc) = if n = 0 then acc else f(n-1, n*acc)
the ball-larus heuristics predicts that the n=0 is unlikely (OH-heuristic), and the then branch is unlikely because of the RH-heuristic — giving the then branch an even lower combined probability using the Dempster-Shafer theory.
Finally, John Reppy’s loop analysis in MLRISC, further lowers the probability of the then branch because of the loop in the else branch.
+ Graphical Viewing:
I merely plugged in Allen’s graphical viewers into the compiler. The additional code is not much. At the top level, saying:
Control.MLRISC.getFlag "cfg-graphical-view" := true;
will display the graphical view of the control flow graph just before back-patching. daVinci must be in your path for this to work. If daVinci is not available, then the default viewer can be changed using:
Control.MLRISC.getString "viewer"
which can be set to "dot" or "vcg" for the corresponding viewers. Of course, these viewers must be in your path.
The above will display the compilation unit at the level of clusters, many of which are small, boring, and un-interesting. Also setting:
Control.MLRISC.getInt "cfg-graphical-view_size"
will display clusters that are larger than the value set by the above.
Lal George
- [2002/03/21]
-
Changed the interface to the KMP routine in PreString and fixed a minor bug in one place where it was used.
Matthias Blume
- [2002/03/21]
-
Fixed a potential problem in cfg edge splitting.
Allen Leung
- [2002/03/21]
-
-
Recoded the buggy parts of x86-fp.
-
All the block reordering code has been removed. We now depend on the block placement phases to do this work.
-
Critical edge splitting code has been simplified and moved into the CFG modules, as where they belong.
Both of these were quite buggy and complex. The code is now much, much simpler.
-
-
X86 backend.
-
Added instructions for 64-bit support. Instruction selection for 64-bit has not been committed, however, since that requires changes to MLTREE which haven’t been approved by Lal and John.
-
Added support for FUCOMI and FUCOMIP when generating code for PentiumPro and above. We only generate these instructions in the fast-fp mode.
-
Added cases for JP and JNP in X86FreqProps.
-
-
CFG
CFG now has a bunch of methods for edge splitting and merging.
-
Machine description.
John's simplification of MLTREE_BASIS.fcond broke a few machine description things:
rtl-build.{sig,sml} and hppa.mdl fixed.
NOTE: the machine description stuff in the repository is still broken. Again, I can't put my fixes in because that involves changes to MLTREE.
Allen Leung
-
- [2002/03/20]
-
Implemented Knuth-Morris-Pratt string matching in PreString and used it for String.isSubstring, Substring.isSubstring, and Substring.position.
(Might need some stress-testing. Simple examples worked fine.)
Matthias Blume
- [2002/03/19]
-
Added a structure C.W and functions convert/Ptr.convert to ml-nlffi-lib.
This implements a generic mechanism for changing constness qualifiers anywhere within big C types without resorting to outright "casts". (So far, functions such as C.rw/C.ro or C.Ptr.rw/C.Ptr.ro only let you modify the constness at the outermost level.) The implementation of "convert" is based on the idea of "witness" values — values that are not used by the operation but whose types "testify" to their applicability. On the implementation side, "convert" is simply a projection (returning its second curried argument). With cross-module inlining, it should not result in any machine code being generated.
Matthias Blume
- [2002/03/15]
-
Provided (preliminary?) implementations for
{String,Substring}.{concatWith,isSuffix,isSubstring}
and
Substring.full
Those are in the Basis spec but they were missing in SML/NJ.
Matthias Blume
- [2002/03/14]
-
Controls:
-
Factored out the recently-added Controls : CONTROLS stuff and put it into its own library $/controls-lib.cm. The source tree for this is under src/smlnj-lib/Controls.
-
Changed the names of types and functions in this interface, so they make a bit more "sense":
module -> registry 'a registry -> 'a group
-
The interface now deals in ref cells only. The getter/setter interface is (mostly) gone.
-
Added a function that lets one register an already-existing ref cell.
-
Made the corresponding modifications to the rest of the code so that everything compiles again.
-
Changed the implementation of Controls.MLRISC back to something closer to the original. In particular, this module (and therefore MLRISC) does not depend on Controls. There now is some link-time code in int-sys.sml that registers the MLRISC controls with the Controls module.
CM:
-
One can now specify the lambda-split aggressiveness in init.cmi.
Matthias Blume
-
-
- [2002/03/13]
-
Bug fix for:
> leunga@weaselbane:~/Yale/tmp/sml-dist{21} bin/sml > Standard ML of New Jersey v110.39.1 [FLINT v1.5], March 08, 2002 > - fun f(x,(y,z)) = Real.~ y; > [autoloading] > [autoloading done] > fchsl (%eax), 184(%esp) > Error: MLRisc bug: X86MCEmitter.emitInstr > > uncaught exception Error > raised at: ../MLRISC/control/mlriscErrormsg.sml:16.14-16.19
The problem was that the code generator did not generate any fp registers in this case, and the ra didn’t know that it needed to run the X86FP phase to translate the pseudo fp instruction. This only happened with unary fp operators in certain situations.
Allen Leung
- [2002/03/13]
-
-
Added _overload as a synonym for overload for backward compatibility. (Control.overloadKW must be true for either version to be accepted.)
-
Fixed bug in install script that caused more things to be installed than what was requested in config/targets.
-
Made CM aware of the (_)overload construct so that autoloading works.
Matthias Blume
-
- [2002/03/12]
-
Forgot to update BOOT and srcarchiveurl.
Matthias Blume
Version 110.39.2; 2002/03/12
- [2002/03/12]
-
Yet another version number bump (because of small changes to the binfile format). Version number is now 110.39.2. NEW BOOTFILES!
Changes:
The new pid generation scheme described a few weeks ago was overly complicated. I implemented a new mechanism that is simpler and provides a bit more "stability": Once CM has seen a compilation unit, it keeps its identity constant (as long as you do not delete those crucial CM/GUID/* files). This means that when you change an interface, compile, then go back to the old interface, and compile again, you arrive at the original pid.
There now also is a mechanism that instructs CM to use the plain environment hash as a module's pid (effectively making its GUID the empty string). For this, "noguid" must be specified as an option to the .sml file in question within its .cm file. This is most useful for code that is being generated by tools such as ml-nlffigen (because during development programmers tend to erase the tool's entire output directory tree including CM's cached GUIDs). "noguid" is somewhat dangerous (since it can be used to locally revert to the old, broken behavior of SML/NJ, but in specific cases where there is no danger of interface confusion, its use is ok (I think).
ml-nlffigen by default generates "noguid" annotations. They can be turned off by specifying -guid in its command line.
Matthias Blume
- [2002/03/12]
-
Integrated jump chaining and static block frequency into the compiler. More details and numbers later.
Lal George
- [2002/03/11]
-
Tested the jump chain elimination on all architectures (except the hppa). This is on by default right now and is profitable for the alpha and x86, however, it may not be profitable for the sparc and ppc when compiling the compiler.
The gc test will typically jump to a label at the end of the cluster, where there is another jump to an external cluster containing the actual code to invoke gc. This is to allow factoring of common gc invocation sequences. That is to say, we generate:
f: testgc ja L1 % jump if above to L1
L1: jmp L2
+ After jump chain elimination the ja L1 instructions is converted to ja L2. On the sparc and ppc, many of the ja L2 instructions may end up being implemented in their long form (if L2 is far away) using:
jbe L3 % jump if below or equal to L3 jmp L2 L3: ...
+ For large compilation units L2 may be far away.
+ Lal George
- [2002/03/11]
-
A functor parameter was missing.
Matthias Blume
- [2002/03/11]
-
The representation of the empty string now points to a legal null terminated C string instead of unit. It is now possible to convert an ML string into C string with InlineT.CharVector.getData. This compiles into one single machine instruction.
Allen Leung
- [2002/03/10]
-
Added machine generation for CALL instruction (relative displacement mode)
Allen Leung
Version 110.39.1; 2002/03/08
- [2002/03/08]
-
Entrypoints: non-zero offset into a code object where execution should begin.
-
Added the notion of an entrypoint to CodeObj.
-
Added reading/writing of entrypoint info to Binfile.
-
Made runtime system bootloader aware of entrypoints.
-
Use the address of the label of the first function given to mlriscGen as the entrypoint. This address is currently always 0, but it will not be 0 once we turn on block placement.
-
Removed the linkage cluster code (which was The Other Way(tm) of dealing with entry points) from mlriscGen.
Matthias Blume
-
- [2002/03/07]
-
Bug fixes for CMOVcc on x86.
-
Added machine code generation for CMOVcc
-
CMOVcc is now generated in preference over SETcc on PentiumPro or above.
-
CMOVcc cannot have an immediate operand as argument.
Allen Leung
-
- [2002/03/07]
-
This is a very large but mostly boring patch which makes (almost) every tuneable compiler knob (i.e., pretty much everything under Control.* plus a few other things) configurable via both the command line and environment variables in the style CM did its configuration until now.
Try starting sml with -h (or, if you are brave, -H)
To this end, I added a structure Controls : CONTROLS to smlnj-lib.cm which implements the underlying generic mechanism.
The interface to some of the existing such facilities has changed somewhat. For example, the MLRiscControl module now provides mkFoo instead of getFoo. (The getFoo interface is still there for backward-compatibility, but its use is deprecated.)
The ml-build script passes -Cxxx=yyy command-line arguments through so that one can now twiddle the compiler settings when using this "batch" compiler.
TODO items:
We should go through and throw out all controls that are no longer connected to anything. Moreover, we should go through and provide meaningful (and correct!) documentation strings for those controls that still are connected.
Currently, multiple calls to Controls.new are accepted (only the first has any effect). Eventually we should make sure that every control is being made (via Controls.new) exactly once. Future access can then be done using Controls.acc.
Finally, it would probably be a good idea to use the getter-setter interface to controls rather than ref cells. For the time being, both styles are provided by the Controls module, but getter-setter pairs are better if thread-safety is of any concern because they can be wrapped.
Other assorted changes (by other people who did not supply a HISTORY entry):
-
the cross-module inliner now works much better (Monnier)
-
representation of weights, frequencies, and probabilities in MLRISC changed in preparation of using those for weighted block placement (Reppy, George)
Matthias Blume
-
- [2002/03/07]
-
Tested the weighted block placement optimization on all architectures (except the hppa) using AMPL to generate the block and edge frequencies. Changes were required in the machine properties to correctly categorize trap instructions. There is an MLRISC flag "weighted-block-placement" that can be used to enable weighted block placement, but this will be ineffective without block/edge frequencies (coming soon).
+ Lal George
- [2002/03/05]
-
In order to support the block placement optimization, a new cluster is generated as the very first cluster (called the linkage cluster). It contains a single jump to the real entry point for the compilation unit. Block placement has no effect on the linkage cluster itself, but all the other clusters have full freedom in the manner in which they reorder blocks or functions.
On the x86 the typical linkage code that is generated is: ---------------------- .align 2 L0: addl $L1-L0, 72(%esp) jmp L1
+ .align 2 L1: ----------------------
72(%esp) is the memory location for the stdlink register. This must contain the address of the CPS function being called. In the above example, it contains the address of L0; before calling L1 (the real entry point for the compilation unit), it must contain the address for L1, and hence
addl $L1-L0, 72(%esp)
I have tested this on all architectures except the hppa.The increase in code size is of course negligible
Lal George
- [2002/03/03]
-
Added #[ ... ] expressions to mlrisc tools
Allen Leung
- [2002/02/27]
-
-
made types in structure C and C_Debug to be equal
-
got rid of code duplication (c-int.sml vs. c-int-debug.sml)
-
there no longer is a C_Int_Debug (C_Debug is directly derived from C)
Matthias Blume
-
- [2002/02/26]
-
-
Fixed a minor bug in CM’s "noweb" tool: If numbering is turned off, then truly don’t number (i.e., do not supply the -L option to noweb). The previous behavior was to supply -L'' — which caused noweb to use the "default" line numbering scheme. Thanks to Chris Richards for pointing this out (and supplying the fix).
-
Once again, I reworked some aspects of the FFI:
-
The incomplete/complete type business:
-
Signatures POINTER_TO_INCOMPLETE_TYPE and accompanying functors are gone!
-
ML types representing an incomplete type are now equal to ML types representing their corresponding complete types (just like in C). This is still safe because ml-nlffigen will not generate RTTI for incomplete types, nor will it generate functions that require access to such RTTI. But when ML code generated from both incomplete and complete versions of the C type meet, the ML types are trivially interoperable.
NOTE: These changes restore the full generality of the translation (which was previously lost when I eliminated functorization)!
-
-
Enum types:
-
Structure C now has a type constructor "enum" that is similar to how the "su" constructor works. However, "enum" is not a phantom type because each "T enum" has values (and is isomorphic to MLRep.Signed.int).
-
There are generic access operations for enum objects (using MLRep.Signed.int).
-
ml-nlffigen will generate a structure E_foo for each "enum foo".
-
The structure contains the definition of type "mlrep" (the ML-side representation type of the enum). Normally, mlrep is the same as "MLRep.Signed.int", but if ml-nlffigen was invoked with "-ec", then mlrep will be defined as a datatype — thus facilitating pattern matching on mlrep values. ("-ec" will be suppressed if there are duplicate values in an enumeration.)
-
Constructors ("-ec") or values (no "-ec") e_xxx of type mlrep will be generated for each C enum constant xxx.
-
Conversion functions m2i and i2m convert between mlrep and MLRep.Signed.int. (Without "-ec", these functions are identities.)
-
Coversion functions c and ml convert between mlrep and "tag enum".
-
Access functions (get/set) fetch and store mlrep values.
-
-
By default (unless ml-nlffigen was invoked with "-nocollect"), unnamed enumerations are merged into one single enumeration represented by structure E_'.
Matthias Blume
-
-
-
- [2002/02/25]
-
This is a new implementation of the CPS spill phase. The new phase is in the new file compiler/CodeGen/cpscompile/spill-new.sml In case of problems, replace it with the old file spill.sml
The current compiler runs into some serious performance problems when constructing a large record. This can happen when we try to compile a structure with many items. Even a very simple structure like the following makes the compiler slow down.
structure Foo = struct val x_1 = 0w1 : Word32.int val x_2 = 0w2 : Word32.int val x_3 = 0w3 : Word32.int ... val x_N = 0wN : Word32.int end
The following table shows the compile time, from N=1000 to N=4000, with the old compiler:
N 1000 CPS 100 spill 0.04u 0.00s 0.00g MLRISC ra 0.06u 0.00s 0.05g (spills = 0 reloads = 0) TOTAL 0.63u 0.07s 0.21g
1100 CPS 100 spill 8.25u 0.32s 0.64g MLRISC ra 5.68u 0.59s 3.93g (spills = 0 reloads = 0) TOTAL 14.71u 0.99s 4.81g
1500 CPS 100 spill 58.55u 2.34s 1.74g MLRISC ra 5.54u 0.65s 3.91g (spills = 543 reloads = 1082) TOTAL 65.40u 3.13s 6.00g
2000 CPS 100 spill 126.69u 4.84s 3.08g MLRISC ra 0.80u 0.10s 0.55g (spills = 42 reloads = 84) TOTAL 129.42u 5.10s 4.13g
3000 CPS 100 spill 675.59u 19.03s 11.64g MLRISC ra 2.69u 0.27s 1.38g (spills = 62 reloads = 124) TOTAL 682.48u 19.61s 13.99g
4000 CPS 100 spill 2362.82u 56.28s 43.60g MLRISC ra 4.96u 0.27s 2.72g (spills = 85 reloads = 170) TOTAL 2375.26u 57.21s 48.00g