This is the HISTORY file for the Yale SML/NJ CVS repository. An entry should be made for _every_ commit to the repository. The entries in this file will be used when creating the README for new versions, so keep that in mind when writing the description. The form of an entry should be: Name: Date: yyyy/mm/dd Tag: Description: ---------------------------------------------------------------------- Name: Date: yyyy/mm/dd Tag: Release_110_58 Description: New working version (110.58). NEW BOOTFILES! ---------------------------------------------------------------------- Name: Matthias Blume (http://www.tti-c.org/blume/) Date: 2006/03/01 22:15:00 CST Tag: blume-20060301-lexgen Description: Incorporated several bugfixes to lexgen. Compiler now compiles to fixpoint when using lexgen instead of ml-lex. ---------------------------------------------------------------------- Name: Matthias Blume (http://www.tti-c.org/blume/) Date: 2006/02/28 22:45:00 CST Tag: blume-20060228-lexgen Description: Removed ml-flex and added lexgen instead, using Aaron Turon's newly provided tarball. The generated lexers still have problems. ---------------------------------------------------------------------- Name: Matthias Blume (http://www.tti-c.org/blume/) Date: 2006/02/26 23:30:00 CST Tag: blume-20060226-ml-flex Description: Removed ml-flex' dependency on regexp-lib.cm. Turned installation of ml-flex on by default. ---------------------------------------------------------------------- Name: Matthias Blume (http://www.tti-c.org/blume/) Date: 2006/02/24 16:30:00 CST Tag: blume-20060224-ml-flex Description: Added ml-flex sources. Partially integrated, but should not be turned on yet! (Read: leave it commented-out in config/targets!) ---------------------------------------------------------------------- Name: John Reppy (http://www.cs.uchicago.edu/~jhr) Date: 2006/02/23 Tag: jhr-20060223-x86-64 Description: 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. ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2006/02/22 15:07:00 EST Tag: leunga-20060222-mdl-gen Description: CM has changed. Updated the script for rebuilding the MLRISC generated files. ---------------------------------------------------------------------- Name: Matthias Blume (http://www.tti-c.org/blume/) Date: 2006/02/14 17:30:00 CST Tag: blume-20060214-intel-mac Description: 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.) ---------------------------------------------------------------------- Name: John Reppy (http://www.cs.uchicago.edu/~jhr) Date: 2006/02/13 Tag: jhr-20060213-intel-mac Description: Changed MLRISC x86 CCalls for partial support of MacOS X ABI. ---------------------------------------------------------------------- Name: John Reppy (http://www.cs.uchicago.edu/~jhr) Date: 2006/02/06 Tag: jhr-20060206-intel-mac Description: Changes to support MacOS X on Intel hardware. The C-calls support in MLRISC must also be updated to support the MacOS X ABI. ---------------------------------------------------------------------- Name: Matthias Blume (http://www.tti-c.org/blume/) Date: 2005/12/16 00:15:00 CST Tag: blume-20051216-cm Description: Improved error reporting and handling in CM. ---------------------------------------------------------------------- Name: Matthias Blume (http://www.tti-c.org/blume/) Date: 2005/11/21 14:00:00 CST Tag: blume-20051121-html-lib Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (http://www.tti-c.org/blume/) Date: 2005/11/19 13:45:00 CST Tag: Release_110_57 Description: Moved release tag for 110.57. ---------------------------------------------------------------------- Name: Matthias Blume (http://www.tti-c.org/blume/) Date: 2005/11/19 23:35:00 CST Tag: blume-20051119-fish Description: 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.) ---------------------------------------------------------------------- Name: Matthias Blume (http://www.tti-c.org/blume/) Date: 2005/11/16 14:30:00 CST Tag: blume-orig-110_57 Description: New working version (110.57). NEW BOOTFILES! UPDATE: The release tag has been moved to include a fix for a brown-paper- bag glitch (see above). ---------------------------------------------------------------------- Name: Matthias Blume (http://www.tti-c.org/blume/) Date: 2005/11/16 10:25:00 CST Tag: blume-22051116-btrace Description: Fixed problem with bogus exception message when using back-trace facility. ---------------------------------------------------------------------- Name: Matthias Blume (http://www.tti-c.org/blume/) Date: 2005/11/15 22:35:00 CST Tag: blume-22051115-array2copy Description: Added simple implementation of Array2.copy. (Warning: mostly untested.) ---------------------------------------------------------------------- Name: Matthias Blume (http://www.tti-c.org/blume/) Date: 2005/11/15 21:35:00 CST Tag: blume-22051115-versiontool Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (http://www.tti-c.org/blume/) Date: 2005/11/15 16:35:00 CST Tag: blume-22051115-libraries Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2005/11/07 17:05:00 CST Tag: blume-20051107-slice Description: 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. ---------------------------------------------------------------------- Name: John Reppy (http://www.cs.uchicago.edu/~jhr) Date: 2005/11/07 Description: Fixed a Basis incompatibility: The depreciated function Substring.all was removed (use Substring.full instead). ---------------------------------------------------------------------- Name: John Reppy (http://www.cs.uchicago.edu/~jhr) Date: 2005/11/05 Description: Tweaked interval set API in SML/NJ library; see the CHANGES file for details. ---------------------------------------------------------------------- Name: Matthias Blume (http://www.tti-c.org/blume/) Date: 2005/11/02 16:25:00 CST Tag: blume-20051102-hex Description: * Runtime system bootstrap code now accepts hex digits in BOOTLIST in either upper case or lower case format. * Pushed changes to names of Pack{Big,Little} structures through CML and eXene. ---------------------------------------------------------------------- Name: John Reppy (http://www.cs.uchicago.edu/~jhr) Date: 2005/11/02 Description: Fixed a Basis incompatibility: Pack{Big,Little} structures should be called PackWord{Big,Little}. ---------------------------------------------------------------------- Name: John Reppy (http://www.cs.uchicago.edu/~jhr) Date: 2005/10/28 Description: Fixed a minor Basis incompatibility: hex digits should be upper case. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/10/25 16:00:00 CDT Tag: Release_110_56 Description: New working version (110.56). NEW BOOTFILES! ---------------------------------------------------------------------- Name: John Reppy (http://www.cs.uchicago.edu/~jhr) Date: 2005/10/25 Description: Added interval sets to utility library (signatures INTERVAL_DOMAIN and INTERVAL_SET, and functor IntervalSetFn). ---------------------------------------------------------------------- Name: John Reppy (http://www.cs.uchicago.edu/~jhr) Date: 2005/10/14 Description: Add Zhong Shao's fix for datatype equality functions. ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2005/10/14 12:30:00 EST Tag: leunga-20051014-x86-spill Description: Bug fix a bug found by Carl Hauser. There was a typo in the reload code for FCMP in x86SpillInstr.sml. ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2005/10/14 11:15:00 EST Tag: leunga-20051014-x86-asm Description: Removed some debugging code in file x86Asm.sml. The function emit_operand was printing out debugging output. ---------------------------------------------------------------------- Name: John Reppy Date: 2005/07/27 Tag: Description: Fixed ml-lex to recognize "\r" as representing carriage return. ---------------------------------------------------------------------- Name: John Reppy Date: 2005/07/27 Tag: Description: Fixed ml-yacc to work on files with non-native end-of-line encodings (e.g., Windows text file on a Unix system). ---------------------------------------------------------------------- Name: John Reppy Date: 2005/07/20 Tag: Description: Added changes from Dominic Evans (oldmanuk (at) gmail (dot) com) to support HPUX 11. ---------------------------------------------------------------------- Name: John Reppy Date: 2005/07/06 Tag: Description: Changes to the SML/NJ library. See smlnj-lib/CHANGES for details. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/07/06 00:45:00 CDT Tag: blume-20050706-slice-copy Description: Fixed reversed logic for deciding whether to "copy up" or "copy down" in *-array-slice.sml. ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2005/05/31 17:00:00 EST Tag: leunga-20050531-cygwin-fault-2 Description: A typo in the cygwin code fixed. ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2005/05/31 16:47:00 EST Tag: leunga-20050531-cygwin-fault Description: Updated Cygwin's fault/signal handling to match the Windows version. Updated the export list. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/05/18 13:35:00 CDT Tag: Release_110_54 Description: New working version (110.54). NEW BOOTFILES! ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/05/18 11:58:00 CDT Tag: blume-20050518-installer Description: Added support scripts for Mac OS X PackageMaker and modified config/install.sh so that it supports re-dumping a heap image after customization. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/05/18 10:55:00 CDT Tag: blume-20050518-realdiv-noovld Description: Un-overloaded / to work around bug in overloading resolution code. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/05/16 23:50:00 CDT Tag: blume-20050516-redump-heap Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/05/09 21:55:00 CDT Tag: blume-20050509-word64 Description: 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. ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2005/05/04 11:50:00 EST Tag: leunga-20050504-checkgc Description: Added a gc protocol checking phase. This phase is enabled with the flag "check-gc". "debug-check-gc" turns on the verbose mode. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/05/04 10:45:00 CDT Tag: blume-20050504-intinf Description: Fixed a bug in the implementation of div and mod for IntInf. Thanks to Neophytos Michael for reporting the problem. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/05/04 10:35:00 CDT Tag: blume-20050504-join Description: Added a "join" combinator to the ParserComb module in smlnj-lib.cm. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/02/28 23:40:00 CST Tag: blume-20050228-mVar Description: 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.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/02/25 15:00:00 CST Tag: Release_110_53 Description: New working version (110.53). NEW BOOTFILES! ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/02/25 14:50:00 CST Tag: blume-20050225-susp Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/02/24 16:50:00 CST Tag: blume-20050224-cml-atom Description: Simpler and at the same time more general implementation of structure Atom in CML. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/02/15 17:35:00 CST Tag: blume-20050215-tools Description: Created new "tools" directory under "src" and moved "TraceDebugProf" there. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/02/10 17:55:00 CST Tag: blume-20050210-longlong Description: Implemented "long long" arguments and results for NLFFI. (Only the PPC/MacOS implementation is complete, the other backends still need to be updated.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/01/24 17:40:00 CST Tag: blume-20050124-mlyacc Description: Minor cleanup in ML-Yacc rule printing mechanism. This should fix a problem with certain "as" patterns which previously got rendered using incorrect syntax. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/01/18 12:00:00 CST Tag: blume-20050118-profile Description: Made time profiling code (interrupt handler) in runtime system aware of new array representation. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/01/14 18:00:00 CST Tag: blume-20050114-heap2exec Description: 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). - removed old "HACKED_STANDALONE" hack from runtime To be able to test this, 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" which you can then invoke directly as a command. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2005/01/07 11:44:00 CST Tag: blume-20050107-mlstring Description: fixed off-by-one error in ML_STRING macro (globals.c) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/12/23 18:00:00 CST Tag: blume-20041223-santa Description: Made ml-build script "smarter" (but only very little). ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/12/21 15:05:00 CST Tag: blume-20041221-longlong Description: * 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.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/12/21 12:50:00 CST Tag: blume-20041221-memory Description: Some cleanup in the $c/memory.cm library: separated some concerns by moving allocation code and memory access code each into their own files. ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2004/12/17 16:12:00 EST Tag: leunga-20041217-cygwin-smlnj-home Description: 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. _run-sml now converts SMLNJ_HOME to a POSIX pathname on cygwin. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/12/16 13:35:00 CST Tag: Release_110_52 Description: Last-minute changes incorporated into 110.52. Release tag moved. The changes: - HashString.hashString' -> HashString.hashSubstring - bug fix in UnivariateStats ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/12/15 23:40:00 CST Tag: blume-20041215-hashSubstring Description: - HashString.hashString' -> HashString.hashSubstring - corresponding changes in atom.sml - "de-compressed" (aka. un-obfuscated) code for UnivariateStats and added some comments ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/12/15 15:30:00 CST Tag: (Release_110_52) Description: New working version (110.52). NEW BOOTFILES! ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/12/15 12:45:00 CST Tag: blume-20041215-spaces Description: More on the space problem (this time for Win32). ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/12/14 17:30:00 CST Tag: blume-20041214-spaces Description: 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.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/12/13 14:45:00 CST Tag: blume-20041213-ml-makedepend Description: Fixed bug in code for ml-makedepend. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/12/09 16:30:00 CST Tag: blume-20041209-statistics Description: Added two simple but potentially useful statistics modules to SML/NJ Library. (See CHANGES file there.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/12/01 16:50:00 CST Tag: blume-20041201-atom Description: smlnj-lib: 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.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/11/24 22:15:00 CST Tag: blume-20041124-cml Description: Made sure CML compiles when Position = Int64. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/11/24 14:30:00 CST Tag: blume-20041124-position Description: The compiler can now be compiled in a mode that makes structure Position equal to Int64. The default, however, is unchanged (Position = Int31) for the time being. To enable 64-bit positions, use the following procedure: 1. Start sml 2. Autoload $smlnj/cmb.cm (if not already autoloaded) 3. Type #set (CMB.symval "USE_64_BIT_POSITIONS") (SOME 1); 4. 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/11/23 14:45:00 CST Tag: blume-20041123-useFile Description: Fixed a problem with unhelpful error messages related to problems with .cm- or .sml files that appear as part of the sml command line. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/11/18 15:40:00 CST Tag: Release_110_51 Description: New working version (110.51). NEW BOOTFILES! ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/11/18 15:35:00 CST Tag: Description: Enabled dlopen and friends for FreeBSD (as recommended by Johannes 5 Joemann). ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2004/11/17 16:05:21 EST 2004 Tag: leunga-20041117-mlrisc-live-kill Description: Added support for MLTree constructs LIVE and KILL to all the architectures. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/11/13 00:20:00 CST Tag: blume-20041113-versiontool Description: - 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/11/12 00:30:00 CST Tag: blume-20041112-int64 Description: Structure Int64 fully hooked in. (The implementation is not very efficient, though.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/11/11 17:30:00 CST Tag: blume-20041111-more64 Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/11/11 00:15:00 CST Tag: blume-20041111-word64 Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/11/10 18:12:00 CST Tag: blume-20041110-64bit Description: More 64-bit hacking (but still not even half-way there yet). Also, some assorted improvements to the handling of 8-bit words. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/11/09 17:50:00 CST Tag: Description: Started adding some infrastructure for supporting 64-bit int- and word-types. (Still in its very early stages.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/10/28 10:45:00 CDT Tag: Release_110_50 Description: New working version (110.50). NEW BOOTFILES! ===================== Also: - 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.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/10/27 17:50:00 CDT Tag: blume-20041027-btrace-msg Description: BackTrace.monitor now also reports the source of the exception that triggered the trace. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/10/27 17:20:00 CDT Tag: blume-20041027-x86-c-calls Description: 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) ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2004/10/24 14:00:00 EST Tag: leunga-20041024-x86-gas-fucomip Description: John discovered a bug in the syntax of fucomip. The opcodes FU?COMIP? have been changed to fu?comip? %st(i), %st ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/10/20 15:06:00 CDT Tag: blume-20041020-standalone-backtrace Description: Added a mechanism for getting back-trace information from standalone programs. Here is how it works: 1. 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 () => ...) 2. To be able to access BackTrace.monitor, you have to add library $smlnj-tdp/plugins.cm to the .cm file that contains your main function. 3. Remove all compiled code (i.e., all the .cm/ subdirectories that CM might have created in the past for your project). 4. 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 a library name: $/trace-debug-profile.cm --> $smlnj-tdp/plugins.cm 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 ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/10/18 16:45:00 CDT Tag: blume-20041018-groupowner Description: Added an "obsolete" warning for the "group owner" syntax to CM's parser. Eliminated group owner specs from .cm files throughout the source tree. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/10/15 15:45:00 CDT Tag: blume-20041015-coverage Description: * 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/10/14 17:40:00 CDT Tag: blume-20041014-tdp-core Description: Snapshot of a significant overhaul of how the trace/debug/profile support is hooked into the system (specifically: Core and SMLofNJ.Internals). ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/10/13 16:34:00 CDT Tag: blume-20041013-tdp Description: 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 ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/10/11 16:37:00 CDT Tag: blume-20041011-regions Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/10/08 22:50:00 CDT Tag: blume-20041008-cmkw Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/10/07 16:00:00 CDT Tag: blume-20041007-cleanup Description: 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 ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/10/06 15:15:15 CDT Tag: blume-20041006-handler Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/10/01 10:20:30 CDT Tag: blume-20041001-slave Description: 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...) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/09/30 10:55:00 CDT Tag: blume-20040930-version Description: * 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/09/29 14:00:00 CDT Tag: blume-20040929-autoversion Description: 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.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/09/28 10:53:00 CDT Tag: blume-20040928-controls Description: Some cleanup of the controls code. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/09/27 22:08:00 CDT Tag: blume-20040927-controls Description: Added two pieces of functionality to the Controls interface: 1. val save'restore: 'a control -> unit -> unit grabs the current value of the control in stage 1 and restores it in stage 2. 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.) 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.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/09/27 17:00:00 CDT Tag: blume-20040927-lazysml Description: 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 ...)) etc. 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)) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/09/24 16:22:00 CDT Tag: blume-20040924-ppc-long-branch Description: Turned message about "emiting long form of branch" off by default. Added a control flag to turn it back on when desired. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/09/24 16:05:00 CDT Tag: blume-20040924-rounding Description: Applied patch for setting rounding modes under Mac OS X. Thanks to Melissa O'Neill for providing the code! ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/09/23 17:30:00 CDT Tag: blume-20040923-envvars Description: 1. Changed definition of type ControlRegistry.registry_tree to include control_info (i.e., the name of the controlling environment variable). 2. 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.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/09/13 16:50:00 CDT Tag: Release_110_49 Description: New working version (110.49). NEW BOOTFILES! ---------------------------------------------------------------------- Name: Matthias Blume Date: 2004/09/13 16:20:00 CDT Tag: blume-20040913-config-mlrisc Description: 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.) ---------------------------------------------------------------------- Name: John Reppy Date: 2004/09/13 Tag: jhr-20040913-signals Description: Fixed the signal masking code to properly nest mask/unmask operations on a per-signal basis. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/09/08 13:20:00 CDT Tag: blume-20040908-heap-magic Description: Bumped the heap macig number to 0x09082004 to account for the changed layout of the ML frame under MacOS X. ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2004/09/03 11:26:00 EST Tag: leunga-20040903-cygwin-install Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/08/31 17:15:00 CDT Tag: blume-20040831-core Description: Added some exports to src/compiler/core.cm upon request by J. Joemann. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/08/30 17:55:00 CDT Tag: blume-20040830-installer Description: 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) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/08/27 17:20:00 CDT Tag: blume-20040827-ptreql Description: Added ptreql primop to structure InlineT (upon request from Larry Paulson). ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2004/08/15 21:21:00 EST Tag: leunga-110_48-udgraph Description: 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. ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2004/08/10 23:35:00 EST Tag: leunga-110_48-ppc Description: The IBM/MacOS syntax switch on PPC was incorrectly swapped. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/08/10 12:00:00 CDT Tag: Release_110_48 Description: New working version (110.48). NEW BOOTFILES! ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2004/08/09 12:21:00 EST Tag: leunga-110_47-dijsktra Description: 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). ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/08/06 18:10:00 CDT Tag: blume-20040806-cmdline Description: Fiddled with handling of command-line options: * sml now quits after processing the command line if -H, -S, -h, or -s 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 ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2004/08/04 18:17:00 EST Tag: leunga-110_47-ppc-ibm-asm Description: - 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/08/04 14:00:00 CDT Tag: Release_110_47 Description: New working version (110.47). NEW BOOTFILES! ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/08/03 14:25:00 CDT Tag: blume-20040803-callingconv Description: Added low-level support for choosing C calling conventions by twiddling the type of rawccall. (See src/compiler/Semant/types/cproto.sml for details.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/08/02 15:55:00 CDT Tag: blume-20040802-backout Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/08/02 14:45:00 CDT Tag: blume-20040802-nlffi-win32 Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/07/30 17:55:00 CDT Tag: blume-20040730-various Description: 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 ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/07/21 18:20:00 CDT Tag: blume-20040721-nlffigen Description: - 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/07/14 16:25:00 CDT Tag: blume-20040714-union Description: 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. ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2004/07/14 14:38:00 EST Tag: leunga-110_46_1-ppc-lwzu Description: 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. ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2004/07/13 15:04:00 EST Tag: leunga-110_46_1-ppc-lwarx Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/07/13 13:50:00 CDT Tag: blume-20040713-nlffi Description: - 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 SMLNJ_BINDIR= This can be used by the Makefile to, e.g., pick the "right" version of ml-nlffigen. - minor code tweaks ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/07/12 22:50:00 CDT Tag: blume-110_46_1-macosx-nlffi Description: NLFFI under Mac OS X now working (sort of). This is largely untested, though. Note: 1. You have to make a new, clean build of the runtime system. 2. 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/06/18 14:30:00 CDT Tag: blume-20040618-unix Description: 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.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/06/17 18:15:00 CDT Tag: Release_110_46 Description: New working version (110.46). NEW BOOTFILES! ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/06/17 17:20:00 CDT Tag: blume-20040617-timer-unix Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/05/28 16:45:00 CDT Tag: blume-20040528-basis Description: Added signature PACK_REAL and exported functor PrimIO. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/05/25 16:00:00 CDT Tag: blume-20040525-group-owner Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/05/20 16:00:00 CDT Tag: blume-20040520-win32 Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/05/19 22:10:00 CDT Tag: blume-20040519-ml-build Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/05/18 15:50:00 CDT Tag: blume-20040518-mkreader Description: Added Posix.IO.mk{Bin,Text}{Reader,Writer} by lifting their respective implementations from internal modules PosixBinPrimIO and PosixTextPrimIO. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/05/11 14:35:00 CDT Tag: blume-20040511-win32sock Description: Added previously missing support for many socket-related functions under win32. Thanks to David Hansel 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 ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/05/11 14:20:00 CDT Tag: blume-20040511-installml Description: Fixed two bugs in installml script. (Thanks to Vesa A. Norrman for the patch.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/05/11 14:05:00 CDT Tag: blume-20040511-nlffi-netbsd Description: Added support for nlffi under netbsd. (Thanks to Vesa A. Norrman for the patch.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/05/11 12:05:00 CDT Tag: blume-20040511-exports Description: As per request by Adam Chlipala , extended various export lists in compiler-related .cm-files. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/05/11 11:35:00 CDT Tag: blume-20040511-allsource Description: 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.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/04/23 17:40:00 CDT Tag: blume-20040423-ieee-scan Description: 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). ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/04/23 10:40:00 CDT Tag: blume-20040423-ml-build Description: The ml-build script now terminates with a non-0 status when something goes wrong. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/04/22 16:35:00 CDT Tag: blume-20040422-Option Description: Made exception Option to be the same as exception Option.Option (as it should be). ---------------------------------------------------------------------- Name: Allen Leung (leunga (at) reservoir (dot) com) Date: 2004/03/19 14:40:00 EST Tag: leunga-20040319-cygwin-nlffi Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/03/04 16:35:00 CST Tag: blume-20040304-intinf-fmt Description: Fixed problem with IntInf.fmt (sign would show up on the right instead of on the left for BIN, OCT, and HEX). ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/03/04 11:25:00 CST Tag: blume-20040304-symlinks Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/02/13 14:50:00 CST Tag: Release_110_45 Description: New working version (110.45). New bootfiles. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/01/26 15:15:15 CST Tag: blume-20040126-toplevel Description: Improved handling of exceptions at the interactive toplevel. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2004/01/26 11:25:00 Tag: blume-20040126-app Description: Type of top-level "app" corrected. Added code for setting vp_limitPtrMask to Win32-specific runtime. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/11/18 17:10 CST Tag: blume-20031118-basis-fiddle Description: - changed Timer interface to what might become the spec - POSIX_FLAGS -> BIT_FLAGS according to spec - some other minor discrepancies wrt. spec eliminated ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/11/06 12:00:00 CST Tag: Release_110_44 Description: New working version (110.44). New bootfiles. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/11/04 11:50:00 CST Tag: blume-20031104-move-libraries Description: 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.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/11/03 16:00:00 CST Tag: blume-20031103-installdir Description: Made installer honor INSTALLDIR variable again. (Thanks to Chris Richards for pointing out the problem and providing the solution.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/10/01 17:05:00 CDT Tag: blume-20031001-lal-mlrisc Description: MLRISC bug fix from Lal. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/30 16:10:00 CDT Tag: blume-20030930-primio-bat Description: 1. Added openVector, nullRd, and nullWr to PRIM_IO. 2. Improved .bat files (for Win32 port) to make things work under Win95. (thanks to Aaron S. Hawley for this one) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/26 16:05:00 CDT Tag: blume-20030926-wrappriv Description: Added missing wrapper for privilege "primitive" in $smlnj/viscomp/core.cm. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/26 15:00:00 CDT Tag: blume-20030926-110_43_3 Description: - additional cleanup - version number bump, NEW BOOTFILES ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/26 12:00:00 CDT Tag: blume-20030926-ppautoload Description: 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.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/24 16:31:00 CDT Tag: blume-20030924-installer Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/24 15:35:00 CDT Tag: blume-20030924-synsock Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/24 15:10:05 CDT Tag: blume-20030924-sockets Description: 1. 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). 2. 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. 3. 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!) 4. 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. 5. Changed Real64.precision from 52 to 53. Minor cleanup in Real64 code. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/22 12:10:00 CDT Tag: blume-20030922-110_43_2 Description: Made a new interim version and bootfiles for developer's bootstrapping convenience. 110.43.2 -- NEW BOOTFILES ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/19 15:55:00 CDT Tag: blume-20030919-cmdir Description: 1. new-install.sh -> install.sh 2. changed default CM "metadata" directory name to ".cm" (instead of "CM") 3. 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 ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/18 16:00:00 CDT Tag: blume-20030918-110_43_1 Description: Made a new interim version and bootfiles for developer's bootstrapping convenience. 110.43.1 -- NEW BOOTFILES ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/18 15:20:00 CDT Tag: blume-20030918-misc Description: 1. 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. 2. Added Time.{from,to}Nanoseconds to Time. 3. 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/17 16:30:00 CDT Tag: blume-20030917-real32-slices Description: 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... ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/15 17:45:00 CDT Tag: blume-20030915-rbase Description: Fixed bug in Real.fromLargeInt. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/13 18:11:00 CDT Tag: blume-20030913-libinstall Description: 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). ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/12 11:45:00 CDT Tag: blume-20030912-various Description: - 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 ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/09 22:00:00 CDT Tag: Release_110_43 Description: New working release 110.43. New bootfiles. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/09 19:20:00 CDT Tag: blume-20030909-installer Description: 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) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/08 11:55:00 CDT Tag: blume-20030908-fullpath Description: 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.) ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/09/04 16:30:00 CDT Tag: blume-20030905-slices-etc Description: 1. Changed interface to vectors and arrays in Basis to match (draft) Basis spec. 2. Added signatures and implementations of slices according to Basis spec. 3. 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.) 4. 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. 5. Changed type of OS.FileSys.readDir and Posix.FileSys.readdir to dirstream -> string option (in accordance with Basis spec). 6. 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!) 7. BitArray in smlnj-lib/Util has been extended/modified to match the new MONO_ARRAY signature. (Do we need BitArraySlice?) 8. Removed temporary additions (fromInternal, toInternal) from the (now obsolete) IntInf in smlnj-lib/Util. 9. Cleaned up structure Byte. 10. Added localOffset, scan, and fromString to Date (according to spec). Cleaned/corrected implementation of Date. (Still need to check for correctness; implement better canonicalizeDate.) 11. Added "scan" to signature IEEE_REAL. 12. Some improvements to IntInf [in particular: efficiency-hack for mod and rem when second operand is 2 (for parity checks).] 13. 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. 14. Functor PrimIO now takes two additional arguments (VectorSlice and ArraySlice). ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/08/28 17:00:00 CDT Tag: blume-20030828-intinf Description: 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. ---------------------------------------------------------------------- Name: Dave MacQueen (dbm@cs.uchicago.edu) Date: 2003/08/13 11:36:00 CDT Tag: dbm-20030813-mcz-merge1 Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/08/11 15:45:00 CDT Tag: blume-20030811-windows Description: Version number bumped to 110.42.9. NEW BOOTFILES!!! http://smlnj.cs.uchicago.edu/dist/working/110.42.9/ 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.) ---------------------------------------------------------------------- Name: Dave MacQueen (macqueen@cs.uchicago.edu) Date: 2003/06/17 Tag: macqueen-20030617-bug895 Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/05/27 16:55:00 CDT Tag: blume-20030527-polyeq Description: Tried to eliminated most cases of polymorphic equality. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/05/21 17:45:00 CDT Tag: blume-20030517-complete Description: Two changes: 1. Added a flag for controlling whether non-exhaustive bindings will be treated as errors (default is false). 2. Cleaned up the *entire* source tree so that CMB.make goes through without a single non-exhaustive match- or bind warning. ---------------------------------------------------------------------- Name: Matthias Blume (blume (at) tti - c (dot) org) Date: 2003/05/17 10:20:00 CDT Tag: blume-20030517-absyn Description: 1. 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.) 2. The ErrorMsg.Error exception is now caught and absorbed by the interactive loop. ---------------------------------------------------------------------- Name: Allen Leung Date: 2003/05/16 13:05:00 CDT Tag: leunga-20030516-cygwin-runtime Description: Ported the runtime system to cygwin, which uses the unix x86-unix bin files. Missing/buggy features: o getnetbyname, getnetbyaddr: these functions seem to be missing in the Cygwin library. o Ctrl-C handling may be flaky. o Windows system calls and Windows I/O are not supported. A new set of binfiles is located at: http://www.dorsai.org/~leunga/boot.x86-unix.tgz This is only needed for bootstrapping the cygwin version of smlnj. Other x86 versions can use the existing binfiles. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2003/04/08 15:42:00 CDT Tag: blume-20030408-listpair Description: 1. Added a target 'mlrisc' to installer. 2. Added missing elements to structure ListPair. ---------------------------------------------------------------------- Name: Allen Leung Date: 2003/01/07 10:40:00 EST Tag: leunga-20030107-int-rem Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/12/12 16:25:00 EST Tag: blume-20021212-risc-ra Description: 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). ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/12/06 22:40:00 EST Tag: blume-20021206-cm-fileid Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/10/28 09:50:00 EST Tag: blume-20021028-typecheck Description: Exported structure Typecheck from $smlnj/viscomp/core.cm. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/10/17 09:10:00 EDT Tag: Release_110_42 Description: 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.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/10/16 12:00:00 EDT Tag: Release_110_42_removed Description: New working release. New bootfiles. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/10/10 13:10:00 EDT Tag: blume-20021010-ppc-divs Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/07/23 11:45:00 Tag: blume-20020723-smlnj-home Description: 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.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/07/12 21:19:00 EDT Tag: blume-20020712-liveness Description: Exported two useful "step" functions from liveness module (MLRISC). ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/07/05 16:00 EDT Tag: Release_110_41 Description: New working release. New bootfiles. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/07/05 10:25:00 EDT Tag: blume-20020705-btimp Description: Exported structure BTImp from $smlnj/viscomp/debugprof.cm so that other clients can set up backtracing support. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/06/25 17:23:00 EDT Tag: blume-20020625-fpmax Description: 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.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/06/11 Tag: blume-20020611-unixpath Description: Back-ported OS.Path.{from,to}UnixPath from idlbasis-devel branch. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/06/10 16:35:00 EDT Tag: blume-20020610-ieeereal Description: 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 "" 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... ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/05/31 Tag: blume-20020531-btrace-mode Description: Resurrected SMLofNJ.Internals.BTrace.mode. (It accidentally fell by the wayside when I switched over to using Controls everywhere.) ---------------------------------------------------------------------- Name: Lal George Date: 2002/05/23 12:21:40 EDT Tag: george-20020523-visual-labels Description: Labels are now displayed in the graphical output to make the fall-through and target blocks obvious. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/05/22 11:03:00 EDT Tag: blume-20020522-shrink Description: John tweaked yesterday's fix for 1131 to handle an out-of-memory situation that comes up when allocating huge arrays. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/05/21 16:00:00 EDT Tag: Release_110_40 Description: New working release (110.40). New bootfiles. [Also: John Reppy fixed GC bug 1131.] ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/05/21 12:35:00 EDT Tag: blume-20020521-cmdoc Description: CM documentation update. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/05/21 10:55:00 EDT Tag: blume-20020521-misc Description: - 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). ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/05/20 22:25:00 EDT Tag: blume-20020520-controls Description: - 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.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/05/20 10:59:00 EDT Tag: blume-20020520-preloads Description: Added a lot of commented-out suggestions for things to be included in config/preloads. ---------------------------------------------------------------------- Name: Allen Leung Date: 2002/05/18 14:20:00 EDT Tag: leunga-20020518-mdl Description: o Made the mdl tool stuff compile and run again. o I've disabled all the stuff that depends on RTL specifications; they are all badly broken anyway. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/05/17 16:49:00 EDT Tag: blume-20020517-controls Description: 0. John Reppy made several modifications to the SML/NJ library. In particular, there is a shiny new controls-lib.cm. 1. Pushed new controls interface through compiler so that everything compiles again. 2. Added FormatComb and FORMAT_COMB to the CML version of the SML/NJ library (so that CML compiles again). 3. 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.) ---------------------------------------------------------------------- Name: Lal George Date: 2002/05/15 09:20:10 EDT Tag: george-20020515-pseudo-op-decls Description: 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;-) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/05/13 16:40:00 EDT Tag: blume-20020513-pp-etc Description: 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 ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/05/10 16:40:00 EDT Tag: blume-20020510-erg-textio Description: 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) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/04/12 13:55:00 EDT Tag: blume-20020412-assyntax Description: 1. Grabbed newer assyntax.h from the XFree86 project. 2. Fiddled with how to compile X86.prim.asm without warnings. 3. (Very) Minor cleanup in CM. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/04/01 (no joke!) 17:07:00 EST Tag: blume-20020401-x86div Description: 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... ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/29 17:22:00 Tag: blume-20020329-div Description: 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... ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/29 14:10:00 EST Tag: blume-20020329-inlprims Description: NEW BOOTFILES!!! Version number bumped to 110.39.3. 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.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/27 16:27:00 EST Tag: blume-20020327-mlrisc-divisions Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/25 17:25:00 EST Tag: blume-20020325-divmod Description: 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 ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/25 22:06:00 EST Tag: blume-20020325-cprotobug Description: Fixed a bug in cproto (c prototype decoder). ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/25 16:00:00 EST Tag: blume-20020325-raw-primops Description: 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.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/24 22:40:00 EST Tag: blume-20020324-bootfiles Description: Made the bootfiles that Allen asked for. ---------------------------------------------------------------------- Name: Allen Leung Date: 2002/03/23 15:50:00 EST Tag: leunga-20020323-flint-cps-rcc-primops Description: 1. 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 2. 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] 3. RAW_CCALL/RCC now takes two extra arguments: a. The first is whether the C call is reentrant, i.e., whether ML state should be saved and restored. b. 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. 4. 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. 5. Pickler/unpicker Changed to handle RAW_RECORD and newest RAW_CCALL 6. MLRiscGen, 1. Changed to handle the new rawload/rawstore/rawrecord operators. 2. Code for handling C Calls has been moved to a new module CPSCCalls, in the file CodeGen/cpscompile/cps-c-calls.sml 7. Added the conditional move operator condmove of branch to cps. Generation of this is still buggy so it is currently disabled. ---------------------------------------------------------------------- Name: Lal George Date: 2002/03/22 14:18:25 EST Tag: george-20020322-cps-branch-prob Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/21 22:20:00 EST Tag: blume-20020321-kmp-bugfix Description: Changed the interface to the KMP routine in PreString and fixed a minor bug in one place where it was used. ---------------------------------------------------------------------- Name: Allen Leung Date: 2002/03/21 20:30:00 EST Tag: leunga-20020321-cfg Description: Fixed a potential problem in cfg edge splitting. ---------------------------------------------------------------------- Name: Allen Leung Date: 2002/03/21 17:15:00 EST Tag: leunga-20020321-x86-fp-cfg Description: 1. Recoded the buggy parts of x86-fp. a. All the block reordering code has been removed. We now depend on the block placement phases to do this work. b. 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. 2. X86 backend. a. 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. b. Added support for FUCOMI and FUCOMIP when generating code for PentiumPro and above. We only generate these instructions in the fast-fp mode. c. Added cases for JP and JNP in X86FreqProps. 3. CFG CFG now has a bunch of methods for edge splitting and merging. 4. 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. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/20 15:55:00 EST Tag: blume-20020320-kmp Description: 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.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/19 16:37:00 EST Tag: blume-20020319-witnesses Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/15 16:40:00 EST Tag: blume-20020315-basis Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/14 21:30:00 EST Tag: blume-20020314-controls Description: Controls: --------- 1. 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. 2. Changed the names of types and functions in this interface, so they make a bit more "sense": module -> registry 'a registry -> 'a group 3. The interface now deals in ref cells only. The getter/setter interface is (mostly) gone. 4. Added a function that lets one register an already-existing ref cell. 5. Made the corresponding modifications to the rest of the code so that everything compiles again. 6. 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. ---------------------------------------------------------------------- Name: Allen Leung Date: 2002/03/13 17:30:00 EST Tag: leunga-20020313-x86-fp-unary Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/13 14:00:00 EST Tag: blume-20020313-overload-etc Description: 1. Added _overload as a synonym for overload for backward compatibility. (Control.overloadKW must be true for either version to be accepted.) 2. Fixed bug in install script that caused more things to be installed than what was requested in config/targets. 3. Made CM aware of the (_)overload construct so that autoloading works. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/12 22:03:00 EST Tag: blume-20020312-url Description: Forgot to update BOOT and srcarchiveurl. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/12 17:30:00 EST Tag: blume-20020312-version110392 Description: 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. ---------------------------------------------------------------------- Name: Lal George Date: 2002/03/12 12 14:42:36 EST Tag: george-20020312-frequency-computation Description: Integrated jump chaining and static block frequency into the compiler. More details and numbers later. ---------------------------------------------------------------------- Name: Lal George Date: 2002/03/11 11 22:38:53 EST Tag: george-20020311-jump-chain-elim Description: 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. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/11 13:30:00 EST Tag: blume-20020311-mltreeeval Description: A functor parameter was missing. ---------------------------------------------------------------------- Name: Allen Leung Date: 2002/03/11 10:30:00 EST Tag: leunga-20020311-runtime-string0 Description: 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. ---------------------------------------------------------------------- Name: Allen Leung Date: 2002/03/10 23:55:00 EST Tag: leunga-20020310-x86-call Description: Added machine generation for CALL instruction (relative displacement mode) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/08 16:05:00 Tag: blume-20020308-entrypoints Description: Version number bumped to 110.39.1. NEW BOOTFILES! 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. ---------------------------------------------------------------------- Name: Allen Leung Date: 2002/03/07 20:45:00 EST Tag: leunga-20020307-x86-cmov Description: Bug fixes for CMOVcc on x86. 1. Added machine code generation for CMOVcc 2. CMOVcc is now generated in preference over SETcc on PentiumPro or above. 3. CMOVcc cannot have an immediate operand as argument. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/03/07 16:15:00 EST Tag: blume-20020307-controls Description: 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. ***************************************** One bug fix: The function blockPlacement in three of the MLRISC backpatch files used to be hard-wired to one of two possibilities at link time (according to the value of the placementFlag). But (I think) it should rather sense the flag every time. ***************************************** Other assorted changes (by other people who did not supply a HISTORY entry): 1. the cross-module inliner now works much better (Monnier) 2. representation of weights, frequencies, and probabilities in MLRISC changed in preparation of using those for weighted block placement (Reppy, George) ---------------------------------------------------------------------- Name: Lal George Date: 2002/03/07 14:44:24 EST 2002 Tag: george-20020307-weighted-block-placement 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). ---------------------------------------------------------------------- Name: Lal George Date: 2002/03/05 17:24:48 EST Tag: george-20020305-linkage-cluster 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 ---------------------------------------------------------------------- Name: Allen Leung Date: 2002/03/03 13:20:00 EST Tag: leunga-20020303-mlrisc-tools Added #[ ... ] expressions to mlrisc tools ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/02/27 12:29:00 EST Tag: blume-20020227-cdebug Description: - 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) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/02/26 12:00:00 EST Tag: blume-20020226-ffi Description: 1. 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). 2. Once again, I reworked some aspects of the FFI: A. 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)! B. 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_'. ---------------------------------------------------------------------- Name: Allen Leung Date: 2002/02/25 04:45:00 EST Tag: leunga-20020225-cps-spill 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 As you can see the old cps spill module suffers from some serious performance problem. But since I cannot decipher the old code fully, instead of patching the problems up, I'm reimplementing it with a different algorithm. The new code is more modular, smaller when compiled, and substantially faster (O(n log n) time and O(n) space). Timing of the new spill module: 4000 CPS 100 spill 0.02u 0.00s 0.00g MLRISC ra 0.25u 0.02s 0.15g (spills=1 reloads=3) TOTAL 7.74u 0.34s 1.62g Implementation details: As far as I can tell, the purpose of the CPS spill module is to make sure the number of live variables at any program point (the bandwidth) does not exceed a certain limit, which is determined by the size of the spill area. When the bandwidth is too large, we decrease the register pressure by packing live variables into spill records. How we achieve this is completely different than what we did in the old code. First, there is something about the MLRiscGen code generator that we should be aware of: o MLRiscGen performs code motion! In particular, it will move floating point computations and address computations involving only the heap pointer to their use sites (if there is only a single use). What this means is that if we have a CPS record construction statement RECORD(k,vl,w,e) we should never count the new record address w as live if w has only one use (which is often the case). We should do something similar to floating point, but the transformation there is much more complex, so I won't deal with that. Secondly, there are now two new cps primops at our disposal: 1. rawrecord of record_kind option This pure operator allocates some uninitialized storage from the heap. There are two forms: rawrecord NONE [INT n] allocates a tagless record of length n rawrecord (SOME rk) [INT n] allocates a tagged record of length n and initializes the tag. 2. rawupdate of cty rawupdate cty (v,i,x) Assigns to x to the ith component of record v. The storelist is not updated. We use these new primops for both spilling and increment record construction. 1. Spilling. This is implemented with a linear scan algorithm (but generalized to trees). The algorithm will create a single spill record at the beginning of the cps function and use rawupdate to spill to it, and SELECT or SELp to reload from it. So both spills and reloads are fine-grain operations. In contrast, in the old algorithm "spills" have to be bundled together in records. Ideally, we should sink the spill record construction to where it is needed. We can even split the spill record into multiple ones at the places where they are needed. But CPS is not a good representation for global code motion, so I'll keep it simple and am not attempting this. 2. Incremental record construction (aka record splitting). Long records with many component values which are simulatenously live (recall that single use record addresses are not considered to be live) are constructed with rawrecord and rawupdate. We allocate space on the heap with rawrecord first, then gradually fill it in with rawupdate. This is the technique suggested to me by Matthias. Some restrictions on when this is applicable: 1. It is not a VECTOR record. The code generator currently does not handle this case. VECTOR record uses double indirection like arrays. 2. All the record component values are defined in the same "basic block" as the record constructor. This is to prevent speculative record construction. ---------------------------------------------------------------------- Name: Allen Leung Date: 2002/02/22 01:02:00 EST Tag: leunga-20020222-mlrisc-tools Minor bug fixes in the parser and rewriter ---------------------------------------------------------------------- Name: Allen Leung Date: 2002/02/21 20:20:00 EST Tag: leunga-20020221-peephole Regenerated the peephole files. Some contained typos in the specification and some didn't compile because of pretty printing bugs in the old version of 'nowhere'. ---------------------------------------------------------------------- Name: Allen Leung Date: 2002/02/19 20:20:00 EST Tag: leunga-20020219-mlrisc-tools Description: Minor bug fixes to the mlrisc-tools library: 1. Fixed up parsing colon suffixed keywords 2. Added the ability to shut the error messages up 3. Reimplemented the pretty printer and fixed up/improved the pretty printing of handle and -> types. 4. Fixed up generation of literal symbols in the nowhere tool. 5. Added some SML keywords to to sml.sty ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/02/19 16:20:00 EST Tag: blume-20020219-cmffi Description: A wild mix of changes, some minor, some major: * All C FFI-related libraries are now anchored under $c: $/c.cm --> $c/c.cm $/c-int.cm --> $c/internals/c-int.cm $/memory.cm --> $c/memory/memory.cm * "make" tool (in CM) now treats its argument pathname slightly differently: 1. If the native expansion is an absolute name, then before invoking the "make" command on it, CM will apply OS.Path.mkRelative (with relativeTo = OS.FileSys.getDir()) to it. 2. The argument will be passed through to subsequent phases of CM processing without "going native". In particular, if the argument was an anchored path, then "make" will not lose track of that anchor. * Compiler backends now "know" their respective C calling conventions instead of having to be told about it by ml-nlffigen. This relieves ml-nlffigen from one of its burdens. * The X86Backend has been split into X86CCallBackend and X86StdCallBackend. * Export C_DEBUG and C_Debug from $c/c.cm. * C type encoding in ml-nlffi-lib has been improved to model the conceptual subtyping relationship between incomplete pointers and their complete counterparts. For this, ('t, 'c) ptr has been changed to 'o ptr -- with the convention of instantiating 'o with ('t, 'c) obj whenever the pointer target type is complete. In the incomplete case, 'o will be instantiated with some "'c iobj" -- a type obtained by using one of the functors PointerToIncompleteType or PointerToCompleteType. Operations that work on both incomplete and complete pointer types are typed as taking an 'o ptr while operations that require the target to be known are typed as taking some ('t, 'c) obj ptr. voidptr is now a bit "more concrete", namely "type voidptr = void ptr'" where void is an eqtype without any values. This makes it possible to work on voidptr values using functions meant to operate on light incomplete pointers. * As a result of the above, signature POINTER_TO_INCOMPLETE_TYPE has been vastly simplified. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/02/19 10:48:00 EST Tag: blume-20020219-pqfix Description: Applied Chris Okasaki's bug fix for priority queues. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/02/15 17:05:00 Tag: Release_110_39 Description: Last-minute retagging is becoming a tradition... :-( This is the working release 110.39. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/02/15 16:00:00 EST Tag: Release_110_39-orig Description: Working release 110.39. New bootfiles. (Update: There was a small bug in the installer so it wouldn't work with all shells. So I retagged. -Matthias) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/02/15 14:17:00 EST Tag: blume-20020215-showbindings Description: Added EnvRef.listBoundSymbols and CM.State.showBindings. Especially the latter can be useful for exploring what bindings are available at the interactive prompt. (The first function returns only the list of symbols that are really bound, the second prints those but also the ones that CM's autoloading mechanism knows about.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/02/15 12:08:00 EST Tag: blume-20020215-iptrs Description: Two improvements to ml-nlffigen: 1. Write files only if they do not exist or if their current contents do not coincide with what's being written. (That is, avoid messing with the time stamps unless absolutely necessary.) 2. Implement a "repository" mechanism for generated files related to "incomplete pointer types". See the README file for details. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/02/14 11:50:00 EST Tag: blume-20020214-quote Description: Added a type 't t_' to tag.sml (in ml-nlffi-lib.cm). This is required because of the new and improved tag generation scheme. (Thanks to Allen Leung for pointing it out.) ---------------------------------------------------------------------- Name: Lal George Date: 2002/02/14 09:55:27 EST 2002 Tag: george-20020214-isabelle-bug Description: Fixed the MLRISC bug sent by Markus Wenzel regarding the compilation of Isabelle on the x86. From Allen: ----------- I've found the problem: in ra-core.sml, I use the counter "blocked" to keep track of the true number of elements in the freeze queue. When the counter goes to zero, I skip examining the queue. But I've messed up the bookkeeping in combine(): else (); case !ucol of PSEUDO => (if !cntv > 0 then (if !cntu > 0 then blocked := !blocked - 1 else (); ^^^^^^^^^^^^^^^^^^^^^^^ moveu := mergeMoveList(!movev, !moveu) ) else (); combine() is called to coalesce two nodes u and v. I think I was thinking that if the move counts of u and v are both greater than zero then after they are coalesced then one node is removed from the freeze queue. Apparently I was thinking that both u and v are of low degree, but that's clearly not necessarily true. 02/12/2002: Here's the patch. HOL now compiles. I don't know how this impact on performance (compile time or runtime). This bug caused the RA (especially on the x86) to go thru the potential spill phase when there are still nodes on the freeze queue. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/02/13 22:40:00 EST Tag: blume-20020213-fptr-rtti Description: Fixed a bug in ml-nlffigen that was introduced with one of the previous updates. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/02/13 16:41:00 EST Tag: blume-20020213-cmlpq Description: Added new priority queue export symbols (which have just been added to smlnj-lib.cm) to CML's version of smlnj-lib.cm. (Otherwise CML would not compile and the installer would choke.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/02/13 16:15:00 EST Tag: blume-20020213-various Description: 1. More tweaks to ml-nlffigen: - better internal datastructures (resulting in slight speedup) - "-match" option requires exact match - "localized" gensym counters (untagged structs/unions nested within other structs/unions or within typedefs get a fresh counter; their tag will be prefixed by a concatenation of their parents' tags) - bug fixes (related to calculation of transitive closure of types to be included in the output) 2. Minor Basis updates: - added implementations for List.collate and Option.app ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/02/11 15:55:00 EST Tag: blume-20020211-gensym Description: Added a "-gensym" option to command line of ml-nlffigen. This can be used to specify a "stem" -- a string that is inserted in all "gensym'd" names (ML structure names that correspond to unnamed C structs, unions, and enums), so that separate runs of ml-nlffigen do not clash. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/02/11 12:05:00 EST Tag: blume-20020211-gensml Description: A quick fix for a problem with GenSML (in the pgraph-util library): Make generation of toplevel "local" optional. (Strictly speaking, signature definitions within "local" are not legal SML.) Other than that: updates to INSTALL and cm/TODO. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/02/08 15:00:00 EST Tag: blume-20020208-uniquepid Description: 0. Version number has been bumped to 110.38.1. NEW BOOTFILES!!! 1. The installer (config/install.sh) has gotten smarter: - Configuration options are a bit easier to specify now (in config/targets). - Bug in recognizing .tar.bz2 files fixed. - Installer automatically resolves dependencies between configuration options (e.g., if you ask for eXene, you will also get cml -- regardless whether you asked for it or not). - Installer can run in "quieter mode" by setting the environment variable INSTALL_QUIETLY to "true". "Quieter" does not mean "completely silent", though. - Build HashCons library as part of smlnj-lib. 2. A new scheme for assigning persistent identifiers to compilation units (and, by extension, to types etc.) has been put into place. This fixes a long-standing bug where types and even dynamic values can get internally confused, thereby compromising type safety (abstraction) and dynamic correctness. See http://cm.bell-labs.com/cm/cs/who/blume/pid-confusion.tgz for an example of how things could go wrong until now. The downside of the new scheme is that pids are not quite as persistent as they used to be: CM will generate a fresh pid for every compilation unit that it thinks it sees for the first time. That means that if you compile starting from a clean, fresh source tree at two different times, you end up with different binaries. Cutoff recompilation, however, has not been compromised because CM keeps pid information in special caches between runs. ---------------------------------------------------------------------- Name: Lal George Date: 2002/02/07 15:34:13 EST 2002 Tag: Description: Compilers that generate assembly code may produce global labels whose value is resolved at link time. The various peephole optimization modules did not take this in account. TODO. The Labels.addrOf function should really return an option type so that clients are forced to deal with this issue, rather than an exception being raised. ---------------------------------------------------------------------- Name: Lal George Date: 2002/02/06 13:55:02 EST Tag: george-20020206-ra-breakup Description: 1. A bug fix from Allen. A typo causes extra fstp %st(0)'s to be generated at compensation edges, which might cause stack underflow traps at runtime. This occurs in fft where there are extraneous fstps right before the 'into' trap instruction (in this case they are harmless since none of the integers overflow.) 2. Pulled out various utility modules that were embedded in the modules of the register allocator. I need these modules for other purposes, but they are not complete enough to put into a library (just yet). ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/01/31 16:05:00 EST Tag: blume-20020131-sparc-ccalls Description: 1. C-calls on Sparc needlessly allocated a huge chunk (96 bytes) of extra stack space by mistake. Fixed. 2. Bug in logic of handling of command-line options in ml-nlffigen fixed. ---------------------------------------------------------------------- Name: Allen Leung Date: 2002/01/30 Tag: leunga-20020130-nowhere-bug-fix Description: MLRISC bug fixes: 1. Fixed a bindings computation bug in the 'nowhere' program generator tool. 2. MachineInt.fromString was negating its value. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/01/29 Tag: blume-20020129-INSTALL Description: - Added somewhat detailed installation instructions (file INSTALL). - Fixed curl-detection bug in config/install.sh. - It is now possible to select the URL getter using the URLGETTER environment variable: not set / "unknown" --> automatic detection (script tries wget, curl, and lynx) "wget" / "curl" / "lynx" --> use the specified program (script "knows" how to properly invoke them) other --> use $URLGETTER directly, it must take precisely two command-line arguments (source URL and destination file name) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/01/28 Tag: blume-20020128-sparc-ccalls Description: - Fixed problem with calculation of "used" registers in sparc-c-calls. - Make use of the allocParam argument in sparc-c-calls. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/01/28 Tag: blume-20020128-allocParam Description: John Reppy: Changes c-calls API to accept client-callback for allocating extra stack space. me: Corresponding changes to mlriscGen (using a dummy argument that does not change the current behavior). ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/01/28 12:00:00 Tag: Release_110_38 Description: This time for real!!! ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/01/28 10:56:00 EST Tag: blume-20020128-retraction Description: 0. Retracted earlier 110.38. (The Release_110_38 tag has been replaced with blume-Release_110_38-retracted.) 1. Fixed a problem with incorrect rounding modes in real64.sml. (Thanks to Andrew Mccreight .) 2. A bug in ml-nlffigen related to the handling of unnamed structs, unions, and enums fixed. The naming of corresponding ML identifiers should now be consistent again. ---------------------------------------------------------------------- Name: Allen Leung Date: 2002/01/27 Tag: leunga-20020127-nowhere Description: Added a target called nowhere in the configuration scripts. Enabling this will build the MLRISC 'nowhere' tool (for translating programs with where-clauses into legal SML code) during installation. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/01/25 21:27:00 EST Tag: blume-Release_110_38-retracted Description: Call it a (working) release! Version is 110.38. Bootfiles are ready. README will be added later. !!! NOTE: Re-tagged as blume-Release_110_38-retracted. Original tag (Release_110_38) removed. Reason: Last-minute bug fixes. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/01/25 Tag: blume-20020125-ffi Description: A large number of tweaks and improvements to ml-nlffi-lib and ml-nlffigen: - ML represenation types have been streamlined - getter and setter functions work with concrete values, not abstract ones where possible - ml-nlffigen command line more flexible (see README file there) - some bugs have been fixed (hopefully) ---------------------------------------------------------------------- Name: Lal George Date: 2002/01/24 Tag: george-20020124-risc-ra-interface Description: There is a dramatic simplification in the interface to the register allocator for RISC architectures as a result of making parallel copy instructions explicit. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/01/22 Tag: blume-20020122-x86-ccalls Description: Bug fix for c-calls on x86 (having to do with how char- and short-arguments are being handled). ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/01/21 Tag: blume-20020121-ff Description: Another day of fiddling with the FFI... 1. Bug fix/workaround: CKIT does not complain about negative array dimensions, so ml-nlffigen has to guard itself against this possibility. (Otherwise a negative dimension would send it into an infinite loop.) 2. Some of the abstract types (light objects, light pointers, most "base" types) in structure C are now eqtypes. 3. Added constructors and test functions for NULL function pointers. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/01/18 Tag: blume-20020118-ready-for-new-release Description: Made config/srcarchiveurl point to a new place. (Will provide boot files shortly.) Maybe we christen this to be 110.38? ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/01/18 Tag: blume-20020118-more-ffifiddle Description: Today's FFI fiddling: - Provided a structure CGetSet with "convenient" versions of C.Get.* and C.Set.* that use concrete (MLRep.*) arguments and results instead of abstract ones. - Provided word-style bit operations etc. for "int" representation types in MLRep.SBitops where ranges over Char, Int, Short, and Long. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/01/18 Tag: blume-20020118-use-x86-fp Description: Now that x86-fast-fp seems to be working, I turned it back on again by default. (Seems to work fine now, even with the FFI.) Other than that, I added some documentation about the FFI to src/ml-nlffigen/README and updated the FFI test examples in src/ml-nlffi-lib/Tests/*. ---------------------------------------------------------------------- Name: Allen Leung Date: 2002/01/17 Tag: leunga-20020117-x86-fast-fp-call Description: 1. Fixed a problem with handling return fp values when x86's fast fp mode is turned on. 2. Minor pretty printing fix for cellset. Print %st(0) as %st(0) instead of %f32. 3. Added a constructor INT32lit to the ast of MLRISC tools. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/01/16 Tag: blume-20020116-ffifiddle Description: More fiddling with the FFI interface: - Make constness 'c instead of rw wherever possible. This eliminates the need for certain explicit coercions. (However, due to ML's value polymorphism, there will still be many cases where explicit coercions are necessary. Phantom types are not the whole answer to modeling a subtyping relationship in ML.) - ro/rw coersions for pointers added. (Avoids the detour through */&.) - "printf" test example added to src/ml-nlffi-lib/Tests. (Demonstrates clumsy workaround for varargs problem.) ---------------------------------------------------------------------- Name: Lal George Date: 2002/01/15 Tag: Description: 1. Since COPY instructions are no longer native to the architecture, a generic functor can be used to implement the expandCopies function. 2. Allowed EXPORT and IMPORT pseudo-op declarations to appear inside a TEXT segment. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/01/15 Tag: blume-20020115-ffiupdates Description: 1. Fix for bug resulting in single-precision float values being returned incorrectly from FFI calls. 2. Small modifications to C FFI API: - memory-allocation routines return straight objects (no options) and raise an exception in out-of-memory situations - unsafe extensions to cast between function pointers and pointers from/to ints - added structure C_Debug as an alternative to structure C where pointer-dereferencing (|*| and |*!) always check for null-pointers - added open_lib' to DynLinkage; open_lib' works like open_lib but also takes a (possibly empty) list of existing library handles that the current library depends on ---------------------------------------------------------------------- Name: Matthias Blume Date: 2002/01/10 Tag: blume-20020110-newffigen Description: 1. Updates to portable graph code. 2. Major update to ml-nlffigen and ml-nlffi-lib. Things are much more scalable now so that even huge interfaces such as the one for GTK compile in finite time and space. :-) See src/ml-nlffigen/README for details on what's new. ---------------------------------------------------------------------- Name: Lal George Date: 2001/01/09 14:31:35 EST 2002 Tag: george-20011206-rm-native-copy Description: Removed the native COPY and FCOPY instructions from all the architectures and replaced it with the explicit COPY instruction from the previous commit. It is now possible to simplify many of the optimizations modules that manipulate copies. This has not been done in this change. ---------------------------------------------------------------------- Name: Lal George Date: 2001/12/06 16:50:13 EST 2001 Tag: george-20011206-mlrisc-instruction Description: Changed the representation of instructions from being fully abstract to being partially concrete. That is to say: from type instruction to type instr (* machine instruction *) datatype instruction = LIVE of {regs: C.cellset, spilled: C.cellset} | KILL of {regs: C.cellset, spilled: C.cellset} | COPYXXX of {k: CB.cellkind, dst: CB.cell list, src: CB.cell list} | ANNOTATION of {i: instruction, a: Annotations.annotation} | INSTR of instr This makes the handling of certain special instructions that appear on all architectures easier and uniform. LIVE and KILL say that a list of registers are live or killed at the program point where they appear. No spill code is generated when an element of the 'regs' field is spilled, but the register is moved to the 'spilled' (which is present, more for debugging than anything else). LIVE replaces the (now deprecated) DEFFREG instruction on the alpha. We used to generate: DEFFREG f1 f1 := f2 + f3 trapb but now generate: f1 := f2 + f3 trapb LIVE {regs=[f1,f2,f3], spilled=[]} Furthermore, the DEFFREG (hack) required that all floating point instruction use all registers mentioned in the instruction. Therefore f1 := f2 + f3, defines f1 and uses [f1,f2,f3]! This hack is no longer required resulting in a cleaner alpha implementation. (Hopefully, intel will not get rid of this architecture). COPYXXX is intended to replace the parallel COPY and FCOPY available on all the architectures. This will result in further simplification of the register allocator that must be aware of them for coalescing purposes, and will also simplify certain aspects of the machine description that provides callbacks related to parallel copies. ANNOTATION should be obvious, and now INSTR represents the honest to God machine instruction set! The /instructions/Instr.sml files define certain utility functions for making porting easier -- essentially converting upper case to lower case. All machine instructions (of type instr) are in upper case, and the lower case form generates an MLRISC instruction. For example on the alpha we have: datatype instr = LDA of {r:cell, b:cell, d:operand} | ... val lda : {r:cell, b:cell, d:operand} -> instruction ... where lda is just (INSTR o LDA), etc. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/11/22 21:40:00 EST Tag: Release_110_37 Description: Release 110.37. This time for real. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/11/21 16:35:00 EST Tag: blume-20011121-foot-in-mouth Description: Removed the "Release_110_37" tag because of a serious bug. This will be re-tagged once the bug is fixed. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/11/21 16:14:00 EST Tag: blume-20011121-forgottenfile Description: Forgot to add a file. (Just a .tex-file -- part of the CM manual source.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/11/21 16:10:00 EST Tag: blume-20011121-invalid_110_37 Description: Note: I removed the original tag "Release_110_37" from this commit because we found a serious bug in all non-x86 backends. - Matthias 1. Modifications to the SML/NJ code generator and to the runtime system so that code object name strings are directly inserted into code objects at code generation time. The only business the runtime system has with this is now to read the name strings on occasions. (The encoding of the name string has also changed somewhat.) 2. CM now implements a simple "set calculus" for specifying export lists. In particular, it is now possible to refer to the export lists of other libraries/groups/sources and form unions as well as differences. See the latest CM manual for details. 3. An separate notion of "proxy" libraries has again be eliminated from CM's model. (Proxy libraries are now simply a special case of using the export list calculus.) 4. Some of the existing libraries now take advantage of the new set calculus. (Notice that not all libraries have been converted because some of the existing .cm-files are supposed to be backward compatible with 110.0.x.) 5. Some cleanup in stand-alone programs. (Don't use "exnMessage" -- use "General.exnMessage"! The former relies on a certain hook to be initialized, and that often does not happen in the stand-alone case.) ---------------------------------------------------------------------- Name: Lal George Date: 2001/11/21 13:56:18 EST Tag: george-2001121-pseudo-ops Description: Implemented a complete redesign of MLRISC pseudo-ops. Now there ought to never be any question of incompatabilities with pseudo-op syntax expected by host assemblers. For now, only modules supporting GAS syntax are implemented but more should follow, such as MASM, and vendor assembler syntax, e.g. IBM as, Sun as, etc. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/11/14 11:52:00 EST Tag: blume-20011114-srcname Description: 1. Routed the name of the current source file to mlriscgen where it should be directly emitted into the code object. (This last part is yet to be done.) 2. Some cleanup of the pgraph code to make it match the proposal that I put out the other day. (The proposal notwithstanding, things are still in flux here.) ---------------------------------------------------------------------- Name: Lal George Date: 2001/11/14 09:44:04 EST Tag: Description: Fix for a backpatching bug reported by Allen. Because the boundary between short and long span-dependent instructions is +/- 128, there are an astounding number of span-dependent instructions whose size is over estimated. Allen came up with the idea of letting the size of span dependent instructions be non-monotonic, for a maxIter number of times, after which the size must be monotonically increasing. This table shows the number of span-dependent instructions whose size was over-estimated as a function of maxIter, for the file Parse/parse/ml.grm.sml: maxIter # of instructions: 10 687 20 438 30 198 40 0 In compiling the compiler, there is no significant difference in compilation speed between maxIter=10 and maxIter=40. Actually, my measurements showed that maxIter=40 was a tad faster than maxIter=10! Also 96% of the files in the compiler reach a fix point within 13 iterations, so fixing maxIter at 40, while high, is okay. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/10/31 15:25:00 EST Tag: blume-20011031-pgraph Description: CKIT: * Changed the "Function" constructor of type Ast.ctype to carry optional argument identifiers. * Changed the return type of TypeUtil.getFunction accordingly. * Type equality ignores the argument names. * TypeUtil.composite tries to preserve argument names but gives up quickly if there is a mismatch. installation script: * attempts to use "curl" if available (unless "wget" is available as well) CM: * has an experimental implementation of "portable graphs" which I will soon propose as an implementation-independent library format * there are also new libraries $/pgraph.cm and $/pgraph-util.cm NLFFI-LIB: * some cleanup (all cosmetic) NLFFIGEN: * temporarily disabled the mechanism that suppresses ML output for C definitions whose identifiers start with an underscore character * generate val bindings for enum constants * user can request that only one style (light or heavy) is being used; default is to use both (command-line arguments: -heavy and -light) * fixed bug in handling of function types involving incomplete pointers * generate ML entry points that take record arguments (i.e., using named arguments) for C functions that have a prototype with named arguments (see changes to CKIT) ---------------------------------------------------------------------- Name: Allen Leung Date: 2001/10/27 20:34:00 EDT Tag: leunga-20011027-x86-fast-fp-call Description: Fixed the bug described in blume-20010920-slowfp. The fix involves 1. generating FCOPYs in FSTP in ia32-svid 2. marking a CALL with the appropriate annotation ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/10/16 11:32:00 EDT Tag: blume-20011016-netbsd Description: Underscore patch from Chris Richards (fixing problem with compiling runtime system under recent NetBSD). ---------------------------------------------------------------------- Name: Allen Leung Date: 2001/10/12 17:18:32 EDT 2001 Tag: leung-20011012-x86-printflowgraph Description: X86RA now uses a valid (instead of dummy) PrintFlowgraph module. ---------------------------------------------------------------------- Name: Lal George Date: 2001/10/11 23:51:34 EDT Tag: george-20011011-too-many-instrs Description: The representation of a program point never expected to see more than 65536 instructions in a basic block! ---------------------------------------------------------------------- Name: Lal George Date: 2001/10/09 09:41:37 EDT Tag: george-20011008-mlrisc-labels Description: Changed the machine description files to support printing of local and global labels in assembly code, based on host assembler conventions. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/09/25 15:25:00 EDT Tag: blume-20010925-exninfo Description: I provided a non-hook implementation of exnName (at the toplevel) and made the "dummy" implementation of exnMessage (at the toplevel) more useful: if nothing gets "hooked in", then at least you are going to see the exception name and a message indicating why you don't see more. [For the time being, programs that need exnMessage and want to use ml-build should either use General.exnMessage (strongly recommended) or refer to structure General at some other point so that CM sees a static dependency.] [Similar remarks go for "print" and "use": If you want to use their functionality in stand-alone programs generated by ml-build, then use TextIO.output and Backend.Interact.useFile (from $smlnj/compiler.cm).] ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/09/20 17:28:00 EDT Tag: blume-20010920-slowfp Description: Allen says that x86-fast-fp is not safe yet, so I turned it off again... ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/09/20 17:20:00 EDT Tag: blume-20010920-canonicalpaths Description: 0. Updated the BOOT file (something that I forgot to do earlier). 1. Small internal change to CM so that it avoids "/../" in filenames as much as possible (but only where it is safe). 2. Changed config/_run-sml (resulting in a changed bin/.run-sml) so that arguments that contain delimiters are passed through correctly. This change also means that all "special" arguments of the form @SMLxxx... must come first. 3. Changed install script to put relative anchor names for tool commands into pathconfig. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/09/18 15:35:00 EDT Tag: blume-20010918-readme11036 Description: Added README files. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/09/18 11:45:00 EDT Tag: Release_110_36 (retag) Description: Fixed mistake in config/preloads. Retagged as 110.36. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/09/18 09:40:00 EDT Tag: Release_110_36_orig (tag changed) Description: New version (110.36). New bootfiles. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/09/14 16:15:00 EDT Tag: blume-20010914-x86fastfp Description: John committed some changes that Allen made, in particular a (hopefully) correctly working version of the x86-fp module. I changed the default setting of the Control.MLRISC.getFlag "x86-fast-fp" flag to "true". Everything seems to compile to a fixpoint ok, and "mandelbrot" speeds up by about 15%. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/09/13 11:20:00 EDT Tag: blume-20010913-minimal Description: 1. Stefan Monnier's patch to fix a miscompilation problem that was brought to light by John Reppy's work on Moby. 2. Implemented a minimal "structure Compiler" that contains just "version" and "architecture". The minimal version will be available when the full version is not. This is for backward- compatibility with code that wants to test Compiler.version. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/08/28 14:03:00 EDT Tag: blume-20010828-ml-lex Description: Fix for bug 1581, received from Neophytos Michael. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/08/27 11:20:00 EDT Tag: blume-20010827-readme11035 Description: Fleshed out the README file for 110.35. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/08/24 17:10:00 EDT Tag: Release_110_35 Description: New version number (110.35). New bootfiles. ---------------------------------------------------------------------- Name: Lal George Date: 2001/08/24 13:47:18 EDT 2001 Tag: george-20010824-MLRISC-graphs Description: removed clusters from MLRISC completely and replaced with graphs. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/08/23 17:50:00 EDT Tag: blume-20010823-toplevel Description: - some reorganization of the code that implements various kinds of environments in the compiler (static, dynamic, symbolic, combined) - re-implemented the EnvRef module so that evalStream works properly (if the stream contains references to "use", "CM.make", etc.) - cleaned up evalloop.sml and interact.sml (but they need more cleaning) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/08/20 15:50 EDT Tag: blume20010820-slipup Description: I forgot to commit a few files. Here they are... ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/08/20 15:35:00 EDT Tag: blume-20010820-debugprof Description: !!!! NEW BOOTFILES !!!! This is another round of reorganizing the compiler sources. This time the main goal was to factor out all the "instrumentation" passes (for profiling and backtracing) into their own library. The difficulty was to do it in such a way that it does not depend on elaborate.cm but only on elabdata.cm. Therefore there have been further changes to both elaborate.cm and elabdata.cm -- more "generic" things have been moved from the former to the latter. As a result, I was forced to split the assignment of numbers indicating "primtyc"s into two portions: SML-generic and SML/NJ-specific. Since it would have been awkward to maintain, I bit the bullet and actually _changed_ the mapping between these numbers and primtycs. The bottom line of this is that you need a new set of bin- and bootfiles. I have built new bootfiles for all architectures, so doing a fresh checkout and config/install.sh should be all you need. The newly created library's name is $smlnj/viscomp/debugprof.cm and its sources live under src/compiler/DebugProf ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/08/15 17:15:00 EDT Tag: blume-20010815-compreorg Description: This is a first cut at reorganizing the CM libraries that make up the core of the compiler. The idea is to separate out pieces that could be used independently by tools, e.g., the parser, the typechecker, etc. The current status is a step in this direction, but it is not quite satisfactory yet. Expect more changes in the future. Here is the current (new) organization... What used to be $smlnj/viscomp/core.cm is now divided into six CM libraries: $smlnj/viscomp/basics.cm /parser.cm /elabdata.cm /elaborate.cm /execute.cm /core.cm The CM files for these libraries live under src/system/smlnj/viscomp. All these libraries are proxy libraries that contain precisely one CM library component. Here are the locations of the components (all within the src/compiler tree): Basics/basics.cm Parse/parser.cm ElabData/elabdata.cm Elaborator/elaborate.cm Execution/execute.cm core.cm [This organization is the same that has been used already for a while for the architecture-specific parts of the visible compiler and for the old version of core.cm.] As you will notice, many source files have been moved from their respective original locations to a new home in one of the above subtrees. The division of labor between the new libraries is the following: basics.cm: - Simple, basic definitions that pertain to many (or all) of the other libraries. parser.cm: - The SML parser, producing output of type Ast.dec. - The type family for Ast is also defined and exported here. elabdata.cm: - The datatypes that describe input and output of the elaborator. This includes types, absyn, and static environments. elaborator.cm: - The SML/NJ type checker and elaborator. This maps an Ast.dec (with a given static environment) to an Absyn.dec (with a new static environment). - This libraries implements certain modules that used to be structures as functors (to remove dependencies on FLINT). execute.cm: - Everything having to do with executing binary code objects. - Dynamic environments. core.cm: - SML/NJ-specific instantiations of the elaborator and MLRISC. - Top-level modules. - FLINT (this should eventually become its own library) Notes: I am not 100% happy with the way I separated the elaborator (and its data structures) from FLINT. Two instances of the same problem: 1. Data structures contain certain fields that carry FLINT-specific information. I hacked around this using exn and the property list module from smlnj-lib. But the fact that there are middle-end specific fields around at all is a bit annoying. 2. The elaborator calculates certain FLINT-related information. I tried to make this as abstract as I could using functorization, but, again, the fact that the elaborator has to perform calculations on behalf of the middle-end at all is not nice. 3. Having to used exn and property lists is unfortunate because it weakens type checking. The other alternative (parameterizing nearly *everything*) is not appealing, though. I removed the "rebinding =" warning hack because due to the new organization it was awkward to maintain it. As a result, the compiler now issues some of these warnings when compiling init.cmi during bootstrap compilation. On the plus side, you also get a warning when you do, for example: val op = = Int32.+ which was not the case up to now. I placed "assign" and "deref" into the _Core structure so that the code that deals with the "lazy" keyword can find them there. This removes the need for having access to the primitive environment during elaboration. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/08/13 Tag: blume-20010813-closures Description: This fix was sent to us by Zhong Shao. It is supposed to improve the performance of certain loops by avoiding needless closure allocation. ---------------------------------------------------------------------- Name: Lal George Date: 2001/07/31 10:03:23 EDT 2001 Tag: george-20010731-x86-fmalloc Description: Fixed bug in x86 calls There was a bug where call instructions would mysteriously vanish. The call instruction had to be one that returned a floating point value. ---------------------------------------------------------------------- Name: Lal George Date: 2001/07/19 16:36:29 EDT 2001 Tag: george-20010719-simple-cells Description: I have dramatically simplified the interface for CELLS in MLRISC. In summary, the cells interface is broken up into three parts: 1. CellsBasis : CELLS_BASIS CellsBasis is a top level structure and common for all architectures. it contains the definitions of basic datatypes and utility functions over these types. 2. functor Cells() : CELLS Cells generates an interface for CELLS that incorporates the specific resources on the target architecture, such as the presence of special register classes, their number and size, and various useful substructures. 3. CELLS e.g. SparcCells: SPARCCELLS CELLS usually contains additional bindings for special registers on the architecture, such as: val r0 : cell (* register zero *) val y : cell (* Y register *) val psr : cell (* processor status register *) ... The structure returned by applying the Cells functor is opened in this interface. The main implication of all this is that the datatypes for cells is split between CellsBasis and CELLS -- a fairly simple change for user code. In the old scheme the CELLS interface had a definitional binding of the form: signature CELLS = sig structure CellsBasis = CellsBasis ... end With all the sharing constraints that goes on in MLRISC, this old design quickly leads to errors such as: "structure definition spec inside of sharing ... " and appears to require an unacceptable amount of sharing and where constraint hackery. I think this error message (the interaction of definitional specs and sharing) requires more explanation on our web page. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/07/19 15:00:00 EDT Tag: blume-20010719-libreorg Description: This update puts together a fairly extensive but straightforward change to the way the libraries that implement the interactive system are organized: The biggest change is the elimination of structure Compiler. As a replacement for this structure, there is now a CM library (known as $smlnj/compiler.cm or $smlnj/compiler/current.cm) that exports all the substructures of the original structure Compiler directly. So instead of saying Compiler.Foo.bar one now simply says Foo.bar. (The CM libraries actually export a collection of structures that is richer than the collection of substructures of structure Compiler.) To make the transition smooth, there is a separate library called $smlnj/compiler/compiler.cm which puts together and exports the original structure Compiler (or at least something very close to it). There are five members of the original structure Compiler that are not exported directly but which instead became members of a new structure Backend (described by signature BACKEND). These are: structure Profile (: PROFILE), structure Compile (: COMPILE), structure Interact (: INTERACT), structure Machine (: MACHINE), and val architecture (: string). Structure Compiler.Version has become structure CompilerVersion. Cross-compilers for alpha32, hppa, ppc, sparc, and x86 are provided by $smlnj/compiler/.cm where is alpha32, hppa, ppc, sparc, or x86, respectively. Each of these exports the same frontend structures that $smlnj/compiler.cm exports. But they do not have a structure Backend and instead export some structure Backend where is Alpha32, Hppa, PPC, Sparc, or X86, respectively. Library $smlnj/compiler/all.cm exports the union of the exports of $smlnj/compiler/.cm There are no structures Compiler anymore, use $smlnj/compiler/.cm instead. Library host-compiler-0.cm is gone. Instead, the internal library that instantiates CM is now called cm0.cm. Selection of the host compiler (backend) is no longer done here but. (Responsibility for it now lies with $smlnj/compiler/current.cm. This seems to be more logical.) Many individual files have been moved or renamed. Some files have been split into multiple files, and some "dead" files have been deleted. Aside from these changes to library organization, there are also changes to the way the code itself is organized: Structure Binfile has been re-implemented in such a way that it no longer needs any knowledge of the compiler. It exclusively deals with the details of binfile layout. It no longer invokes the compiler (for the purpose of creating new prospective binfile content), and it no longer has any knowledge of how to interpret pickles. Structure Compile (: COMPILE) has been stripped down to the bare essentials of compilation. It no longer deals with linking/execution. The interface has been cleaned up considerably. Utility routines for dealing with linking and execution have been moved into their own substructures. (The ultimate goal of these changes is to provide a light-weight binfile loader/linker (at least for, e.g., stable libraries) that does not require CM or the compiler to be present.) CM documentation has been updated to reflect the changes to library organization. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/07/10 17:30:00 EDT Tag: Release_110_34 Description: Minor tweak to 110.34 (re-tagged): - README.html file added to CVS repository - runtime compiles properly under FreeBSD 3.X and 4.X ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/07/10 17:30:00 EDT Tag: Release_110_34 Description: New version number (110.34). New bootfiles. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/07/09 16:00:00 EDT Tag: blume-20010709-more-varargs Description: I changed the handling of varargs in ml-nlffigen again: The ellipsis ... will now simply be ignored (with an accompanying warning). The immediate effect is that you can actually call a varargs function from ML -- but you can't actually supply any arguments beyond the ones specified explicitly. (For example, you can call printf with its format string, but you cannot pass additional arguments.) This behavior is only marginally more useful than the one before, but it has the advantage that a function or, more importantly, a function type never gets dropped on the floor, thus avoiding follow-up problems with other types that refer to the offending one. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/07/09 11:25:00 EDT Tag: blume-20010709-varargs Description: 1. ckit-lib.cm now exports structure Error 2. ml-nlffigen reports occurences of "..." (i.e., varargs function types) with a warning accompanied by a source location. Moreover, it merely skips the offending function or type and proceeds with the rest of its work.u As a result, one can safely feed C code containing "..." to ml-nlffigen. 3. There are some internal improvements to CM, providing slightly more general string substitutions in the tools subsystem. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/06/27 15:10:00 EDT Tag: blume-20010627-concur Description: Fixed a small bug in CM's handling of parallel compilation. (You could observe the bug by Control-C-interrupting an ordinary CMB.make or CM.stabilize and then attaching some compile servers. The result was that all of a sudden the previously interrupted compilation would continue on its own. This was because of an over-optimization: CM did not bother to clean out certain queues when no servers were attached "anyway", resulting in the contents of these queues to grab control when new servers did get attached.) There is also another minor update to the CM manual. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/06/26 16:15:00 EDT Tag: blume-20010626-cmdoc Description: Minor typo fixed in CM manual (syntax diagram for libraries). ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/06/25 22:55:00 EDT Tag: blume-20010625-x86pc Description: Fixed a nasty bug in the X86 assembly code that caused signal handlers to fail (crash) randomly. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/06/25 12:05:00 EDT Tag: blume-20010625-nlffigen Description: This update fixes a number of minor bugs in ml-nlffigen as reported by Nick Carter . 1. Silly but ok typedefs of the form "typedef void myvoid;" are now accepted. 2. Default names for generated files are now derived from the name of the C file *without its directory*. In particular, this causes generated files to be placed locally even if the C file is in some system directory. 3. Default names for generated signatures and structures are also derived from the C file name without its directory. This avoids silly things like "structure GL/GL". (Other silly names are still possible because ml-nlffigen does not do a thorough check of whether generated names are legal ML identifiers. When in doubt, use command line arguments to force particular names.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/06/21 12:25:00 EDT Tag: blume-20010621-eXene Description: eXene now compiles and (sort of) works again. The library name (for version > 110.33) is $/eXene.cm. I also added an new example in src/eXene/examples/nbody. See the README file there for details. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/06/20 16:40:00 EDT Tag: blume-20010620-cml Description: CML now compiles and works again. Libraries (for version > 110.33): $cml/cml.cm Main CML library. $cml/basis.cm CML's version of $/basis.cm. $cml/cml-internal.cm Internal helper library. $cml/core-cml.cm Internal helper library. $cml-lib/trace-cml.cm Tracing facility. $cml-lib/smlnj-lib.cm CML's version of $/smlnj-lib.cm The installer (config/install.sh) has been taught how to properly install this stuff. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/06/19 17:55:00 EDT Tag: blume-20010619-instantiate Description: This un-breaks the fix for bug 1432. (The bug was originally fixed in 110.9 but I broke it again some time after that.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/06/19 17:25:00 EDT Tag: blume-20010619-signals Description: This should (hopefully) fix the long-standing signal handling bug. (The runtime system was constructing a continuation record with an incorrect descriptor which would cause the GC to drop data on the floor...) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/06/15 15:05:00 EDT Tag: blume-20010615-moresparc Description: Here is a short late-hour update related to Sparc c-calls: -- made handling of double-word arguments a bit smarter -- instruction selection phase tries to collapse certain clumsily constructed ML-Trees; typical example: ADD(ty,ADD(_,e,LI d1),LI d2) -> ADD(ty,e,LI(d1+d2)) This currently has no further impact on SML/NJ since mlriscGen does not seem to generate such patterns in the first place, and c-calls (which did generate them in the beginning) has meanwhile been fixed so as to avoid them as well. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/06/15 15:05:00 EDT Tag: blume-20010615-sparc Description: The purpose of this update is to provide an implementation of NLFFI on Sparc machines. Here are the changes in detail: * src/MLRISC/sparc/c-calls/sparc-c-calls.sml is a new file containing the Sparc implementation of the c-calls API. * The Sparc backend of SML/NJ has been modified to uniformely use %fp for accessing the ML frame. Thus, we have a real frame pointer and can freely modify %sp without need for an omit-frame-ptr phase. The vfp logic in src/compiler/CodeGen/* has been changed to accomodate this case. * ml-nlffigen has been taught to produce code for different architectures and calling conventions. * In a way similar to what was done in the x86 case, the Sparc backend uses its own specific extension to mltree. (For example, it needs to be able to generate UNIMP instructions which are part of the calling convention.) * ml-nlffi-lib was reorganized to make it more modular (in particular, to make it easier to plug in new machine- and os-dependent parts). There are some other fairly unrelated bug fixes and cleanups as well: * I further hacked the .cm files for MLRISC tools (like MDLGen) so that they properly share their libraries with existing SML/NJ libraries. * I fixed a minor cosmetic bug in CM, supressing certain spurious follow-up error messages. * Updates to CM/CMB documentation. TODO items: * MLRISC should use a different register as its asmTemp on the Sparc. (The current %o2 is a really bad choice because it is part of the calling conventions, so things might interfere in unexpected ways.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/06/07 Tag: blume-20010607-calls Description: A number of internal changes related to C calls and calling conventions: 1. ML-Tree CALL statements now carry a "pops" field. It indicates the number of bytes popped implicitly (by the callee). In most cases this field is 0 but on x86/win32 it is some non-zero value. This is information provided for the benefit of the "omit-frameptr" pass. 2. The CALL instruction on the x86 carries a similar "pops" field. The instruction selection phase copies its value from the ML-Tree CALL statement. 3. On all other architectures, the instruction selection phase checks whether "pops=0" and complains if not. 4. The c-calls implementation for x86 now accepts two calling conventions: "ccall" and "stdcall". When "ccall" is selected, the caller cleans up after the call and pops is set to 0. For "stdcall", the caller does nothing, leaving the cleanup to the callee; pops is set to the number of bytes that were pushed onto the stack. 5. The cproto decoder (compiler/Semant/types/cproto.sml) now can distinguish between "ccall" and "stdcall". 6. The UNIMP instruction has been added to the supported Sparc instruction set. (This is needed for implementing the official C calling convention on this architecture.) 7. I fixed some of the .cm files under src/MLRISC/Tools to make them work with the latest CM. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/06/05 15:10:00 EDT Tag: blume-20010605-cm-index Description: 0. The "lambdasplit" parameter for class "sml" in CM has been documented. 1. CM can now generate "index files". These are human-readable files that list on a per-.cm-file basis each toplevel symbol defined or imported. The location of the index file for

/.cm is

/CM/INDEX/.cm. To enable index-file generation, set CM.Control.generate_index to true or export an environment-symbol: export CM_GENERATE_INDEX=true. The CM manual has been updated accordingly. 2. I made some slight modifications to the c-calls API in MLRISC. a) There is now a callback to support saving/restoring of dedicated but caller-save registers around the actual call instruction. b) One can optionally specify a comment-annotation for the call instruction. 3. SML/NJ (mlriscGen.sml) uses this new API for the rawccall primop. (For example, the comment annotation shows the C prototype of the function being called.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/06/01 13:30:00 EDT Tag: blume-20010601-nlffi-cleanup Description: This is mostly a cleanup of MLFFI stuff: - some signature files have been put into a more exposed place - the ugly 'f type parameter is gone (simplifies types tremendously!) - ml-nlffigen changed accordingly - tutorial updated Other changes: - author's affiliation in CM manual(s) updated - some more recognized keywords added to Allen's sml.sty ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/05/25 15:30:00 EDT Tag: blume-20010525-iptr Description: - put the official 110.33-README (as it appears on the ftp server) under CVS - fixed a small bug related to incomplete pointer types in ml-nlffigen - small cosmetic change to the ml-nlffi-lib's "arr" type constructor (it does not need the 'f type parameter) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/05/23 14:30:00 EDT Tag: Release_110_33 Description: New version number (110.33). New bootfiles. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/05/22 18:06:00 EDT Tag: blume-20010522-targets Description: Made install.sh use file config/targets.customized if it exists, falling back to config/targets if it doesn't. This way one can have a customized version of the targets file without touching the "real thing", thus eliminating the constant fear of accidentally checking something bogus back into the CVS repository... (File config/targets.customized must not be added to the repository!) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/05/22 16:30:00 EDT Tag: blume-20010522-minitut Description: 1. Bug fix in ml-nlffigen; now (hopefully) correctly handling struct returns. 2. Added src/ml-nlffi-lib/Doc/mini-tutorial.txt. This is some very incomplete, preliminary documentation for NLFFI. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/05/14 11:30:00 EDT Tag: blume-20010514-script Description: Some bugs in install script fixed. In addition to that I also made a slight change to the NLFFI API: Functors generated by ml-nlffigen now take the dynamic library as a straight functor argument, not as a suspended one. (The original functor code used to force the suspension right away anyway, so there was nothing gained by this complication of the interface.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/05/11 14:35:00 EDT Tag: blume-20010511-ml-nlffi Description: I finally took the plunge and added my new FFI code to the main repository. For x86-linux it is now ready for prime-time. There are two new subdirectories of "src": - ml-nlffi-lib: The utility library for programs using the FFI interface. Here is the implementation of $/c.cm and its associated low-level partners $/c-int.cm and $/memory.cm. - ml-nlffigen: A stand-alone program for generating ML glue code from C source code. Building ml-nlffigen requires $/ckit-lib.cm. The config/install.sh script has been updates to do the Right Thing (hopefully). Notice that the source tree for the C-Kit will not be put under "src" but directly under the installation root directory. (This is the structure that currently exists on the CVS server when you check out module "sml".) Fortunately, config/install.sh knows about this oddity. Bugs: No documentation yet. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/05/09 16:35:00 EDT Tag: blume-20010509-cpscontract Description: Fixed a bug in the accounting code in cpsopt/contract.sml. (The wrapper/unwrapper elimination did not decrement usage counts and some dead variables got overlooked by the dead-up logic.) ---------------------------------------------------------------------- Name: Lal George Date: 2001/05/08 17:26:09 EDT Tag: george-20010508-omit-frameptr Description: Changes to implement the omit-frame-pointer optimization to support raw C calls. For now, there is only support on the Intel x86, but other architectures will follow as more experience is gained with this. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/05/07 14:40:00 EDT Tag: blume-20010507-proxies Description: I made into "proxy libraries" all libraries that qualify for such a change. (A qualifying library is a library that has another library or groups as its sole member and repeats that member's export list verbatim. A proxy library avoids this repetition by omitting its export list, effectively inheriting the list that its (only) member exports. See the CM manual for more explanation.) The main effect is that explicit export lists for these libraries do not have to be kepts in sync, making maintenance a bit easier. I also added copyright notices to many .cm-files. Last but not least, I made a new set of bootfiles. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/05/04 17:00:00 EDT Tag: blume-20010504-cm-lsplit Description: 0. John merged pending changes to $/smlnj-lib.cm 1. Allen's previous change accidentally backed out of one of Lal's earlier changes. I undid this mistake (re-introducing Lal's change). 2. I used the new topOrder' function from graph-scc.sml (from $/smlnj-lib.cm) within the compiler where applicable. There is some code simplification because of that. 3. The "split" phase (in FLINT) is now part of the default list of phases. Compiler.Control.LambdaSplitting.* can be used to globally control the lambda-splitting (cross-module-inlining) engine. In addition to that, it can now also be controlled on a per-source basis: CM has been taught a new tool parameter applicable to ML source files. - To turn lambda-splitting off completely: local open Compiler.Control.LambdaSplitting in val _ = set Off end - To make "no lambda-splitting" the global default (but allow per-source overriding); this is the initial setting: local open Compiler.Control.LambdaSplitting in val _ = set (Default NONE) end - To make "lambda-splitting with aggressiveness a" the global default (and allow per-source overriding): local open Compiler.Control.LambdaSplitting in val _ = set (Default (SOME a)) end - To turn lambda-splitting off for a given ML souce file (say: a.sml) write (in the respective .cm-file): a.sml (lambdasplitting:off) - To turn lambda-splitting for a.sml on with minimal aggressiveness: a.sml (lambdasplitting:on) - To turn lambda-splitting for a.sml on with aggressiveness (where is a decimal non-negative integer): a.sml (lambdasplitting:) - To turn lambda-splitting for a.sml on with maximal aggressiveness: a.sml (lambdasplitting:infinity) - To use the global default for a.sml: a.sml (lambdasplitting:default) or simply a.sml ---------------------------------------------------------------------- Name: Allen Leung Date: 2001/05/04 01:57:00 EDT Tag: leunga-20010504-sync Description: MLRISC features. 1. Fix to CMPXCHG instructions. 2. Changed RA interface to allow annotations in callbacks. 3. Added a new method to the stream interface to allow annotations updates. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/05/01 11:45:00 EDT Tag: blume-20010501-pcedittmp Description: Changed install.sh to use the current working directory instead of /usr/tmp for a temporary file (pcedittmp). The previous choice of /usr/tmp caused trouble with MacOS X because of file premission problems. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/04/20 11:10:00 EDT Tag: blume-20010420-inMLflag Description: - added vp_limitPtrMask to vproc-state.h (for use by the raw-C-calls mechanism to implement proper interrupt handling) - made the ML compiler aware of various data-structure offsets so it can generate code for accessing the vp_inML flag and vp_limitPtrMask - tweaked mlriscGen.sml to have it emit interrupt-handling code for raw C-calls ---------------------------------------------------------------------- Name: Lal George Date: 2001/04/20 09:15:28 EDT Tag: george-20010420-macosX Description: - Changes to port to Mac OS X; Darwin. - In the process I found that sqrt was broken on the PPC, because the fsqrt instruction is not implemented. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/04/18 12:45:00 EDT Tag: blume-20010418-ccalls Description: - fixed two off-by-4 errors in the x86-specific c-calls implementation (this bug prevented structure arguments containing pointers from being passed correctly) - changed the raw-C-call code in mlriscGen.sml in such a way that structure arguments are represented as a pointer to the beginning of the structure (instead of having a series of synthesized arguments, one for each structure member) - made makeml script's verbosity level configurable via environment variable (MAKEML_VERBOSITY) - eliminated placeholder implementations for f32l, w16s, i16s, and f32s in rawmem-x86.sml; we are now using the real thing ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/03/22 16:25:00 EST Tag: blume-20010322-bootfiles Description: Created a new set of bootfiles (for your automatic installation convenience). ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/03/22 15:10:00 EST Tag: blume-20010322-rawmem-parcm Description: 1. All "raw memory access" primitives for the new FFI are implemented now (at least on the x86). 2. Some further cleanup of CM's parallel make mechanism. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/03/19 17:53:00 EST Tag: blume-20010319-parallel Description: Parallel make (using compile servers) now works again. To this end, CM.stabilize and CMB.make have been modified to work in two passes when compile servers are attached: 1. Compile everything, do not perform stabilization; this pass uses compile servers 2. Stabilize everything; this pass does not use compile servers If there are no compile servers, the two passes are combined into one (as before). Splitting the passes increases the inherent parallelism in the dependency graph because the entire graph including all libraries is available at the same time. This, in turn, improves server utilization. The downside is that the master process will have to do some extra work after compilation is done (because for technical reasons it must re-read all the binfiles during stabilization). ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/03/16 12:22:00 EST Tag: blume-20010316-bootfiles Description: Created a new set of bootfiles (for your automatic installation convenience). ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/03/16 11:00:00 EST Tag: blume-20010316-MLTREE-fixup Description: This is a minor fixup for an (untagged) earlier commit by Allen. (A file was missing). ---------------------------------------------------------------------- Name: Allen Leung Date: Mon Mar 5 18:54:57 EST 2001 Tag: leunga-20010305-cut-support 1. New support for alternative control-flow in MLTREE. Currently we support FLOW_TO(CALL ...., [k1,...,kn]) This is needed for 'cuts to' in C-- and try/handle-like constructs in Moby New assembler flag "asm-show-cutsto" to turn on control-flow debugging. 2. Register Allocator Changes in interface [from Fermin, John] 3. Alpha 8-bit SLL support [Fermin] 4. All architectures A new module (ClusterExpandCopies) for expanding parallel copies. ---------------------------------------------------------------------- Name: Allen Leung Date: 2001/02/27 23:07:00 EST Tag: leunga-20010227-minor-stuff 1. Alpha bug fix for CMOVNE 2. Handle mltree COND(..,FCMP ...,...) 3. Bug fix in simplifier ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/01/30 17:50:00 EST Tag: blume-20010130-sync Description: This is just a minor update to sync my devel branch with the main brach. The only visible change is the addition of some README files. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/01/12 23:30:00 JST Tag: blume-20010112-bootfiles Description: Made a new set of bootfiles that goes with the current state of the repository. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/01/12 21:20:00 JST Tag: blume-20010112-sync Description: I am just flushing out some minor changes that had accumulated in my private branch in order to sync with the main tree. (This is mainly because I had CVS trouble when trying to merge _into_ my private branch.) Most people should be completely unaffected by this. ---------------------------------------------------------------------- Name: Allen Leung Date: Thu Jan 11 21:03:00 EST 2001 Tag: leunga-20010111-labexp=mltree Description: 1. Removed the type LabelExp and replace it by MLTree. 2. Rewritten mltree-simplify with the pattern matcher tool. 3. There were some bugs in alpha code generator which would break 64-bit code generation. 4. Redo the tools to generate code with the 5. The CM files in MLRISC (and in src/system/smlnj/MLRISC) are now generated by perl scripts. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/01/10 21:55:00 JST Tag: blume-20010110-rcc Description: The RCC stuff now seems to work (but only on the x86). This required hacking of the c-calls interface (and -implementation) in MLRISC. Normal compiler users should be unaffected. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/01/09 01:20:00 JST Tag: blume-20010109-rcc Description: This is a fairly big patch, flushing out a large number of pending changes that I made to my development copy over the last couple of days. Of practical relevance at this moment is a workaround for a pickling bug that Allen ran into the other day. The cause of the bug itself is still unknown and it might be hard to fix it properly, but the workaround has some merits of its own (namely somewhat reducing pickling overhead for certain libraries). Therefore, I think this solution should be satisfactory at this time. The rest of the changes (i.e., the vast majority) has to do with my ongoing efforts of providing direct support for C function calls from ML. At the moment there is a new primop "RAW_CCALL", typing magic in types/cproto.sml (invoked from FLINT/trans/translate.sml), a new case in the FLINT CPS datatype (RCC), changes to cps/convert.sml to translate uses of RAW_CCALL into RCC, and changes to mlriscGen.sml to handle RCC. The last part (the changes to mlriscGen.sml) are still known to be wrong on the x86 and not implemented on all other architectures. But the infrastructure is in place. I had to change a few functor signatures in the backend to be able to route the CCalls interface from MLRISC there, and I had to specialize the mltree type (on the x86) to include the necessary extensions. (The extensions themselves were already there and redy to go in MLRISC/x86). Everything should be very happy as soon as someone helps me with mlriscGen.sml... In any case, nothing of this should matter to anyone as long as the new primop is not being used (which is going to be the case unless you find it where I hid it :). The rest of the compiler is completely unaffected. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2001/01/05 00:30:00 JST Tag: blume-20010105-primops Description: Added some experimental support for work that I am doing right now. These changes mostly concern added primops, but there is also a new experimental C library in the runtime system (but currently not enabled anywhere except on Linux/X86). In the course of adding primops (and playing with them), I discovered that Zhong's INL_PRIM hack (no type info for certain primops) was, in fact, badly broken. (Zhong was very right he labeled this stuff as "major gross hack".) To recover, I made type information in INL_PRIM mandatory and changed prim.sml as well as built-in.sml accordingly. The InLine structure now has complete, correct type information (i.e., no bottom types). Since all these changes mean that we need new binfiles, I also bumped the version number to 110.32.1. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/12/30 22:10:00 JST Tag: blume-20001230-various Description: Added proxy libraries for MLRISC and let MLRISC libraries refer to each other using path anchors. (See CM manual for explanation.) Updated CM documentation. Fixed some bugs in CM. Implemented "proxy" libraries (= syntactic sugar for CM). Added "-quiet" option to makeml and changed runtime system accordingly. Added cleanup handler for exportML to reset timers and compiler stats. ---------------------------------------------------------------------- Name: Lal George Date: 2000/12/22 22:22:58 EST 2000 Tag: Release_110_32 Description: Infinite precision used throughout MLRISC. see MLRISC/mltree/machine-int.sig ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/12/22 23:16:00 JST Tag: blume-20001222-warn Description: Corrected wording and formatting of some CM warning message which I broke in my previous patch. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/12/22 21:20:00 JST Tag: blume-20001222-anchorenv Description: Fixed CM's handling of anchor environments in connection with CMB.make. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/12/22 13:15:00 JST Tag: blume-20001222-cleanup Description: Removed src/cm/ffi which does not (and did not) belong here. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/12/21 23:55:00 JST Tag: blume-20001221-exn Description: Probably most important: CM no longer silently swallows all exceptions in the compiler. Plus: some other minor CM changes. For example, CM now reports some sizes for generated binfiles (code, data, envpickle, lambdapickle). ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/12/15 00:01:05 JST Tag: blume-20001215-dirtool Description: - "dir" tool added. - improvements and cleanup to Tools structure - documentation updates ---------------------------------------------------------------------- Name: Allen Leung Date: Thu Dec 14 03:45:24 EST 2000 Description: Tag: leunga-20001214-int-inf Description: In IntInf, added these standard functions, which are missing from our implementation: andb : int * int -> int xorb : int * int -> int orb : int * int -> int notb : int -> int << : int * word -> int ~>> : int * word -> int Not tested, I hope they are correct. ---------------------------------------------------------------------- Name: Allen Leung Date: Fri Dec 8 19:23:26 EST 2000 Description: Tag: leunga-20001208-nowhere Description: Slight improvements to the 'nowhere' tool to handle OR-patterns, to generate better error messages etc. Plus a brief manual. ---------------------------------------------------------------------- Name: Lal George Date: 2000/12/08 09:54:02 EST 2000 Tag: Release_110_31 Description: - Version 110.31 ---------------------------------------------------------------------- Name: Allen Leung Date: Thu Dec 7 22:01:04 EST 2000 Tag: leunga-20001207-cell-monster-hack Description: Major MLRISC internal changes. Affect all clients. Summary: 1. Type CELLS.cell = int is now replaced by a datatype. As a result, the old regmap is now gone. Almost all interfaces in MLRISC change as a consequence. 2. A new brand version of machine description tool (v3.0) that generates modules expecting the new interface. The old version is removed. 3. The RA interface has been further abstracted into two new functors. RISC_RA and X86RA. These functors have much simpler interfaces. [See also directory MLRISC/demo.] 4. Some other new source->source code generation tools are available: a. MLRISC/Tools/RewriteGen -- generate rewriters from rules. b. MLRISC/Tools/WhereGen -- expands conditional pattern matching rules. I use this tool to generate the peephole optimizers---with the new cell type changes, peephole rules are becoming difficult to write without conditional pattern matching. 5. More Intmap -> IntHashTable change. Previous changes by Matthias didn't cover the entire MLRISC source tree so many things broke. 6. CM files have been moved to the subdirectory MLRISC/cm. They are moved because there are a lot of them and they clutter up the root dir. 7. More detailed documentation to come... NOTE: To rebuild from 110.30 (ftp distribution), you'll have to do a makeml -rebuild first. This is because of other other changes that Matthias has made (see below). ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/11/30 23:12:00 JST Tag: blume-20001130-filereorg Description: Some manual updates and some file reorganizations in CM. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/11/24 17:45:00 JST Tag: blume-20001124-link Description: Drastically improved link traversal code for the case that the dynamic value was already loaded at bootstrap time. As a result, CM and CMB now both load blazingly fast -- even on a very slow machine. Also, memory consumption has been further reduced by this. Warning: The format of the PIDMAP file has changed. THerefore, to bootstrap you have to do this: 1. Run CMB.make 2. Make a symbolic link for the boot directory: ln -s sml.boot.ARCH-OS xxx 3. "Rebuild" the boot directory: ./makeml -boot xxx -rebuild sml ; rm xxx 4. Boot normally: ./makeml ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/11/21 21:20:00 JST Tag: blume-20001121-tools Description: Continued hacking on autoloading problem -- with success this time. Also changed tool-plugin mechanism. See new CM manual. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/11/19 14:30:00 JST Tag: blume-20001119-autoload Description: Some hacking to make autoloading faster. Success for CMB, no success so far for CM. There is a reduced structure CM' that autoloads faster. (This is a temporary, non-documented hack to be eliminated again when the general problem is solved.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/11/17 14:10:00 JST Tag: blume-20001117-pickle-lib Description: 1. Eliminated comp-lib.cm 2. Made pickle-lib.cm 3. Eliminated all uses of intset.sml (from comp-lib.cm) 4. Replaced all uses of intmap.{sig,sml} (from comp-lib.cm) with equivalent constructs from smlnj-lib.cm (INtHashTable). 5. Point 4. also goes for those uses of intmap.* in MLRISC. Duplicated intmap modules thrown out. 6. Hunted down all duplicated SCC code and replaced it with equivalent stuff (GraphSCCFn from smlnj-lib.cm). 7. Rewrote Feedback module. 8. Moved sortedlist.sml into viscomp-lib.cm. Eventually it should be thrown out and equivalent modules from smlnj-lib.cm should be used (IntRedBlackSet, IntListSet, ...). Confirmed that compiler compiles to fixpoint. ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/11/10 18:00:00 Tag: leunga-20001110-new-x86-fp A new x86 floating point code generator has been added. By default this is turned off. To turn this on, do: CM.autoload "$smlnj/compiler.cm"; Compiler.Control.MLRISC.getFlag "x86-fast-fp" := true; Changes: 1. Changed FTAN to FPTAN so that the assembly output is correct. 2. Changed the extension callback for FTANGENT to generate: fptan fstp %st(0) instead of fptan fstpl ftempmem 3. Numerous assembly fixes for x86. 5. Cleaned up the machine code output module x86/x86MC.sml and added support for a whole bunch of instructions and addressing modes: fadd/fsub/fsubr/fmul/fdiv/fdivr %st, %st(n) faddp/fsubp/fsubrp/fmulp/fdivp/fdivrp %st, %st(n) fadd/fsub/fsubr/fmul/fdiv/fdivr %st(n), %st fiadd/fisub/fisubr/fimul/fidiv/fidivr mem fxch %st(n) fld %st(n) fst %st(n) fst mem fstp %st(n) fucom %st(n) fucomp %st(n) All these are now generated when the fast fp mode is turned on. 6. Removed the dedicated registers %st(0), ..., %st(7) from X86CpsRegs ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/11/09 11:20:00 JST Tag: blume-20001109-scc Description: Eliminated some code duplication: 1. Added "where" clause to GraphSCCFn in SML/NJ Library. (Otherwise the functor is useless.) 2. Used GraphSCCFn where SCCUtilFun was used previously. 3. Got rid of SCCUtilFun (in comp-lib.cm). ---------------------------------------------------------------------- Name: Lal George Date: 2000/11/06 09:02:21 EST 2000 Tag: Release_110_30 Description: - Version 110.30 ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/11/04 14:45:00 Tag: blume-20001104-mlbuild Description: - Made ml-build faster on startup. - Documentation fixes. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/11/02 17:00:00 JST Tag: blume-20001102-condcomp Description: - Small tweaks to pickler -- new BOOTFILES! - Version bumped to 110.29.2. - Added conditional compilation facility to init.cmi (see comment there). ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/10/23 19:31:00 Tag: leunga-20001023-demo-ra 1. Minor RA changes that improves spilling on x86 (affects Moby and C-- only) 2. Test programs for the graph library updated 3. Some new MLRISC demo programs added ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/08/31 22:15:00 JST Tag: blume-20001017-errmsg Description: More error message grief: Where there used to be no messages, there now were some that had bogus error regions. Fixed. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/08/31 17:30:00 JST Tag: blume-20001017-v110p29p1 Description: I made a version 110.29.1 with new bootfiles. Changes: Modified pickler/unpickler for faster and leaner unpickling. CM documentation changes and a small bugfix in CM's error reporting. ---------------------------------------------------------------------- Name: Lal George Date: 2000/09/27 14:42:35 EDT Tag: george-20000927-nodestatus Description: Changed the type of the nodestatus, so that: SPILLED(~1) is now SPILLED SPILLED(m) where m>=0 is now MEMREG(m) SPILLED(s) where s<~1 is now SPILL_LOC(~s) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/09/07 14:45:00 JST Tag: blume-20000907-cmerrmsg Description: Small tweak to CM to avoid getting ML syntax error messages twice. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/08/31 18:00:00 JST Tag: blume-20000831-cvsbootfiles Description: New URL for boot files (because the 110.29 files on the BL server do now work correctly with my updated install scripts for yacc and lex). ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/08/08 12:33:00 JST Tag: blume-20000808-manual Description: Tiny update to CM manual. ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/08/7 19:31:00 Tag: leunga-20000807-a-whole-bunch-of-stuff Moby, C--, SSA, x86, machine descriptions etc. Should only affect C-- and Mobdy. 1. x86 a. Fixes to peephole module by John and Dan. b. Assembly fix to SETcc by Allen. c. Fix to c-call by John. d. Fix to spilling by John. (This one deals with the missing FSTPT case) e. Instruction selection optimization to SETcc as suggested by John. For example, MV(32, x, COND(32, CMP(32, LT, a, b), LI 1, LI 0)) should generate: MOVL a, x SUBL b, x SHRL 31, x 2. IR stuff A bunch of new DJ-graph related algorithms added. These speed up SSA construction. 3. SSA + Scheduling Added code for SSA and scheduling to the repository ---------------------------------------------------------------------- Name: Lal George Date: 2000/07/27 11:53:14 EDT Tag: lal-20000727-linux-ppc Description: Made changes to support Linux PPC. p.s. I have confirmation that the 110.29 boot files work fine. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/07/27 17:40:00 JST Tag: blume-20000727-scripts Description: !!!! WARNING !!!! You must recompile the runtime system! !!!! WARNING !!!! This is basically another round of script-enhancements: 1. sml, ml-build, and ml-makedepend accept options -D and -U to define and undefine CM preprocessor symbols. 2. ml-build avoids generating a new heap image if it finds that the existing one is still ok. (The condition is that no ML file had to be recompiled and all ML files are found to be older that the heap file.) To make this work smoothly, I also hacked the runtime system as well as SMLofNJ.SysInfo to get access to the heap image suffix (.sparc-solaris, ...) that is currently being used. Moreover, the signature of CM.mk_standalone has changed. See the CM manual. 3. ml-makedepend accepts additional options -n, -a, and -o. (See the CM manual for details.) 4. More CM manual updates: - all of the above has been documented. - there is now a section describing the (CM-related) command line arguments that are accepted by the "sml" command ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/07/25 16:20:00 JST Tag: blume-20000725-makedepend Description: Added a script called ml-makedepend. This can be used in makefiles for Unix' make in a way very similar to the "makedepend" command for C. The script internally uses function CM.sources. Synopsis: ml-makedepend [-f makefile] cmfile targetname The default for the makefile is "makefile" (or "Makefile" should "makefile" not exist). ml-makedepend adds a cmfile/targetname-specific section to this makefile (after removing the previous version of this section). The section contains a single dependency specification with targetname on the LHS (targetname is an arbitrary name), and a list of files derived from the cmfile on the RHS. Some of the files on the RHS are ARCH/OPSYS-specific. Therefore, ml-makedepend inserts references to "make" variables $(ARCH) and $(OPSYS) in place of the corresponding path names. The makefile writer is responsible for making sure that these variables have correct at the time "make" is invoked. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/07/22 23:30:00 JST Tag: blume-20000722-urlupdate Description: Changed BOOT and config/srcarchiveurl to point to BL server: ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/ ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/07/18 18:00:00 JST Tag: blume-20000718-Version_110_29 Description: 1. Updated src/compiler/TopLevel/main/version.sml to version 110.29 2. Updated config/version to 110.29 3. Updated config/srcarchiveurl 3. New boot files! ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/07/11 13:58:00 JST Tag: blume-20000711-doctypo Description: Fixed a few typos in CM manual. ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/06/15 00:38:00 Tag: leunga-20000704-sparc-x86 1. x86 peephole improvement sp += k; sp -= k => nop [from John] 2. fix to x86 RET bug [found by Dan Grossman] 3. sparc assembly bug fix for ticc instructions [found by Fermin] Affects c-- and moby only ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/07/04 15:26:00 Tag: blume-20000704-trigger Description: 1. Improvements to CM manual. 2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way of getting a back-trace. The function, when called, raises an internal exception which explicitly carries the full back-trace history, so it is unaffected by any intervening handle-raise pairs ("trivial" or not). The interactive loop will print that history once it arrives at top level. Short of having all exceptions implicitly carry the full history, the recommended way of using this facility is: - compile your program with instrumentation "on" - run it, when it raises an exception, look at the history - if the history is "cut off" because of some handler, go and modify your program so that it explicitly calls BTrace.trigger - recompile (still instrumented), and rerun; look at the full history ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/07/03 15:36:00 JST Tag: blume-20000702-manual Description: Small corrections and updates to CM manual. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/06/29 16:04:00 JST Tag: blume-20000629-yacctool Description: Changes: 1. Class "mlyacc" now takes separate arguments to pass options to generated .sml- and .sig-files independently. 2. Corresponding CM manual updates. 3. BTrace module now also reports call sites. (However, for loop clusters it only shows from where the cluster was entered.) There are associated modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/06/27 16:51:00 JST Tag: blume-20000627-noweb Description: Changes: 1. Implemented "subdir" and "witness" options for noweb tool. This caused some slight internal changes in CM's tool implementation. 2. Fixed bug in "tool plugin" mechanism. This is essentially cleaning some remaining issues from earlier path anchor changes. 3. Updated CM manual accordingly. 4. Changed implementation of back-tracing so that I now consider it ready for prime-time. In particular, you don't have to explicitly trigger the back-trace anymore. Instead, if you are running BTrace-instrumented code and there is an uncaught exception (regardless of whether or not it was raised in instrumented code), the top-level evalloop will print the back-trace. Features: - Instrumented and uninstrumented code work together seemlessly. (Of course, uninstrumented code is never mentioned in actual back-traces.) - Asymptotic time- and space-complexity of instrumented code is equal to that of uninstrumented code. (This means that tail-recursion is preserved by the instrumentation phase.) - Modules whose code has been instrumented in different sessions work together without problem. - There is no penalty whatsoever on uninstrumented code. - There is no penalty on "raise" expressions, even in instrumented code. A potential bug (or perhaps it is a feature, too): A back-trace reaches no further than the outermost instrumented non-trivial "raise". Here, a "trivial" raise is one that is the sole RHS of a "handle" rule. Thus, back-traces reach trough handle e => raise e and even handle Foo => raise Bar and, of course, through handle Foo => ... if the exception was not Foo. Back-traces always reach right through any un-instrumented code including any of its "handle" expressions, trivial or not. To try this out, do the following: - Erase all existing binfiles for your program. (You may keep binfiles for those modules where you think you definitely don't need back-tracing.) - Turn on back-trace instrumentation: SMLofNJ.Internals.BTrace.mode (SOME true); - Recompile your program. (I.e., run "CM.make" or "use".) - You may now turn instrumentation off again (if you want): SMLofNJ.Internals.BTrace.mode (SOME false); - Run your program as usual. If it raises an exception that reaches the interactive toplevel, then a back-trace will automatically be printed. After that, the toplevel loop will print the exception history as usual. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/06/26 09:56:46 JST Tag: blume-20000626-setup Description: CM: - setup-parameter to "sml" added; this can be used to run arbitrary ML code before and after compiling a file (e.g., to set compiler flags) Compiler: - improved btrace API (in core.sml, internals.{sig,sml}) - associated changes to btrace.sml (BTrace instrumentation pass) - cleaner implementation of btimp.sml (BTrace tracing and report module) CM manual: * new path encoding documented * description of setup-parameter to "sml" added The biggest user-visible change to back-tracing is that it is no longer necessary to compile all traced modules within the same session. (This was a real limitation.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/06/24 12:40:00 JST Tag: blume-20000624-startup Description: Fixes startup slowdown problem. (I was calling SrcPath.sync a _tad_ bit too often -- to put it mildly. :) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/06/23 18:20:00 JST Tag: blume-20000623-btrace Description: This updates adds a backtrace facility to aid programmers in debugging their programs. This involves the following changes: 1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for keeping track of the current call stack. When programs are compiled in a special mode, the compiler will insert calls to these hooks into the user program. "Hook" means that it is possible for different implementations of back-tracing to register themselves (at different times). 2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase as an Absyn.dec->Absyn.dec rewrite. Normally this phase is turned off. It can be turned on using this call: SMLofNJ.Internals.BTrace.mode (SOME true); Turning it off again: SMLofNJ.Internals.BTrace.mode (SOME false); Querying the current status: SMLofNJ.Internals.BTrace.mode NONE; Annotated programs are about twice as big as normal ones, and they run a factor of 2 to 4 slower with a dummy back-trace plugin (one where all hooks do nothing). The slowdown with a plugin that is actually useful (such as the one supplied by default) is even greater, but in the case of the default plugin it is still only an constant factor (amortized). 3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented with a sub-structure BTrace for controlling back-tracing. In particular, the above-mentioned function "mode" controls whether the annotation phase is invoked by the compiler. Another important function is "trigger": when called it aborts the current execution and causes the top-level loop to print a full back-trace. 4. compiler/MiscUtil/profile/btimp.sml is the current default plugin for back-tracing. It keeps track of the dynamic call stack and in addition to that it keeps a partial history at each "level" of that stack. For example, if a tail-calls b, b tail-calls c, and c tail-calls d and b (at separate times, dynamically), then the report will show: GOTO d /c GOTO \b CALL a This shows that there was an initial non-tail call of a, then a tail-call to b or c, looping behavior in a cluster of functions that consist of b and c, and then a goto from that cluster (i.e., either from b or from c) to d. Note that (depending on the user program) the amount of information that the back-trace module has to keep track of at each level is bounded by a constant. Thus, the whole implementation has the same asymptotical complexity as the original program (both in space and in time). 5. compiler/TopLevel/interact/evalloop.sml has been modified to handle the special exception SMLofNJ.Internals.BTrace.BTrace which is raised by the "trigger" function mentioned above. Notes on usage: - Annotated code works well together with unannotated code: Unannotated calls simply do not show up at all in the backtrace. - It is not a good idea to let modules that were annotated during different sessions run at the same time. This is because the compiler chooses small integers to identify individual functions, and there will be clashes if different modules were compiled in separate sessions. (Nothing will crash, and you will even be told about the clashes, but back-trace information will in general not be useful.) - Back-tracing can be confused by callcc and capture. - The only way of getting a back-trace right now is to explicitly invoke the "trigger" function from your user program. Eventually, we should make every exception carry back-trace information (if available). But since this creates more overhead at "raise"-time (similar to the current exnHistory overhead), I have not yet implemented this. (The implementation will be rather easy.) With exceptions carrying back-trace information, this facility will be even more useful because users don't need to modify their programs... - While it is possible to compile the compiler with back-trace annotations turned on (I did it to get some confidence in correctness), you must make absolutely sure that core.sml and btimp.sml are compiled WITHOUT annotation! (core.sml cannot actually be compiled with annotation because there is no core access yet, but if you compile btimp.sml with annotation, then the system will go into an infinite recursion and crash.) Since CM currently does not know about BTrace, the only way to turn annotations on and off for different modules of the compiler is to interrupt CMB.make, change the settings, and re-invoke it. Of course, this is awkward and clumsy. Sample sessions: Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000 - SMLofNJ.Internals.BTrace.mode (SOME true); [autoloading] [autoloading done] val it = false : bool - structure X = struct - fun main n = let - fun a (x, 0) = d x - | a (x, n) = b (x, n - 1) - and b (x, n) = c (x, n) - and c (x, n) = a (x, n) - and d x = e (x, 3) - and e (x, 0) = f x - | e (x, n) = e (x, n - 1) - and f 0 = SMLofNJ.Internals.BTrace.trigger () - | f n = n * g (n - 1) - and g n = a (n, 3) - in - f n - end - end; structure X : sig val main : int -> int end - X.main 3; *** BACK-TRACE *** GOTO stdIn:4.2-13.20: X.main[2].f GOTO-( stdIn:4.2-13.20: X.main[2].e GOTO stdIn:4.2-13.20: X.main[2].d / stdIn:4.2-13.20: X.main[2].a | stdIn:4.2-13.20: X.main[2].b GOTO-\ stdIn:4.2-13.20: X.main[2].c CALL stdIn:4.2-13.20: X.main[2].g GOTO stdIn:4.2-13.20: X.main[2].f GOTO-( stdIn:4.2-13.20: X.main[2].e GOTO stdIn:4.2-13.20: X.main[2].d / stdIn:4.2-13.20: X.main[2].a | stdIn:4.2-13.20: X.main[2].b GOTO-\ stdIn:4.2-13.20: X.main[2].c CALL stdIn:4.2-13.20: X.main[2].g GOTO stdIn:4.2-13.20: X.main[2].f GOTO-( stdIn:4.2-13.20: X.main[2].e GOTO stdIn:4.2-13.20: X.main[2].d / stdIn:4.2-13.20: X.main[2].a | stdIn:4.2-13.20: X.main[2].b GOTO-\ stdIn:4.2-13.20: X.main[2].c CALL stdIn:4.2-13.20: X.main[2].g GOTO stdIn:4.2-13.20: X.main[2].f CALL stdIn:2.15-17.4: X.main[2] - (Note that because of a FLINt bug the above code currently does not compile without BTrace turned on.) Here is another example, using my modified Tiger compiler: Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000 - SMLofNJ.Internals.BTrace.mode (SOME true); [autoloading] [autoloading done] val it = false : bool - CM.make "sources.cm"; [autoloading] ... [autoloading done] [scanning sources.cm] [parsing (sources.cm):parse.sml] [creating directory CM/SKEL ...] [parsing (sources.cm):tiger.lex.sml] ... [wrote CM/sparc-unix/semant.sml] [compiling (sources.cm):main.sml] [wrote CM/sparc-unix/main.sml] [New bindings added.] val it = true : bool - Main.compile ("../testcases/merge.tig", "foo.out"); *** BACK-TRACE *** CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp CALL lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2] GOTO lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2] CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp CALL lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2] / lib/semant.sml:411.65-543.8: SemantFun[2].transDec CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2] CALL lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp CALL lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2] CALL main.sml:1.18-118.4: Main.compile[2] - ---------------------------------------------------------------------- Name: Matthias Blumen Date: 2000/06/21 18:00:00 JST Tag: blume-20000621-manual Description: CM manual update: Path environments documented. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/06/19 13:40:00 Tag: blume-20000619-manual Description: CM manual and system/README update. This only covers the fact that there are no more implicit anchors. (Path environments and the "bind" option to "cm" have yet to be documented.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/06/19 11:05:00 JST Tag: blume-20000619-chdir-bugfix Description: Fixed a bug in new SrcPath module that sometimes led to a bad chDir call. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/06/18 22:00:10 JST Tag: blume-20000618-implicit-anchors-really-gone Description: I updates the previous HISTORY entry where I forgot to mention that implicit anchors are no longer with us. The current update also gets rid of the (now useless) controller CM.Control.implicit_anchors. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/06/16 17:30:00 JST Tag: blume-20000616-anchorenv Description: This patch implements the long anticipated (just kidding :) "anchor environment" mechanism. In the course of doing this, I also re-implemented CM's internal "SrcPath" module from scratch. The new one should be more robust in certain boundary cases. In any case, it is a lot cleaner than its predecessor (IMHO). This time, although there is yet another boot file format change, I kept the unpickler backward-compatible. As a result, no new bootfiles are necessary and bootstrapping is straightforward. (You cannot read new bootfiles into an old system, but the other way around is no problem.) Visible changes: ** 0. Implicit path anchors (without the leading $-symbol) are no longer recognized at all. This means that such path names are not illegal either. For example, the name basis.cm simply refers to a local file called "basis.cm" (i.e, the name is an ordinary path relative to .cm-files directory). Or, to put it differently, only names that start with $ are anchored paths. ** 1. The $ abbreviation for $/ has finally vanished. John (Reppy) had critizised this as soon as I originally proposed and implemented it, but at that time I did not really deeply believe him. :) Now I came full-circle because I need the $ syntax in another place where it cannot be seen as an abbreviation for $/. To avoid the confusion, $ now means what it seems to mean (i.e., it "expands" into the corresponding anchor value). However, when paths are used as members in CM description files, it continues to be true that there must be at least another arc after the anchor. This is now enforced separately during semantic analysis (i.e., from a lexical/syntactical point of view, the notation is ok.) ** 2. The "cm" class now accepts an option "bind". The option's value is a sub-option list of precisely two items -- one labeled "anchor" and the other one labeled "value". As you might expect, "anchor" is used to specify an anchor name to be bound, and "value" specifies what the anchor is being bound to. The value must be a directory name and can be given in either standard syntax (including the possibility that it is itself an anchored path) or native syntax. Examples: foo.cm (bind:(anchor:bar value:$mystuff/bar)) lib.cm (bind:(anchor:a value:"H:\\x\\y\\z")) (* only works under windows *) and so on. The meaning of this is that the .cm-file will be processed with an augmented anchor environment where the given anchor(s) is/are bound to the given values(s). The rationale for having this feature is this: Suppose you are trying to use two different (already stable) libraries a.cm and b.cm (that you perhaps didn't write yourself). Further, suppose each of these two libraries internally uses its own auxiliary library $aux/lib.cm. Normally you would now have a problem because the anchor "lib" can not be bound to more than one value globally. Therefore, the project that uses both a.cm and b.cm must locally redirect the anchor to some other place: a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff)) b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff)) This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or /usr/lib/smlnj/b-stuff/aux.cm, respectively. Hard-wiring path names is a bit inflexible (and CM will verbosely warn you when you do so at the time of CM.stabilize). Therefore, you can also use an anchored path as the value: a.cm (bind:(anchor:lib value:$a-lib)) b.cm (bind:(anchor:lib value:$b-lib)) Now you can globally configure (using the usual CM.Anchor.anchor or pathconfig machinery) bindings for "a-lib" and "b-lib". Since "lib" itself is always locally bound, setting it globally is no longer meaningful or necessary (but it does not hurt either). In fact, "lib" can still be used as a global anchor for separate purposes. As a matter of fact, one can locally define "lib" in terms of a global "lib": a.cm (bind:(anchor:lib value:$lib/a)) b.cm (bind:(anchor:lib value:$lib/b)) ** 3: The encoding of path names has changed. This affects the way path names are shown in CM's progress report and also the internal protocol encoding used for parallel make. The encoding now uses one or more ':'-separated segments. Each segments corresponds to a file that has been specified relative to the file given by its preceding segment. The first segment is either relative to the CWD, absolute, or anchored. Each segment itself is basically a Unix pathname; all segments but the first are relative. Example: $foo/bar/baz.cm:a/b/c.sml This path denotes the file bar/a/b/c.sml relative to the directory denoted by anchor "foo". Notice that the encoding also includes baz.cm which is the .cm-file that listed a/b/c.sml. As usual, such paths are resolved relative to the .cm-files directory, so baz.cm must be ignored to get the "real" pathname. To make this fact more obvious, CM puts the names of such "virtual arcs" into parentheses when they appear in progress reports. (No parentheses will appear in the internal protocol encoding.) Thus, what you really see is: $foo/bar/(baz.cm):a/b/c.sml I find this notation to be much more informative than before. Another new feature of the encoding is that special characters including parentheses, colons, (back)slashes, and white space are written as \ddd (where ddd is the decimal encoding of the character). *** The CM manual still needs to be updated. ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/06/15 00:38:00 Tag: leunga-20000615-x86-peephole x86 Peephole fix by Fermin. Affects c-- and moby only. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/06/12 11:40:00 Tag: blume-20000612-parmakefix Description: More cleanup after changing the file naming scheme: This time I repaired the parallel make mechanism for CMB.make which I broke earlier. ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/06/09 01:25:00 Tag: leunga-20000609-various None of these things should affect normal SML/NJ operations 1. Peephole improvements provided by Fermin (c--) 2. New annotation DEFUSE for adding extra dependence (moby) 3. New X86 LOCK instructions (moby) 4. New machine description language for reservation tables (scheduling) 5. Fixes to various optimization/analysis modules (branch chaining, dominator trees etc.) 6. I've changed the CM files so that they can work with versions 110.0.6, 110.25 and 110.28 ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/06/09 12:40:00 Tag: blume-20000609-log Description: - Removed all(?) remaining RCS Log entries from sources. - Fixed bug in ml-yacc and ml-lex sources (use explicit anchors for anchored paths). ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/06/07 17:00:00 JST Tag: blume-20000607-no-implicit-anchors Description: 1. This update changes the default setting for CM.Control.implicit_anchors from true to false. This means that implicit anchors are no longer permitted by default. I also tried to make sure that nothing else still relies on implicit anchors. (This is the next step on the schedule towards a CM that does not even have the notion of implicit anchors anymore.) 2. More CM manual updates. 3. I managed to track down and fix the pickling bug I mentioned last time. Because of the previously existing workaround, this entails no immediate practical changes. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/06/06 11:15:00 JST Tag: blume-20000606-lazierpickle Description: !!!! NEW BOOT FILES !!!! * The main purpose of this update is to make library pickles lazier in order to reduce the initial space penalty for autoloading a library. As a result, it is now possible to have $smlnj/compiler.cm pre-registered. This should take care of the many complaints or inquiries about missing structure Compiler. This required changes to CM's internal data structures and small tweaks to some algorithms. As a neat additional effect, it is no longer necessary (for the sake of lean heap image files) to distinguish between a "minimal" CM and a "full" CM. Now, there is only one CM (i.e., the "full" version: $smlnj/cm.cm aka $smlnj/cm/full.cm), and it is always available at the interactive top level. ($smlnj/cm/minimal.cm is gone.) To make the life of compiler-hackers easier, "makeml" now also pre-registers $smlnj/cmb.cm (aka $smlnj/cmb/current.cm). In other words, after you bootstrap a new sml for the first time, you will not have to autoload $smlnj/cmb.cm again afterwards. (The first time around you will still have to do it, though.) * A second change consists of major updates to the CM manual. There are now several appendices with summary information and also a full specification of the CM description file syntax. * In directory src/system I added the script "allcross". This script invokes sml and cross-compiles the compiler for all supported architectures. (Useful when providing a new set of boot files.) * There seems to be a latent bug in my "lazy pickles" mechanism. I added a small tweak to pickle-util.sml to work around this problem, but it is not a proper fix yet. I will investigate further. (The effect of the bug was an inflation of library pickle size.) * Version number increased to 110.28.1 (to avoid compatibility problems). ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/05/25 17:28 EDT Tag: leunga-20000525-ra Description: Fixed a bug in freezing phase of the register allocator. ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/05/15 22:53 EDT Tag: leunga-20000515-alpha-x86-ra Description: 1. Alpha Slight cleanup. Removed the instruction SGNXL 2. X86 Added the following instructions to the instruction set: ROLx, RORx, BTx, BTSx, BTLx, BTRx, XCHGx, and variants with the LOCK prefix 3. Register Allocation The module ra-rewrite-with-renaming has been improved. These have no effect on SML/NJ. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/05/15 16:20:00 JST Tag: blume-20000515-lightrebuild Description: 1. I added an alternative to "-rebuild" to "makeml". The difference is that prior to calling CMB.make' the CM-variable "LIGHT" will be defined. In effect, the command will not build any cross-compiler backends and therefore finish more quickly. The "fixpt" script also takes a "-light" switch to be able to use this new facility while compiling for a fixpoint. 2. I replaced all mentions of anchored paths in group owner specifications with simple relative paths (usually starting with ".."). The rationale is that a library's internal workings should not be compromised by the lack of some anchor. (An anchor is necessary for someone who wants to refer to the library by an anchored path, but it should not be necessary to build the same library in the first place.) 3. I changed the way CM's tool mechanism determines the shell command string used for things like ml-yacc etc. so that it does not break when CM.Control.implicit_anchors is turned off. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/05/12 18:20:00 JST Tag: blume-20000512-ml-build Description: Fixed a bug in config/_ml-build that prevented ml-yacc and ml-lex from getting installed properly (by config/install.sh). ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/05/12 17:30:00 JST Tag: blume-20000512-anchors Description: !!! NEW BOOT FILES !!! This change is in preparation of fading out support for "implicitly anchored path names". I went through all sources and used the explicit (and relatively new) $-notation. See system/README and the CM manual for more info on this. I also modified the anchoring scheme for some things such as "smlnj", "MLRISC", "cm", etc. to take advantage of the fact that explicit anchors are more expressive: anchor name and first arc do not have to coincide. This entails the following user-visible change: You have to write $smlnj/foo/bar instead of smlnj/foo/bar. In particular, when you fire up sml with a command-line argument, say, e.g.: sml '$smlnj/cmb.cm' At the ML toplevel prompt: CM.autoload "$smlnj/cmb.cm"; There is also a new controller in CM.Control that can be used to turn off all remaining support for implicit anchors by saying: CM.autoload "$smlnj/ #set CM.Control.implicit_anchors false; This causes CM to reject implicitly anchored paths. This is (for the time being) less permissive than the "final" version where there will be no more such implicit anchors and relative paths will be just that: relative. The next step (version after next version?) will be to make the default for CM.Control.implicit_anchors false. After the dust has settled, I can then produce the "final" version of this... Note: Since bootstrapping is a bit tricky, I provided new boot files. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/05/11 16:30:00 JST Tag: blume-20000511-sources Description: The main change is that I added function CM.sources as a generalized version of the earlier CM.makedepend. This entails the following additional changes: - CM.makedepend has been dropped. - CM manual has been updated. - TOOLS signature and API have been changed. ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/05/10 21:17 EDT Tag: leunga-20000510-moby-c--ssa Description: Various bug fixes and new features for C--, Moby and MLRISC optimizations. None of these affect SML/NJ. 1. Register Allocation a. A new ra spilling module (ra/ra-spill-with-renaming) is implemented. This module tries to remove local (i.e. basic block level) redundancies during spilling. b. A new framework for performing region based register allocation. Not yet entirely functional. 2. X86 a. DefUse for POP was missing the stack pointer [found by Lal] b. Reload for CALL was incorrect in X86Spill [found by John] c. Various fixes in X86Spill so that it can be used correctly for the new spilling module. 3. SSA/IR a. New module ir/dj-dataflow.sml implements elimination based data flow analysis. 4. MLRiscGen a. Fix for gc type annotation 5. MDGen Various fixes for machine description -> ml code translation. For ssa only. ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/05/08 22:17 EDT Tag: leunga-20000508-labexp Description: Fermin has found a few assembly problems with constant expressions generated in LabelExp. Mostly, the problems involve extra parentheses, which choke on dumb assemblers. This is his fix. ---------------------------------------------------------------------- Name: Dave MacQueen Date: 2000/04/09 14:00 EDT Tag: dbm-20000502-Version_110_28 Description: 1. Updated src/compiler/TopLevel/main/version.sml to version 110.28 2. Updated config/version to 110.28 3. Updated config/srcarchiveurl 3. New boot files! ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.28/ ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/05/01 19:05:00 JST Tag: blume-20000501-noweb Description: A new noweb tool has been added. The existing system is entirely unaffected by this, but some CM users have asked for renewed noweb support. Everything is documented in the CM manual. New (plugin) libraries: noweb-tool.cm nw-ext.cm ---------------------------------------------------------------------- Name: Dave MacQueen Date: 2000/04/30 12:40PM EDT Tag: dbm-20000430-bug_fixes Description: 1. Fix for bug 1498 smlnj/src/system/Basis/Implementation/Unsafe/object.sig smlnj/src/system/Basis/Implementation/Unsafe/object.sml added toRealArray function smlnj/src/compiler/MiscUtil/print/ppobj.sml added check for tag Obj.RealArray to array printing case in ppObj 2. Fix for bug 1510 smlnj/src/compiler/Semant/types/typesutil.sml fixed definition of dummyargs (used by equalTycon) so that dummy args are distinct types ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/04/30 01:00:00 JST Tag: blume-20000430-versions Description: 1. CM version numbering added. This is an implementation of Lal's proposal for adding version numbers and version checking to .cm files. Lal said that his proposal was just that -- a proposal. For the time being I went ahead and implemented it so that people can comment on it. Everything is completely backward-compatible (except for the stable library format, i.e., new bootfiles!). As usual, see the CM manual for details. 2. An alternative syntax for anchored paths has been implemented. Dave has recently voiced the same concerns that I had when I did this, so there should be some support. My take is that eventually I will let support for the current syntax (where anchors are "implicit") fade out in favor of the new, explicit syntax. In order to be backward-compatible, both old and new syntax are currently supported. Again, see the CM manual for details. 3. Parallel make is trying to be slightly smarter: When the master process finds a "bottleneck", i.e., when there is only one compilation unit that can be compiled and everybody else is waiting on it, then it will simply compile it directly instead of clumsily telling one of the slaves to do it. 4. Support for "unsharing" added. This is necessary in order to be able to have two different versions of the same library running at the same time (e.g., for trying out a new MLRISC while still having the old MLRISC linked into the current compiler, etc.) See the CM manual. 5. Simple "makedepend" functionality added for generating Makefile dependency information. (This is rather crude at the moment. Expect some changes here in the future.) 6. ".fun" added as a recognized suffix for ML files. Also documented explicitly in the manual that the fallback behavior (unknown suffix -> ML file) is not an official feature! 7. Small changes to the pickler for stable libraries. 8. Several internal changes to CM (for cleanup/improvement). !!!! NEW BINFILES !!!! ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/04/28 17:30:00 JST Tag: blume-20000428-pathconfig Description: 1. I changed config/install.sh to remove duplicate entries from the lib/pathconfig file at the end. Moreover, the final version of lib/pathconfig is sorted alphabetically. The same (sorting) is done in src/system/installml. 2. The config/install.sh script now consistently uses relative pathnames in lib/pathconfig whenever the anchor is in the lib directory. (So far this was true for the libraries that come pre-compiled and bundled as part of the bootfiles but not for libraries that are compiled by the script itself.) ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/04/26 13:10:00 JST Tag: blume-20000426-fun_suffix Description: Added ".fun" as a recognized file name suffix (for ML code). ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/04/25 17:00:00 EST Tag: leunga-20000425-alpha-ra Description: 1. Alpha PSEUDOARITH was missing in AlphaRewrite. This causes an endless loop in C--. 2. RA Added a flag "ra-dump-size" to print out the size of the flowgraph and the interference graph. ---------------------------------------------------------------------- Name: Dave MacQueen Date: 2000/04/25/ Tag: dbm-20000425-mlyacc_doc_examples Description: Updated mlyacc.tex sections 5 and 7 for SML '97 and CM. Updated all three examples in src/ml-yacc/examples to run under 110.* using CM.make. ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/04/20 23:04:00 EST Tag: leunga-20000420-ssa-c---stuff Description: This update synchronizes my repository with Yale's. Most of these changes, however, do not affect SML/NJ at all (the RA is an exception). 1. Register Allocator a. An improvement in the interference graph construction: Given a copy s <- t no interference edge between s and t is added for this definition of s. b. I've added two new spill heuristic modules that Fermin and I developed (in the new library RA.cm). These are unused in SML/NJ but maybe useful for others (Moby?) 2. X86 a. Various fixes in the backend provided by Fermin [C--] and Lal. 3. Alpha a. Added the BSR instruction and code generation that goes with it [C--] b. Other fixes too numerous to recount provided by Fermin [C--] 4. Regmaps a. The regmaps are not initialized with the identity physical bindings at creation time. This is unneeded. 5. MLRISC Optimizations a. The DJ-Graph module can now compute the iterated dominance frontiers intersects with liveness incrementally in linear time! Woohoo! This is now used in my new SSA construction algorithm. b. THe branch reorganization module is now smarter about linear chains of basic blocks. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/04/12 13:52:00 JST Tag: blume_main_v110p27_1 Description: Changed install.sh script to handle archive files without version number and to use "boot.-" instead of "sml.boot.-" for the name of the boot file archive. ---------------------------------------------------------------------- Name: Dave MacQueen Date: 2000/04/09 14:00 EDT Tag: dbm-20000410-Version_110_27 Description: 1. Updated src/compiler/TopLevel/main/version.sml to version 110.27 2. Updated src/config/version to 110.27 3. New boot files! ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/04/09 19:09:00 EST Tag: leunga-20000409-misc Description: 1. Yet another fix for x86 assembly for idivl, imull, mull and friends. 2. Miscellaneous improvements to MLRISC (unused in sml/nj) ---------------------------------------------------------------------- Name: Stefan Date: 2000/04/07 10:00:00 EDT Tag: monnier-20000406-branch-handling Description: Improved handling of branches (mostly those generated from polymorphic equality), removed switchoff and changed the default optimization settings (more cpsopt and less flintopt). ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/04/06 01:30:00 EST Tag: leunga-20000406-peephole-x86-SSA-2 Description: Forgot a few files. ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/04/06 00:36:00 EST Tag: leunga-20000406-peephole-x86-SSA Description: 1. New Peephole code 2. Minor improvement to X86 instruction selection 3. Various fixes to SSA and machine description -> code translator ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/04/05 12:30:00 JST Tag: blume_main_v110p26p2_3 Description: This update just merges three minor cosmetic updates to CM's sources to get ready for the 110.27 code freeze on Friday. No functionality has changed. ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/04/04 19:39:00 EST Tag: leunga-20000404-x86-asm Description: 1. Fixed a problem in X86 assembly. Things like jmp %eax jmp (%eax) should be output as jmp *%eax jmp *(%eax) 2. Assembly output Added a new flag "asm-indent-copies" (default to false) When this flag is on, parallel copies will be indented an extra level. ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/04/04 03:18:00 EST Tag: leunga-20000404-C--Moby Description: All of these fixes are related to C--, Moby, and my own optimization stuff; so they shouldn't affect SML/NJ. 1. X86 Various fixes related floating point, and extensions. 2. Alpha Some extra patterns related to loads with signed/zero extension provided by Fermin. 3. Assembly When generating assembly, resolve the value of client defined constants, instead of generating symbolic values. This is controlled by the new flag "asm-resolve-constants", which is default to true. 4. Machine Descriptions a. The precedence parser was slightly broken when parsing infixr symbols. b. The type generalizing code had the bound variables reversed, resulting in a problem during arity raising. c. Various fixes in machine descriptions. ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/04/03 16:05:00 JST Tag: blume_main_v110p26p2_2 Description: I eliminated coreEnv from compInfo. Access to the "Core" structure is now done via the ordinary static environment that is context to each compilation unit. To this end, I arranged that instead of "structure Core" as "structure _Core" is bound in the pervasive environment. Core access is done via _Core (which can never be accidentally rebound because _Core is not a legal surface-syntax symbol). The current solution is much cleaner because the core environment is now simply part of the pervasive environment which is part of every compilation unit's context anyway. In particular, this eliminates all special-case handling that was necessary until now in order to deal with dynamic and symbolic parts of the core environment. Remaining hackery (to bind the "magic" symbol _Core) is localized in the compilation manager's bootstrap compiler (actually: in the "init group" handling). See the comments in src/system/smlnj/init/init.cmi for more details. I also tried to track down all mentions of "Core" (as string argument to Symbol.strSymbol) in the compiler and replaced them with a reference to the new CoreSym.coreSym. Seems cleaner since the actual name appears in one place only. Binfile and bootfile format have not changed, but the switchover from the old "init.cmi" to the new one is a bit tricky, so I supplied new bootfiles anyway. ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/04/02 21:17:00 EST Tag: leunga-20000402-mltree Description: 1. Renamed the constructor CALL in MLTREE by popular demand. 2. Added a bunch of files from my repository. These are currently used by other non-SMLNJ backends. ---------------------------------------------------------------------- Name: Allen Leung Date: 2000/03/31 21:15:00 EST Tag: leunga-20000331-aliasing Description: This update contains a rewritten (and hopefully more correct) module for extracting aliasing information from CPS. To turn on this feature: Compiler.Control.CG.memDisambiguate := true To pretty print the region information with assembly Compiler.Control.MLRISC.getFlag "asm-show-region" := true; To control how many levels of aliasing information are printed, use: Compiler.Control.MLRISC.getInt "points-to-show-level" := n The default of n is 3. ---------------------------------------------------------------------- Name: David MacQueen Date: 2000/03/31 11:15:00 EST Tag: dbm-20000331-runtime_fix Description: This update contains: 1. runtime/c-lib/c-libraries.c includes added in revision 1.2 caused compilation errors on hppa-hpux 2. fix for bug 1556 system/Basis/Implementation/NJ/internal-signals.sml ---------------------------------------------------------------------- Name: Matthias Blume Date: 2000/03/31 18:00:00 JST Tag: blume_main_v110p26p2_1 Description: This update contains: 1. A small change to CM's handling of stable libraries: CM now maintains one "global" modmap that is used for all stable libraries. The use of such a global modmap maximizes sharing and minimizes the need for re-traversing parts of environments during modmap construction. (However, this has minor impact since modmap construction seems to account for just one percent or less of total compile time.) 2. I added a "genmap" phase to the statistics. This is where I got the "one percent" number (see above). 3. CM's new tool parameter mechanism just became _even_ better. :) - The parser understands named parameters and recursive options. - The "make" and "shell" tools use these new features. (This makes it a lot easier to cascade these tools.) - There is a small syntax change: named parameters use a : (