debian/0000755000000000000000000000000012230542501007160 5ustar debian/mlton-runtime-powerpc-linux-gnu.install0000644000000000000000000000005211541717433016774 0ustar usr/lib/mlton/targets/powerpc-linux-gnu/* debian/mlton-basis.install0000644000000000000000000000013511541376114013010 0ustar usr/lib/mlton/include usr/lib/mlton/mlb-path-map usr/lib/mlton/sml usr/share/doc/mlton/basis debian/mlton-runtime-x86-64-kfreebsd-gnu.install0000644000000000000000000000005411541717433016621 0ustar usr/lib/mlton/targets/x86_64-kfreebsd-gnu/* debian/mlton-runtime-hppa-linux-gnu.install0000644000000000000000000000004711541717433016251 0ustar usr/lib/mlton/targets/hppa-linux-gnu/* debian/mlton-runtime-ia64-linux-gnu.install0000644000000000000000000000004711541717433016064 0ustar usr/lib/mlton/targets/ia64-linux-gnu/* debian/heap-size0000755000000000000000000000602711611257116011007 0ustar #! /bin/bash # MLton versions around 20091019 require 650m and 1.35g to build. # Earlier MLton versions (20070812)require slightly more. # The heap size needs to leave about 200m of physical RAM free. # Plan: # 32-bit builds use 800m or 1.5g (for 1GB and >= 2GB) # 64-bit builds use 1.7g or 3g (for 2GB and >= 4GB) # Unfortunately, the debian buildds don't have that much memory # alpha - 4g (goedel) # - 8g (goetz) # amd64 - 1g (nautilus) UNUSABLE / black-listed # - 2g (excelsior, brahms) # armel -1.5g (arnold, antheil, alwyn, alain) # -0.5g (argento, arcadelt, ancina) UNUSABLE # hppa - 8g (paer) # -3.5g (penalosa, peri) # hurd-i386 # -400m (rossini) UNUSABLE / black-listed # - 1g- (bach) UNUSABLE / black-listed # - 1g+ (mozart) # i386 - 16g (murphy) # - 4g (puccini) # ia64 - 12g (mundy) # - 4g (caballero) # kfreebsd-amd64 - 2g (himalia2) # -1.5g (fano) UNUSABLE / black-listed # kfreebsd-i386 - 2g (himalia1) # - 1g (finzi) black-listed # mips - 1g (ball) # -1.4g (mayr) # mipsel - 1g (mayer) # -0.5g (rem) UNUSABLE / black-listed # powerpc -0.3g (voltaire) UNUSABLE / black-listed # -0.5g (malo) UNUSABLE / black-listed # - 3g (praetorius) # s390 - ??? (31) # - 1g (lxdebian) ... but fast swap? # sparc - 2g (schroeder, lebrun, spontini) if dpkg-architecture -ealpha; then result="fixed-heap 3g"; fi if dpkg-architecture -eamd64; then result="fixed-heap 1.7g"; fi if dpkg-architecture -earmel; then result="max-heap 1.2g"; fi if dpkg-architecture -earmhf; then result="max-heap 1.2g"; fi if dpkg-architecture -ehppa; then result="fixed-heap 1.5g"; fi if dpkg-architecture -ehurd-i386; then result="fixed-heap 800m"; fi if dpkg-architecture -ei386; then result="fixed-heap 1.5g"; fi if dpkg-architecture -eia64; then result="fixed-heap 3g"; fi if dpkg-architecture -ekfreebsd-amd64; then result="fixed-heap 1.7g"; fi if dpkg-architecture -ekfreebsd-i386; then result="fixed-heap 1.5g"; fi if dpkg-architecture -emips; then result="fixed-heap 850m"; fi if dpkg-architecture -emipsel; then result="fixed-heap 850m"; fi if dpkg-architecture -epowerpc; then result="fixed-heap 1.5g"; fi if dpkg-architecture -es390; then result="fixed-heap 850m"; fi if dpkg-architecture -esparc; then result="fixed-heap 1.5g"; fi # Warn by default if test -z "$result"; then echo "Warning: Unknown architecture." >&2; fi # Allow buildd admin to override heap-size with environment variable if test -n "$DEB_BUILD_HEAP"; then result="$DEB_BUILD_HEAP"; fi echo "$result" debian/copyright0000644000000000000000000001132511265671025011130 0ustar Now maintained by "Wesley W. Terpstra (Debian)" . This package was debianized by Stephen Weeks . The original debianization was done by Barak Pearlmutter . Upstream Authors: See http://mlton.org/Developers To send a comment, question, or bug report to MLton's authors, use MLton@mlton.org. MLton's copyright is held in part by the NEC Research Institute. It is released under a BSD-style license. MLton COPYRIGHT NOTICE, LICENSE AND DISCLAIMER. Copyright (C) 1999-2009 Henry Cejtin, Matthew Fluet, Suresh Jagannathan, and Stephen Weeks. Copyright (c) 1997-2000 by the NEC Research Institute Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both the copyright notice and this permission notice and warranty disclaimer appear in supporting documentation, and that the name of NEC, or any NEC entity not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The above copyright holders disclaim all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall the above copyright holders be liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software. The following portions of the software are derived from the Standard ML of New Jersey compiler: front-end mllex specification, front-end mlyacc specification, precedence parser, CM lexer and parser Parts of MLton's Basis Library are derived from the following portions of the Basis Library code of the SMLNJ compiler: OS.IO, Posix.IO, Process, and Unix The following utilities and libraries are derived from the SMLNJ system: mllex, mlyacc and MLYacc Library, Concurrent ML Library, SML/NJ Library, CKit Library, mlnlffigen and MLNLFFI Library SMLNJ's copyright is held by Lucent Technologies. It was released under a BSD-style license. STANDARD ML OF NEW JERSEY COPYRIGHT NOTICE, LICENSE AND DISCLAIMER. Copyright (c) 1989-1998 by Lucent Technologies Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both the copyright notice and this permission notice and warranty disclaimer appear in supporting documentation, and that the name of Lucent Technologies, Bell Labs or any Lucent entity not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Lucent disclaims all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall Lucent be liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software. Parts of MLton's Basis Library are derived from the following portions of the Basis Library code of the ML Kit compiler: Path, Time, and Date The ML Kit Basis Bibrary is distributed under the MIT License. Copyright (c) 2004 IT University of Copenhagen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. debian/control0000644000000000000000000003570211611257116010601 0ustar Source: mlton Section: devel Priority: optional Maintainer: Wesley W. Terpstra (Debian) Build-Depends: mlton (>= 20070826), libgmp-dev, htmldoc, texlive-latex-base, procps, debhelper (>= 7.0.0), cdbs (>= 0.4.52), quilt, binutils (>= 2.21.51.201104) [mips mipsel], gcc (>= 4:4.6.0-5) [mips mipsel] Standards-Version: 3.9.1 Package: mlton Architecture: all Multi-Arch: foreign Depends: ${misc:Depends}, mlton-compiler (>= ${source:Version}), mlton-compiler (<< ${source:Version}.1~), mlton-tools (>= ${source:Version}), mlton-tools (<< ${source:Version}.1~), mlton-doc (= ${source:Version}) Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This metapackage depends on all MLton packages. Package: mlton-basis Architecture: all Multi-Arch: foreign Depends: ${misc:Depends} Breaks: mlton (<< 20100608-3) Replaces: mlton (<< 20100608-3) Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - basis library MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package includes the cross-platform basis. Package: mlton-doc Section: doc Architecture: all Multi-Arch: foreign Depends: ${misc:Depends} Breaks: mlton (<< 20100608-3) Replaces: mlton (<< 20100608-3) Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - documentation MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package includes non-man-page documentation. Package: mlton-compiler Architecture: alpha amd64 armel armhf hppa hurd-i386 i386 ia64 kfreebsd-i386 kfreebsd-amd64 mips mipsel powerpc s390 sparc Multi-Arch: foreign Depends: ${shlibs:Depends}, ${misc:Depends}, gcc, libc6-dev, libgmp-dev, mlton-basis (= ${source:Version}), mlton-runtime-native (= ${binary:Version}) | mlton-runtime Breaks: mlton (<< 20100608-3) Replaces: mlton (<< 20100608-3) Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - compiler MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package includes the compiler itself. Package: mlton-tools Architecture: alpha amd64 armel armhf hppa hurd-i386 i386 ia64 kfreebsd-i386 kfreebsd-amd64 mips mipsel powerpc s390 sparc Multi-Arch: foreign Depends: ${shlibs:Depends}, ${misc:Depends} Breaks: mlton (<< 20100608-3) Replaces: mlton (<< 20100608-3) Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - tools MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package includes tools which autogenerate SML. Package: mlton-runtime-native Architecture: alpha amd64 armel armhf hppa hurd-i386 i386 ia64 kfreebsd-i386 kfreebsd-amd64 mips mipsel powerpc s390 sparc Depends: ${misc:Depends}, mlton-runtime-alpha-linux-gnu (= ${binary:Version}) [alpha] | mlton-runtime-x86-64-linux-gnu (= ${binary:Version}) [amd64] | mlton-runtime-arm-linux-gnueabi (= ${binary:Version}) [armel] | mlton-runtime-arm-linux-gnueabihf (= ${binary:Version}) [armhf] | mlton-runtime-hppa-linux-gnu (= ${binary:Version}) [hppa] | mlton-runtime-i486-gnu (= ${binary:Version}) [hurd-i386] | mlton-runtime-i486-linux-gnu (= ${binary:Version}) [i386] | mlton-runtime-ia64-linux-gnu (= ${binary:Version}) [ia64] | mlton-runtime-i486-kfreebsd-gnu (= ${binary:Version}) [kfreebsd-i386] | mlton-runtime-x86-64-kfreebsd-gnu (= ${binary:Version}) [kfreebsd-amd64] | mlton-runtime-mips-linux-gnu (= ${binary:Version}) [mips] | mlton-runtime-mipsel-linux-gnu (= ${binary:Version}) [mipsel] | mlton-runtime-powerpc-linux-gnu (= ${binary:Version}) [powerpc] | mlton-runtime-s390-linux-gnu (= ${binary:Version}) [s390] | mlton-runtime-sparc-linux-gnu (= ${binary:Version}) [sparc] Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - native runtime libraries MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This metapackage depends on native target libraries. Package: mlton-runtime-alpha-linux-gnu Architecture: alpha Multi-Arch: foreign Depends: ${misc:Depends}, mlton-basis (= ${source:Version}) Provides: mlton-runtime Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - alpha runtime libraries MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package provides alpha target libraries. Package: mlton-runtime-x86-64-linux-gnu Architecture: amd64 Multi-Arch: foreign Depends: ${misc:Depends}, mlton-basis (= ${source:Version}) Provides: mlton-runtime Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - amd64 runtime libraries MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package provides x86-64 target libraries. Package: mlton-runtime-arm-linux-gnueabi Architecture: armel Multi-Arch: foreign Depends: ${misc:Depends}, mlton-basis (= ${source:Version}) Provides: mlton-runtime Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - armel runtime libraries MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package provides arm target libraries. Package: mlton-runtime-arm-linux-gnueabihf Architecture: armhf Multi-Arch: foreign Depends: ${misc:Depends}, mlton-basis (= ${source:Version}) Provides: mlton-runtime Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - armhf runtime libraries MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package provides armhf target libraries. Package: mlton-runtime-hppa-linux-gnu Architecture: hppa Multi-Arch: foreign Depends: ${misc:Depends}, mlton-basis (= ${source:Version}) Provides: mlton-runtime Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - hppa runtime libraries MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package provides hppa target libraries. Package: mlton-runtime-i486-gnu Architecture: hurd-i386 Multi-Arch: foreign Depends: ${misc:Depends}, mlton-basis (= ${source:Version}) Provides: mlton-runtime Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - hurd-i386 runtime libraries MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package provides hurd i486 target libraries. Package: mlton-runtime-i486-linux-gnu Architecture: i386 Multi-Arch: foreign Depends: ${misc:Depends}, mlton-basis (= ${source:Version}) Provides: mlton-runtime Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - i386 runtime libraries MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package provides i486 target libraries. Package: mlton-runtime-ia64-linux-gnu Architecture: ia64 Multi-Arch: foreign Depends: ${misc:Depends}, mlton-basis (= ${source:Version}) Provides: mlton-runtime Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - ia64 runtime libraries MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package provides ia64 target libraries. Package: mlton-runtime-i486-kfreebsd-gnu Architecture: kfreebsd-i386 Multi-Arch: foreign Depends: ${misc:Depends}, mlton-basis (= ${source:Version}) Provides: mlton-runtime Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - kfreebsd-i386 runtime libraries MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package provides kfreebsd i386 target libraries. Package: mlton-runtime-x86-64-kfreebsd-gnu Architecture: kfreebsd-amd64 Multi-Arch: foreign Depends: ${misc:Depends}, mlton-basis (= ${source:Version}) Provides: mlton-runtime Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - kfreebsd-amd64 runtime libraries MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package provides kfreebsd amd64 target libraries. Package: mlton-runtime-mips-linux-gnu Architecture: mips Multi-Arch: foreign Depends: ${misc:Depends}, mlton-basis (= ${source:Version}) Provides: mlton-runtime Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - mips runtime libraries MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package provides mips target libraries. Package: mlton-runtime-mipsel-linux-gnu Architecture: mipsel Multi-Arch: foreign Depends: ${misc:Depends}, mlton-basis (= ${source:Version}) Provides: mlton-runtime Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - mipsel runtime libraries MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package provides mipsel target libraries. Package: mlton-runtime-powerpc-linux-gnu Architecture: powerpc Multi-Arch: foreign Depends: ${misc:Depends}, mlton-basis (= ${source:Version}) Provides: mlton-runtime Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - powerpc runtime libraries MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package provides powerpc target libraries. Package: mlton-runtime-s390-linux-gnu Architecture: s390 Multi-Arch: foreign Depends: ${misc:Depends}, mlton-basis (= ${source:Version}) Provides: mlton-runtime Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - s390 runtime libraries MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package provides s390 target libraries. Package: mlton-runtime-sparc-linux-gnu Architecture: sparc Multi-Arch: foreign Depends: ${misc:Depends}, mlton-basis (= ${source:Version}) Provides: mlton-runtime Homepage: http://mlton.org/ Description: Optimizing compiler for Standard ML - sparc runtime libraries MLton is a whole-program optimizing compiler for Standard ML. MLton generates standalone executables with excellent runtime performance, is SML 97 compliant, and has a complete basis library. MLton has source-level profiling, a fast C FFI, an interface to the GNU multiprecision library, and lots of useful libraries. . This package provides sparc target libraries. debian/README.Debian0000644000000000000000000000300711265671025011234 0ustar mlton for Debian ---------------- NOTE TO PORTERS AND AUTOBUILDERS MLton is self-hosting, ie building MLton requires a working ML compiler, and the Makefiles assume that this is MLton itself. This means MLton build-depends upon itself. Please don't whine about this fact (eg file bugs) unless you have something constructive to suggest. You can build MLton with older versions of itself, as long as the command-line switches haven't changed too much. You can also bootstrap with SML/NJ. See the User Guide for details. It is easy enough to manually build: fetch the latest linux binary tgz from www.mlton.org, symbolic link the binaries it contains into /usr/bin/ and its library directory as /usr/lib/mlton, and you're good to go. HARDWARE REQUIREMENTS Compiling MLton requires at least 1024M of actual RAM. Thus, if your machine has less than this, it is likely that self-compilation will take a very long time due to paging. Even if you have enough memory, there simply may not be enough available, due to memory consumed by other processes. In this case, you may see an ``Out of memory'' message, or self-compilation may become extremely slow. The only fix is to make sure that enough memory is available. Now, get out there and have a MLton of fun! -- Barak Pearlmutter , Fri, 12 Oct 2001 11:31:16 -0600 -- Stephen Weeks , Fri, 11 Jul 2003 12:27:26 -0700 -- Wesley W. Terpstra (Debian) , Tue, 13 Oct 2009 03:47:12 +0200 debian/mlton-runtime-i486-kfreebsd-gnu.install0000644000000000000000000000005211541717433016435 0ustar usr/lib/mlton/targets/i486-kfreebsd-gnu/* debian/mlton-tools.install0000644000000000000000000000037311541500301013036 0ustar usr/bin/mllex usr/bin/mlyacc usr/bin/mlprof usr/bin/mlnlffigen usr/share/man/man1/mllex.1.gz usr/share/man/man1/mlyacc.1.gz usr/share/man/man1/mlprof.1.gz usr/share/man/man1/mlnlffigen.1.gz usr/share/doc/mlton/mllex.pdf usr/share/doc/mlton/mlyacc.pdf debian/mlton-doc.lintian-overrides0000644000000000000000000000014411541457001014437 0ustar # This is a part of the wiki manual mlton-doc: extra-license-file usr/share/doc/mlton/guide/License debian/mlton-runtime-mipsel-linux-gnu.install0000644000000000000000000000005111541717433016605 0ustar usr/lib/mlton/targets/mipsel-linux-gnu/* debian/mlton-runtime-s390-linux-gnu.install0000644000000000000000000000004711541717433016017 0ustar usr/lib/mlton/targets/s390-linux-gnu/* debian/mlton-doc.install0000644000000000000000000000041211541500301012435 0ustar usr/share/doc/mlton/examples usr/share/doc/mlton/guide usr/share/doc/mlton/cmcat usr/share/doc/mlton/cm2mlb usr/share/doc/mlton/ckit-lib usr/share/doc/mlton/mlnlffi-lib usr/share/doc/mlton/mlrisc-lib usr/share/doc/mlton/smlnj-lib usr/share/doc/mlton/mlton-guide.pdf debian/mlton-runtime-sparc-linux-gnu.install0000644000000000000000000000005011545417363016426 0ustar usr/lib/mlton/targets/sparc-linux-gnu/* debian/mlton-runtime-mips-linux-gnu.install0000644000000000000000000000004711541717433016271 0ustar usr/lib/mlton/targets/mips-linux-gnu/* debian/mlton-tools.doc-base.mlyacc0000644000000000000000000000037311541376114014331 0ustar Document: mlyacc Title: ML-Yacc User's Manual Author: David R. Tarditi, Andrew W. Appel Abstract: This document describes how to write parser specification files for mlyacc. Section: Programming Format: PDF Files: /usr/share/doc/mlton/mlyacc.pdf.gz debian/source/0000755000000000000000000000000011611265534010472 5ustar debian/source/format0000644000000000000000000000001411366334762011707 0ustar 3.0 (quilt) debian/mlton-doc.doc-base.mlton0000644000000000000000000000046011541376114013614 0ustar Document: mlton Title: MLton Guide Author: The MLton Team Abstract: This document describes how to use MLton, a whole-program optimizing compiler for the Standard ML Programming language. Section: Programming Format: HTML Index: /usr/share/doc/mlton/guide/Home Files: /usr/share/doc/mlton/guide/*.html debian/mlton-compiler.install0000644000000000000000000000025511541457001013517 0ustar usr/bin/mlton usr/lib/mlton/mlton-compile usr/lib/mlton/static-library usr/lib/mlton/platform usr/lib/mlton/opcodes usr/lib/mlton/targets/self usr/share/man/man1/mlton.1.gz debian/patches/0000755000000000000000000000000012230541554010616 5ustar debian/patches/22-fixes-20110319-to-20110719.patch0000644000000000000000000012373511611270730015426 0ustar --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,20 @@ Here are the changes from version 2010608 to version YYYYMMDD. +* 2011-06-14 + - Fixed bug in SSA/SSA2 shrinker that could erroneously turn a + non-tail function call with a Bug transfer as its continuation + into a tail function call. + +* 2011-06-10 + - Fixed bug in translation from SSA2 to RSSA with case expressions + over non-primitive-sized words. + - Fixed bug in SSA/SSA2 type checking of case expressions over + words. + +* 2011-05-03 + - Fixed a bug with the treatment of as-patterns, which should not + allow the redefinition of constructor status. + * 2011-02-18 - Fixed bug with treatment of nan in common subexpression elimination SSA optimization. --- a/doc/examples/finalizable/finalizable.sml +++ b/doc/examples/finalizable/finalizable.sml @@ -8,15 +8,16 @@ end functor CList (structure F: MLTON_FINALIZABLE + structure P: MLTON_POINTER structure Prim: sig - val cons: int * Word32.word -> Word32.word - val free: Word32.word -> unit - val sing: int -> Word32.word - val sum: Word32.word -> int + val cons: int * P.t -> P.t + val free: P.t -> unit + val sing: int -> P.t + val sum: P.t -> int end): CLIST = struct - type t = Word32.word F.t + type t = P.t F.t fun cons (n: int, l: t) = F.withValue @@ -77,12 +78,13 @@ structure CList = CList (structure F = MLton.Finalizable + structure P = MLton.Pointer structure Prim = struct - val cons = _import "listCons": int * Word32.word -> Word32.word; - val free = _import "listFree": Word32.word -> unit; - val sing = _import "listSing": int -> Word32.word; - val sum = _import "listSum": Word32.word -> int; + val cons = _import "listCons": int * P.t -> P.t; + val free = _import "listFree": P.t -> unit; + val sing = _import "listSing": int -> P.t; + val sum = _import "listSum": P.t -> int; end) structure S = Test (structure CList = CList --- a/ide/enscript/sml_all.st +++ b/ide/enscript/sml_all.st @@ -88,6 +88,11 @@ */ state sml_string { + /\\\\(\s|\n)/ { + language_print ($0); + call (sml_string_gap); + } + /\\\\./ { language_print ($0); } @@ -96,6 +101,22 @@ language_print ($0); return; } + + LANGUAGE_SPECIALS { + language_print ($0); + } +} + +state sml_string_gap +{ + /(\s|\n)/ { + language_print ($0); + } + + /\\\\/ { + language_print ($0); + return; + } LANGUAGE_SPECIALS { language_print ($0); --- a/ide/enscript/sml_simple.st +++ b/ide/enscript/sml_simple.st @@ -77,6 +77,11 @@ */ state sml_string extends Highlight { + /\\\\(\s|\n)/ { + language_print ($0); + call (sml_string_gap); + } + /\\\\./ { language_print ($0); } @@ -85,6 +90,18 @@ language_print ($0); return; } +} + +state sml_string_gap extends Highlight +{ + /(\s|\n)/ { + language_print ($0); + } + + /\\\\/ { + language_print ($0); + return; + } } /* --- a/mllex/lexgen.sml +++ b/mllex/lexgen.sml @@ -1,3 +1,6 @@ +(* Modified by Matthew Fluet on 2011-06-17. + * Use simple file name (rather than absolute paths) in line directives in output. + *) (* Modified by Vesa Karvonen on 2007-12-19. * Create line directives in output. *) @@ -295,7 +298,7 @@ val OutFile = ref "" fun fmtLineDir {line, col} file = String.concat ["(*#line ", Int.toString line, ".", Int.toString (col+1), - " \"", OS.FileSys.fullPath file, "\"*)"] + " \"", file, "\"*)"] val sayPos = fn SOME pos => say (fmtLineDir pos (!InFile)) | NONE => (say (fmtLineDir {line = !LexOutLine, col = 0} (!OutFile)); @@ -1284,7 +1287,7 @@ fun lexGen(infile) = let val outfile = infile ^ ".sml" - val () = (InFile := infile; OutFile := outfile) + val () = (InFile := OS.Path.file infile; OutFile := OS.Path.file outfile) fun PrintLexer (ends) = let val sayln = fn x => (say x; say "\n") in case !ArgCode --- a/mlton/backend/ssa-to-rssa.fun +++ b/mlton/backend/ssa-to-rssa.fun @@ -599,12 +599,18 @@ src = Operand.word (WordX.one cardElemSize)}] end +fun convertWordSize (ws: WordSize.t): WordSize.t = + WordSize.roundUpToPrim ws + +fun convertWordX (w: WordX.t): WordX.t = + WordX.resize (w, convertWordSize (WordX.size w)) + fun convertConst (c: Const.t): Const.t = let datatype z = datatype Const.t in case c of - Word w => Word (WordX.resize (w, WordSize.roundUpToPrim (WordX.size w))) + Word w => Word (convertWordX w) | _ => c end @@ -688,16 +694,21 @@ (ss, t) end | _ => Error.bug "SsaToRssa.translateCase: strange type")) - | S.Cases.Word (s, cs) => - ([], - Switch - (Switch.T - {cases = (QuickSort.sortVector - (cs, fn ((w, _), (w', _)) => - WordX.le (w, w', {signed = false}))), - default = default, - size = s, - test = varOp test})) + | S.Cases.Word (s, cases) => + let + val cases = + QuickSort.sortVector + (Vector.map (cases, fn (w, l) => (convertWordX w, l)), + fn ((w, _), (w', _)) => WordX.le (w, w', {signed = false})) + in + ([], + Switch + (Switch.T + {cases = cases, + default = default, + size = convertWordSize s, + test = varOp test})) + end fun eta (l: Label.t, kind: Kind.t): Label.t = let val {args, ...} = labelInfo l --- a/mlton/control/source.sml +++ b/mlton/control/source.sml @@ -1,4 +1,5 @@ -(* Copyright (C) 1999-2006, 2008 Henry Cejtin, Matthew Fluet, Suresh +(* Copyright (C) 2011 Matthew Fluet. + * Copyright (C) 1999-2006, 2008 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * Copyright (C) 1997-2000 NEC Research Institute. * @@ -11,7 +12,8 @@ datatype t = T of {file: File.t ref, lineNum: int ref, - lineStart: int ref} + lineStart: int ref, + origDir: Dir.t} fun getPos (T {file, lineNum, lineStart, ...}, n) = SourcePos.make {column = n - !lineStart, @@ -20,10 +22,18 @@ fun lineStart (s as T {lineStart, ...}) = getPos (s, !lineStart) -fun lineDirective (T {file, lineNum, lineStart}, +fun lineDirective (T {file, lineNum, lineStart, origDir}, f, {lineNum = n, lineStart = s}) = - (Option.app (f, fn f => file := f) + (Option.app (f, fn f => + let + val f = + if OS.Path.isAbsolute f + then f + else OS.Path.mkCanonical (OS.Path.concat (origDir, f)) + in + file := f + end) ; lineNum := n ; lineStart := s) @@ -34,7 +44,8 @@ * starts at position ~1, which will translate position 0 to * column 1. *) - lineStart = ref ~1} + lineStart = ref ~1, + origDir = File.dirOf file} fun newline (T {lineStart, lineNum, ...}, n) = (Int.inc lineNum --- a/mlton/core-ml/dead-code.fun +++ b/mlton/core-ml/dead-code.fun @@ -1,4 +1,5 @@ -(* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh +(* Copyright (C) 2011 Matthew Fluet. + * Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * Copyright (C) 1997-2000 NEC Research Institute. * @@ -24,7 +25,7 @@ then escape true else ()) ; false)) - fun decIsWild (d: Dec.t): bool = + fun decIsWildOrUnit (d: Dec.t): bool = case d of Val {rvbs, vbs, ...} => 0 = Vector.length rvbs @@ -43,7 +44,6 @@ | Val {rvbs, vbs, ...} => Vector.exists (rvbs, varIsUsed o #var) orelse Vector.exists (vbs, patVarIsUsed o #pat) - orelse decIsWild d fun useVar x = setVarIsUsed (x, true) fun useExp (e: Exp.t): unit = Exp.foreachVar (e, useVar) fun useLambda (l: Lambda.t): unit = @@ -66,7 +66,7 @@ in if deadCode then List.fold (rev decs, [], fn (dec, decs) => - if decIsWild dec orelse decIsNeeded dec + if decIsWildOrUnit dec orelse decIsNeeded dec then (useDec dec; dec :: decs) else decs) else (List.foreach (decs, useDec) --- a/mlton/elaborate/elaborate-core.fun +++ b/mlton/elaborate/elaborate-core.fun @@ -1,4 +1,4 @@ -(* Copyright (C) 2009-2010 Matthew Fluet. +(* Copyright (C) 2009-2011 Matthew Fluet. * Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * Copyright (C) 1997-2000 NEC Research Institute. @@ -556,7 +556,21 @@ case constraint of NONE => Type.new () | SOME t => elaborateType (t, Lookup.fromEnv E) - val x = bindToType (x, t) + val xc = Avid.toCon (Avid.fromVar x) + val x = + case Env.peekLongcon (E, Ast.Longcon.short xc) of + NONE => bindToType (x, t) + | SOME _ => + let + val _ = + Control.error + (region, + seq [str "constructor can not be redefined by as: ", + Avar.layout x], + seq [str "in: ", lay ()]) + in + Var.fromAst x + end val pat' = loop pat val _ = unifyPatternConstraint (Cpat.ty pat', --- a/mlton/main/main.fun +++ b/mlton/main/main.fun @@ -188,8 +188,10 @@ case !Control.Target.arch of Alpha => true | AMD64 => true + | ARM => true | HPPA => true | IA64 => true + | MIPS => true | Sparc => true | S390 => true | _ => false --- a/mlton/ssa/analyze.fun +++ b/mlton/ssa/analyze.fun @@ -1,4 +1,5 @@ -(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh +(* Copyright (C) 2011 Matthew Fluet. + * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * Copyright (C) 1997-2000 NEC Research Institute. * @@ -126,23 +127,34 @@ end | Case {test, cases, default, ...} => - let val test = value test + let + val test = value test fun ensureNullary j = if 0 = Vector.length (labelValues j) then () else Error.bug (concat ["Analyze.loopTransfer: Case:", Label.toString j, " must be nullary"]) - fun doit (s, cs, filter: 'a * 'b -> unit) = - (filter (test, s) - ; Vector.foreach (cs, fn (_, j) => ensureNullary j)) + fun ensureSize (w, s) = + if WordSize.equals (s, WordX.size w) + then () + else Error.bug (concat ["Analyze.loopTransfer: Case:", + WordX.toString w, + " must be size ", + WordSize.toString s]) + fun doitWord (s, cs) = + (ignore (filterWord (test, s)) + ; Vector.foreach (cs, fn (w, j) => + (ensureSize (w, s) + ; ensureNullary j))) + fun doitCon cs = + Vector.foreach (cs, fn (c, j) => + filter (test, c, labelValues j)) datatype z = datatype Cases.t val _ = case cases of - Con cases => - Vector.foreach (cases, fn (c, j) => - filter (test, c, labelValues j)) - | Word (s, cs) => doit (s, cs, filterWord) + Con cs => doitCon cs + | Word (s, cs) => doitWord (s, cs) val _ = Option.app (default, ensureNullary) in () end --- a/mlton/ssa/analyze2.fun +++ b/mlton/ssa/analyze2.fun @@ -1,4 +1,5 @@ -(* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh +(* Copyright (C) 2011 Matthew Fluet. + * Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * Copyright (C) 1997-2000 NEC Research Institute. * @@ -123,35 +124,46 @@ end | Case {test, cases, default, ...} => - let val test = value test + let + val test = value test + fun ensureSize (w, s) = + if WordSize.equals (s, WordX.size w) + then () + else Error.bug (concat ["Analyze.loopTransfer: Case:", + WordX.toString w, + " must be size ", + WordSize.toString s]) fun ensureNullary j = if 0 = Vector.length (labelValues j) then () else Error.bug (concat ["Analyze2.loopTransfer: Case:", Label.toString j, " must be nullary"]) - fun doit (s, cs, filter: 'a * 'b -> unit) = - (filter (test, s) - ; Vector.foreach (cs, fn (_, j) => ensureNullary j)) + fun doitWord (s, cs) = + (ignore (filterWord (test, s)) + ; Vector.foreach (cs, fn (w, j) => + (ensureSize (w, s) + ; ensureNullary j))) + fun doitCon cs = + Vector.foreach + (cs, fn (c, j) => + let + val v = labelValues j + val variant = + case Vector.length v of + 0 => NONE + | 1 => SOME (Vector.sub (v, 0)) + | _ => Error.bug "Analyze2.loopTransfer: Case:conApp with >1 arg" + in + filter {con = c, + test = test, + variant = variant} + end) datatype z = datatype Cases.t val _ = case cases of - Con cases => - Vector.foreach - (cases, fn (c, j) => - let - val v = labelValues j - val variant = - case Vector.length v of - 0 => NONE - | 1 => SOME (Vector.sub (v, 0)) - | _ => Error.bug "Analyze2.loopTransfer: Case:conApp with >1 arg" - in - filter {con = c, - test = test, - variant = variant} - end) - | Word (s, cs) => doit (s, cs, filterWord) + Con cs => doitCon cs + | Word (s, cs) => doitWord (s, cs) val _ = Option.app (default, ensureNullary) in () end --- a/mlton/ssa/shrink.fun +++ b/mlton/ssa/shrink.fun @@ -1,4 +1,4 @@ -(* Copyright (C) 2009 Matthew Fluet. +(* Copyright (C) 2009,2011 Matthew Fluet. * Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * Copyright (C) 1997-2000 NEC Research Institute. @@ -460,7 +460,17 @@ Goto {canMove = canMove', dst = m, args = ps} - | Bug => Bug + | Bug => + if (case returns of + NONE => true + | SOME ts => + Vector.equals + (ts, args, fn (t, (_, t')) => + Type.equals (t, t'))) + then Bug + else Goto {canMove = canMove', + dst = m, + args = ps} | Case _ => Goto {canMove = canMove', dst = m, @@ -707,7 +717,7 @@ Transfer.layout)) val traceSimplifyCase = Trace.trace - ("Ssa2.Shrink2.simplifyCase", + ("Ssa.Shrink2.simplifyCase", fn {canMove, cases, default, test, ...} => Layout.record [("canMove", List.layout Statement.layout canMove), ("cantSimplify", Layout.str "fn () => ..."), --- a/mlton/ssa/shrink2.fun +++ b/mlton/ssa/shrink2.fun @@ -1,4 +1,4 @@ -(* Copyright (C) 2009 Matthew Fluet. +(* Copyright (C) 2009,2011 Matthew Fluet. * Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * Copyright (C) 1997-2000 NEC Research Institute. @@ -465,8 +465,18 @@ Goto {canMove = canMove', dst = m, args = ps} - | Bug => Bug - | Case _ => + | Bug => + if (case returns of + NONE => true + | SOME ts => + Vector.equals + (ts, args, fn (t, (_, t')) => + Type.equals (t, t'))) + then Bug + else Goto {canMove = canMove', + dst = m, + args = ps} + | Case _ => Goto {canMove = canMove', dst = m, args = ps} --- a/mlton/ssa/type-check.fun +++ b/mlton/ssa/type-check.fun @@ -1,4 +1,4 @@ -(* Copyright (C) 2009 Matthew Fluet. +(* Copyright (C) 2009,2011 Matthew Fluet. * Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * Copyright (C) 1997-2000 NEC Research Institute. @@ -48,7 +48,7 @@ end val (bindTycon, getTycon, getTycon', _) = make' (Tycon.layout, Tycon.plist) - val (bindCon, getCon, getCon', _) = make' (Con.layout, Con.plist) + val (bindCon, getCon, _) = make (Con.layout, Con.plist) val (bindVar, getVar, getVar', unbindVar) = make' (Var.layout, Var.plist) fun getVars xs = Vector.foreach (xs, getVar) val (bindLabel, getLabel, unbindLabel) = make (Label.layout, Label.plist) @@ -110,57 +110,47 @@ let fun doit (cases: ('a * 'b) vector, equals: 'a * 'a -> bool, - toWord: 'a -> word): unit = + hash: 'a -> word, + numExhaustiveCases: IntInf.t) = let - val table = HashSet.new {hash = toWord} + val table = HashSet.new {hash = hash} val _ = Vector.foreach (cases, fn (x, _) => let - val _ = + val _ = HashSet.insertIfNew - (table, toWord x, fn y => equals (x, y), - fn () => x, + (table, hash x, fn y => equals (x, y), + fn () => x, fn _ => Error.bug "Ssa.TypeCheck.loopTransfer: redundant branch in case") in () end) + val numCases = Int.toIntInf (Vector.length cases) in - if isSome default - then () - else Error.bug "Ssa.TypeCheck.loopTransfer: case has no default" + case (IntInf.equals (numCases, numExhaustiveCases), isSome default) of + (true, true) => + Error.bug "Ssa.TypeCheck.loopTransfer: exhaustive case has default" + | (false, false) => + Error.bug "Ssa.TypeCheck.loopTransfer: non-exhaustive case has no default" + | _ => () end + fun doitWord (ws, cases) = + doit (cases, WordX.equals, WordX.hash, WordSize.cardinality ws) fun doitCon cases = let - val numCons = + val numExhaustiveCases = case Type.dest (getVar' test) of - Type.Datatype t => getTycon' t + Type.Datatype t => Int.toIntInf (getTycon' t) | _ => Error.bug "Ssa.TypeCheck.loopTransfer: case test is not a datatype" - val cons = Array.array (numCons, false) - val _ = - Vector.foreach - (cases, fn (con, _) => - let - val i = getCon' con - in - if Array.sub (cons, i) - then Error.bug "Ssa.TypeCheck.loopTransfer: redundant branch in case" - else Array.update (cons, i, true) - end) in - case (Array.forall (cons, fn b => b), isSome default) of - (true, true) => - Error.bug "Ssa.TypeCheck.loopTransfer: exhaustive case has default" - | (false, false) => - Error.bug "Ssa.TypeCheck.loopTransfer: non-exhaustive case has no default" - | _ => () + doit (cases, Con.equals, Con.hash, numExhaustiveCases) end val _ = getVar test val _ = case cases of Cases.Con cs => doitCon cs - | Cases.Word (_, cs) => - doit (cs, WordX.equals, Word.fromIntInf o WordX.toIntInf) + | Cases.Word (ws, cs) => doitWord (ws, cs) in () end @@ -211,11 +201,11 @@ val _ = Vector.foreach (datatypes, fn Datatype.T {tycon, cons} => (bindTycon (tycon, Vector.length cons) - ; Vector.foreachi (cons, fn (i, {con, ...}) => - bindCon (con, i)))) + ; Vector.foreach (cons, fn {con, ...} => + bindCon con))) val _ = Vector.foreach (datatypes, fn Datatype.T {cons, ...} => - Vector.foreach (cons, fn {args, ...} => + Vector.foreach (cons, fn {args, ...} => Vector.foreach (args, loopType))) val _ = Vector.foreach (globals, loopStatement) val _ = List.foreach (functions, bindFunc o Function.name) --- a/mlton/ssa/type-check2.fun +++ b/mlton/ssa/type-check2.fun @@ -1,4 +1,4 @@ -(* Copyright (C) 2009 Matthew Fluet. +(* Copyright (C) 2009,2011 Matthew Fluet. * Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * Copyright (C) 1997-2000 NEC Research Institute. @@ -49,7 +49,7 @@ end val (bindTycon, getTycon, getTycon', _) = make' (Tycon.layout, Tycon.plist) - val (bindCon, getCon, getCon', _) = make' (Con.layout, Con.plist) + val (bindCon, getCon, _) = make (Con.layout, Con.plist) val (bindVar, getVar, getVar', unbindVar) = make' (Var.layout, Var.plist) fun getVars xs = Vector.foreach (xs, getVar) val (bindFunc, getFunc, _) = make (Func.layout, Func.plist) @@ -134,60 +134,47 @@ let fun doit (cases: ('a * 'b) vector, equals: 'a * 'a -> bool, - toWord: 'a -> word): unit = + hash: 'a -> word, + numExhaustiveCases: IntInf.t) = let - val table = HashSet.new {hash = toWord} + val table = HashSet.new {hash = hash} val _ = Vector.foreach (cases, fn (x, _) => let - val _ = + val _ = HashSet.insertIfNew - (table, toWord x, fn y => equals (x, y), - fn () => x, - fn _ => Error.bug "Ssa2.TypeCheck2.loopTransfer: redundant branch in case") + (table, hash x, fn y => equals (x, y), + fn () => x, + fn _ => Error.bug "Ssa.TypeCheck.loopTransfer: redundant branch in case") in () end) + val numCases = Int.toIntInf (Vector.length cases) in - if isSome default - then () - else Error.bug "Ssa2.TypeCheck2.loopTransfer: case has no default" + case (IntInf.equals (numCases, numExhaustiveCases), isSome default) of + (true, true) => + Error.bug "Ssa.TypeCheck.loopTransfer: exhaustive case has default" + | (false, false) => + Error.bug "Ssa.TypeCheck.loopTransfer: non-exhaustive case has no default" + | _ => () end + fun doitWord (ws, cases) = + doit (cases, WordX.equals, WordX.hash, WordSize.cardinality ws) fun doitCon cases = let - val numCons = + val numExhaustiveCases = case Type.dest (getVar' test) of - Type.Datatype t => getTycon' t - | _ => Error.bug (concat - ["Ssa2.TypeCheck2.loopTransfer: case test ", - Var.toString test, - " is not a datatype"]) - val cons = Array.array (numCons, false) - val _ = - Vector.foreach - (cases, fn (con, _) => - let - val i = getCon' con - in - if Array.sub (cons, i) - then Error.bug "Ssa2.TypeCheck2.loopTransfer: redundant branch in case" - else Array.update (cons, i, true) - end) + Type.Datatype t => Int.toIntInf (getTycon' t) + | _ => Error.bug "Ssa.TypeCheck.loopTransfer: case test is not a datatype" in - case (Array.forall (cons, fn b => b), isSome default) of - (true, true) => - Error.bug "Ssa2.TypeCheck2.loopTransfer: exhaustive case has default" - | (false, false) => - Error.bug "Ssa2.TypeCheck2.loopTransfer: non-exhaustive case has no default" - | _ => () + doit (cases, Con.equals, Con.hash, numExhaustiveCases) end val _ = getVar test val _ = case cases of Cases.Con cs => doitCon cs - | Cases.Word (_, cs) => - doit (cs, WordX.equals, Word.fromIntInf o WordX.toIntInf) + | Cases.Word (ws, cs) => doitWord (ws, cs) in () end @@ -238,11 +225,11 @@ val _ = Vector.foreach (datatypes, fn Datatype.T {tycon, cons} => (bindTycon (tycon, Vector.length cons) - ; Vector.foreachi (cons, fn (i, {con, ...}) => - bindCon (con, i)))) + ; Vector.foreach (cons, fn {con, ...} => + bindCon con))) val _ = Vector.foreach (datatypes, fn Datatype.T {cons, ...} => - Vector.foreach (cons, fn {args, ...} => + Vector.foreach (cons, fn {args, ...} => Prod.foreach (args, loopType))) val _ = Vector.foreach (globals, loopStatement) val _ = List.foreach (functions, bindFunc o Function.name) --- a/mlyacc/src/yacc.sml +++ b/mlyacc/src/yacc.sml @@ -1,3 +1,6 @@ +(* Modified by Matthew Fluet on 2011-06-17. + * Use simple file name (rather than absolute paths) in line directives in output. + *) (* Modified by Vesa Karvonen on 2007-12-18. * Create line directives in output. *) @@ -777,8 +780,8 @@ in let val result = TextIO.openOut (spec ^ ".sml") val sigs = TextIO.openOut (spec ^ ".sig") - val specPath = OS.FileSys.fullPath spec - val resultPath = OS.FileSys.fullPath (spec ^ ".sml") + val specFile = OS.Path.file spec + val resultFile = specFile ^ ".sml" val line = ref 1 val col = ref 0 val pr = fn s => TextIO.output(result,s) @@ -793,8 +796,8 @@ String.concat ["(*#line ", Int.toString line, ".", Int.toString (col+1), " \"", path, "\"*)"] val fmtPos = - fn NONE => (fmtLineDir {line = !line, col = 0} resultPath) ^ "\n" - | SOME pos => fmtLineDir pos specPath + fn NONE => (fmtLineDir {line = !line, col = 0} resultFile) ^ "\n" + | SOME pos => fmtLineDir pos specFile val termvoid = makeUniqueId "VOID" val ntvoid = makeUniqueId "ntVOID" val hasType = fn s => case symbolType s --- /dev/null +++ b/regression/weird-word1.ok @@ -0,0 +1 @@ +0wx8 --- /dev/null +++ b/regression/weird-word1.sml @@ -0,0 +1,26 @@ +fun fib (w: Word5.word) : Word5.word = + if w <= 0wx1 + then 0wx1 + else fib (w - 0wx1) + fib (w - 0wx2) + +val s = + case (fib 0wx5) of + 0wx0 => "0wx0" + | 0wx1 => "0wx1" + | 0wx2 => "0wx2" + | 0wx3 => "0wx3" + | 0wx4 => "0wx4" + | 0wx5 => "0wx5" + | 0wx6 => "0wx6" + | 0wx7 => "0wx7" + | 0wx8 => "0wx8" + | 0wx9 => "0wx9" + | 0wxA => "0wxA" + | 0wxB => "0wxB" + | 0wxC => "0wxC" + | 0wxD => "0wxD" + | 0wxE => "0wxE" + | 0wxF => "0wxF" + | _ => "zzz" + +val _ = print (concat [s, "\n"]) --- /dev/null +++ b/regression/weird-word2.ok @@ -0,0 +1 @@ +0wx8 --- /dev/null +++ b/regression/weird-word2.sml @@ -0,0 +1,41 @@ +fun fib (w: Word5.word) : Word5.word = + if w <= 0wx1 + then 0wx1 + else fib (w - 0wx1) + fib (w - 0wx2) + +val s = + case (fib 0wx5) of + 0wx0 => "0wx0" + | 0wx1 => "0wx1" + | 0wx2 => "0wx2" + | 0wx3 => "0wx3" + | 0wx4 => "0wx4" + | 0wx5 => "0wx5" + | 0wx6 => "0wx6" + | 0wx7 => "0wx7" + | 0wx8 => "0wx8" + | 0wx9 => "0wx9" + | 0wxA => "0wxA" + | 0wxB => "0wxB" + | 0wxC => "0wxC" + | 0wxD => "0wxD" + | 0wxE => "0wxE" + | 0wxF => "0wxF" + | 0wx10 => "0wx10" + | 0wx11 => "0wx11" + | 0wx12 => "0wx12" + | 0wx13 => "0wx13" + | 0wx14 => "0wx14" + | 0wx15 => "0wx15" + | 0wx16 => "0wx16" + | 0wx17 => "0wx17" + | 0wx18 => "0wx18" + | 0wx19 => "0wx19" + | 0wx1A => "0wx1A" + | 0wx1B => "0wx1B" + | 0wx1C => "0wx1C" + | 0wx1D => "0wx1D" + | 0wx1E => "0wx1E" + | 0wx1F => "0wx1F" + +val _ = print (concat [s, "\n"]) --- a/runtime/basis/MLton/bug.c +++ b/runtime/basis/MLton/bug.c @@ -4,9 +4,7 @@ void MLton_bug (String8_t msg) { uintmax_t size = GC_getArrayLength ((pointer)msg); fprintf (stderr, "MLton bug: "); - unless (0 == size) - while (1 != fwrite ((const void*)msg, (size_t)size, 1, stderr)) - /* nothing */; + fwrite ((const void*)msg, (size_t)size, 1, stderr); fprintf (stderr, "\nPlease send a bug report to MLton@mlton.org.\n"); exit (2); } --- a/runtime/basis/Posix/Signal.c +++ b/runtime/basis/Posix/Signal.c @@ -104,7 +104,7 @@ } void Posix_Signal_sigsuspend (void) { - int res; + int __attribute__ ((unused)) res; res = sigsuspend (&Posix_Signal_sigset); assert (-1 == res); --- a/runtime/basis/Real/gdtoa.c +++ b/runtime/basis/Real/gdtoa.c @@ -14,10 +14,8 @@ int i; ULong L[1]; char *result; - ULong sign; memcpy(L, &f, sizeof(Real32_t)); - sign = L[0] & 0x80000000L; bits[0] = L[0] & 0x7fffff; if (0 != (ex = (L[0] >> 23) & 0xff)) bits[0] |= 0x800000; @@ -40,7 +38,6 @@ int i; ULong L[2]; char *result; - ULong sign; int x0, x1; if (isBigEndian()) { @@ -51,7 +48,6 @@ x1 = 0; } memcpy(L, &d, sizeof(Real64_t)); - sign = L[x0] & 0x80000000L; bits[0] = L[x1]; bits[1] = L[x0] & 0xfffff; if (0 != (ex = (L[x0] >> 20) & 0x7ff)) --- a/runtime/basis/Real/strto.c +++ b/runtime/basis/Real/strto.c @@ -4,9 +4,8 @@ Real32_t Real32_strto (NullString8_t s, C_Int_t rounding) { char *endptr; Real32_t res; - int ret; - ret = gdtoa__strtorf ((const char*)s, &endptr, (int)rounding, &res); + gdtoa__strtorf ((const char*)s, &endptr, (int)rounding, &res); assert (NULL != endptr); return res; } @@ -14,9 +13,8 @@ Real64_t Real64_strto (NullString8_t s, C_Int_t rounding) { char *endptr; Real64_t res; - int ret; - ret = gdtoa__strtord ((const char*)s, &endptr, (int)rounding, &res); + gdtoa__strtord ((const char*)s, &endptr, (int)rounding, &res); assert (NULL != endptr); return res; } --- a/runtime/basis/Stdio.c +++ b/runtime/basis/Stdio.c @@ -2,18 +2,12 @@ void Stdio_printStderr (String8_t s) { uintmax_t size = GC_getArrayLength ((pointer)s); - if (0 == size) - return; - while (1 != fwrite ((const void*)s, (size_t)size, 1, stderr)) - /* nothing */; + fwrite ((const void*)s, (size_t)size, 1, stderr); } void Stdio_printStdout (String8_t s) { uintmax_t size = GC_getArrayLength ((pointer)s); - if (0 == size) - return; - while (1 != fwrite ((const void*)s, (size_t)size, 1, stdout)) - /* nothing */; + fwrite ((const void*)s, (size_t)size, 1, stdout); } void Stdio_print (String8_t s) { --- a/runtime/gc/copy-thread.c +++ b/runtime/gc/copy-thread.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh +/* Copyright (C) 2011 Matthew Fluet. + * Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * Copyright (C) 1997-2000 NEC Research Institute. * @@ -35,7 +36,7 @@ GC_thread fromThread; GC_stack fromStack; GC_thread toThread; - GC_stack toStack; + GC_stack __attribute__ ((unused)) toStack; if (DEBUG_THREADS) fprintf (stderr, "GC_copyCurrentThread\n"); @@ -57,7 +58,7 @@ GC_thread fromThread; GC_stack fromStack; GC_thread toThread; - GC_stack toStack; + GC_stack __attribute__ ((unused)) toStack; if (DEBUG_THREADS) fprintf (stderr, "GC_copyThread ("FMTPTR")\n", (uintptr_t)p); --- a/runtime/gc/heap.c +++ b/runtime/gc/heap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2010 Matthew Fluet. +/* Copyright (C) 2009-2011 Matthew Fluet. * Copyright (C) 2005-2008 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * @@ -41,7 +41,7 @@ size_t liveMapsSize, liveWithMapsSize; size_t currentMapsSize, currentWithMapsSize; size_t resSize, resWithMapsSize; - size_t syslimSize, syslimMapsSize, syslimWithMapsSize; + size_t syslimSize, __attribute__ ((unused)) syslimMapsSize, syslimWithMapsSize; double ratio; syslimWithMapsSize = alignDown (SIZE_MAX, s->sysvals.pageSize); @@ -553,12 +553,11 @@ */ void resizeHeapSecondary (GC_state s) { size_t primarySize, primaryWithMapsSize; - size_t secondarySize, secondaryWithMapsSize; + size_t secondarySize; primarySize = s->heap.size; primaryWithMapsSize = s->heap.withMapsSize; secondarySize = s->secondaryHeap.size; - secondaryWithMapsSize = s->secondaryHeap.withMapsSize; if (DEBUG_RESIZING) fprintf (stderr, "secondaryHeapResize\n"); if (0 == secondarySize) --- a/runtime/gc/init-world.c +++ b/runtime/gc/init-world.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh +/* Copyright (C) 2011 Matthew Fluet. + * Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * Copyright (C) 1997-2000 NEC Research Institute. * @@ -51,7 +52,7 @@ size_t bytes; bool neg; __mpz_struct resmpz; - int ans; + __attribute__ ((unused)) int ans; assert (isFrontierAligned (s, s->frontier)); for (i = 0; i < s->intInfInitsLength; i++) { --- a/runtime/gc/invariant.c +++ b/runtime/gc/invariant.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh +/* Copyright (C) 2011 Matthew Fluet. + * Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * Copyright (C) 1997-2000 NEC Research Institute. * @@ -42,6 +43,8 @@ assert (layout->size <= s->maxFrameSize); offsets = layout->offsets; + for (unsigned int j = 0; j < offsets[0]; ++j) + assert (offsets[j + 1] < layout->size); } } /* Generational */ --- a/runtime/gc/profiling.c +++ b/runtime/gc/profiling.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh +/* Copyright (C) 2011 Matthew Fluet. + * Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * Copyright (C) 1997-2000 NEC Research Institute. * @@ -76,7 +77,6 @@ void enterForProfiling (GC_state s, GC_sourceSeqIndex sourceSeqIndex) { uint32_t i; - GC_profileData p; GC_sourceIndex sourceIndex; uint32_t *sourceSeq; @@ -84,7 +84,6 @@ fprintf (stderr, "enterForProfiling ("FMTSSI")\n", sourceSeqIndex); assert (s->profiling.stack); assert (sourceSeqIndex < s->sourceMaps.sourceSeqsLength); - p = s->profiling.data; sourceSeq = s->sourceMaps.sourceSeqs[sourceSeqIndex]; for (i = 1; i <= sourceSeq[0]; i++) { sourceIndex = sourceSeq[i]; @@ -123,10 +122,8 @@ } void leaveSourceForProfiling (GC_state s, GC_profileMasterIndex i) { - GC_profileData p; GC_profileStack ps; - p = s->profiling.data; ps = getProfileStackInfo (s, i); assert (ps->numOccurrences > 0); ps->numOccurrences--; @@ -136,7 +133,6 @@ void leaveForProfiling (GC_state s, GC_sourceSeqIndex sourceSeqIndex) { int32_t i; - GC_profileData p; GC_sourceIndex sourceIndex; uint32_t *sourceSeq; @@ -144,7 +140,6 @@ fprintf (stderr, "leaveForProfiling ("FMTSSI")\n", sourceSeqIndex); assert (s->profiling.stack); assert (sourceSeqIndex < s->sourceMaps.sourceSeqsLength); - p = s->profiling.data; sourceSeq = s->sourceMaps.sourceSeqs[sourceSeqIndex]; for (i = sourceSeq[0]; i > 0; i--) { sourceIndex = sourceSeq[i]; debian/patches/11-fixes-20100608-to-20110319.patch0000644000000000000000000007657711611265711015436 0ustar Description: Accumulatd fixes since last upstream release Author: Wesley W. Terpstra (Debian) Forwarded: no Last-Update: 2011-03-20 Index: mlton-20100608/regression/common-subexp0.ok =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ mlton-20100608/regression/common-subexp0.ok 2011-07-19 11:34:28.000000000 +0000 @@ -0,0 +1 @@ +nan Index: mlton-20100608/regression/weak.3.sml =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ mlton-20100608/regression/weak.3.sml 2011-07-19 11:34:28.000000000 +0000 @@ -0,0 +1,23 @@ +fun find cache x = + case (List.find (fn (y,_) => x = y) (!cache)) of + NONE => NONE + | SOME (_,r) => SOME r +fun remove cache x = + cache := (List.filter (fn (y,_) => not (x = y)) (!cache)) +fun insert cache (x,r) = + cache := (x,r)::(!cache) + +val cache = ref [] + +fun lookup (x : int) = + case find cache x of + SOME r => (case MLton.Weak.get r of + SOME r' => r' + | NONE => (remove cache x; lookup x)) + | NONE => let val res = x + 1 + val wres = MLton.Weak.new res + in insert cache (x, wres); + res + end + +val _ = List.app (fn x => print (concat [Int.toString (lookup x), "\n"])) [5,4,3,2,1] Index: mlton-20100608/regression/weak.3.ok =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ mlton-20100608/regression/weak.3.ok 2011-07-19 11:34:28.000000000 +0000 @@ -0,0 +1,5 @@ +6 +5 +4 +3 +2 Index: mlton-20100608/regression/common-subexp0.sml =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ mlton-20100608/regression/common-subexp0.sml 2011-07-19 11:34:28.000000000 +0000 @@ -0,0 +1,2 @@ +val x = !(ref 0.0) / !(ref 0.0) +val _ = print (concat [Real.toString x, "\n"]) Index: mlton-20100608/regression/real-basic.x86-mingw.ok =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ mlton-20100608/regression/real-basic.x86-mingw.ok 2011-07-19 11:34:28.000000000 +0000 @@ -0,0 +1,32 @@ +Real32 + Reported + precision: 24 + max exponent: 128 + min exponent: ~125 + min denormal: ~148 + Actual + precision: 64 + max exponent: 128 + min exponent: ~149 + min denormal: ~149 + Exported + precision: 24 + max exponent: 128 + min exponent: ~149 + min denormal: ~149 +Real64 + Reported + precision: 53 + max exponent: 1024 + min exponent: ~1021 + min denormal: ~1073 + Actual + precision: 64 + max exponent: 1024 + min exponent: ~1074 + min denormal: ~1074 + Exported + precision: 53 + max exponent: 1024 + min exponent: ~1074 + min denormal: ~1074 Index: mlton-20100608/runtime/platform/mingw.c =================================================================== --- mlton-20100608.orig/runtime/platform/mingw.c 2011-07-19 11:34:22.000000000 +0000 +++ mlton-20100608/runtime/platform/mingw.c 2011-07-19 11:34:28.000000000 +0000 @@ -1308,26 +1308,75 @@ } } -/* The default strerror() does not know extended error codes. */ -char *MLton_strerror(int code) { - static char buffer[512]; - - /* Windows specific strerror */ - if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, - 0, /* Not used for FROM_SYSTEM */ - code, /* The status code to look up */ - 0, /* Use the default language */ - buffer, /* Write the message to here */ - sizeof(buffer)-1, - 0) == 0) { - strcpy(buffer, "Unknown error"); +static const char *MLton_strerrorExtension(int code) { + switch (code) { + case EINTR: return "Interrupted function call"; + case EBADF: return "Bad file descriptor"; + case EACCES: return "Permission denied"; + case EFAULT: return "Bad address"; + case EINVAL: return "Invalid argument"; + case EMFILE: return "Too many open files"; + case EAGAIN: return "Resource temporarily unavailable"; + case EINPROGRESS: return "Operation in progress"; + case EALREADY: return "Connection already in progress"; + case ENOTSOCK: return "Not a socket"; + case EDESTADDRREQ: return "Destination address required"; + case EMSGSIZE: return "Message too long"; + case EPROTOTYPE: return "Protocol wrong type for socket"; + case ENOPROTOOPT: return "Protocol not available"; + case EPROTONOSUPPORT: return "Protocol not supported"; + case ESOCKTNOSUPPORT: return "Socket type not supported"; + case EOPNOTSUPP: return "Operation not supported on socket"; + case EPFNOSUPPORT: return "Protocol family not supported"; + case EAFNOSUPPORT: return "Address family not supported"; + case EADDRINUSE: return "Address already in use"; + case EADDRNOTAVAIL: return "Address not available"; + case ENETDOWN: return "Network is down"; + case ENETUNREACH: return "Network unreachable"; + case ENETRESET: return "Connection aborted by network"; + case ECONNABORTED: return "Connection aborted"; + case ECONNRESET: return "Connection reset"; + case ENOBUFS: return "No buffer space available"; + case EISCONN: return "Socket is connected"; + case ENOTCONN: return "The socket is not connected"; + case ESHUTDOWN: return "Cannot send after transport endpoint shutdown"; + case ETIMEDOUT: return "Connection timed out"; + case ECONNREFUSED: return "Connection refused"; + case ELOOP: return "Too many levels of symbolic links"; + case ENAMETOOLONG: return "Filename too long"; + case EHOSTDOWN: return "Host is down"; + case EHOSTUNREACH: return "Host is unreachable"; + case ENOTEMPTY: return "Directory not empty"; + case EDQUOT: return "Disk quota exceeded"; + case ESTALE: return "Stale file handle"; + case EREMOTE: return "Object is remote"; + case EUSERS: return "Too many users"; + case ECANCELED: return "Operation canceled"; + default: return "Unknown error"; } +} + +/* MinGW strerror works for all system-defined errno values. + * However, platform/mingw.h adds some missing POSIX networking error codes. + * It defines these codes as their closest-equivalent winsock error code. + * To report network errors, MLton_fixSocketErrno maps winsock errors to + * their closest POSIX errno value. + * + * This function must handle the winsock errno values we have added. + * FormatMessage doesn't return the POSIX string for errors, and it uses + * the current locale's language. The MinGW strerror is always English. + * + * Thus, we just make a big English table to augment strerror. + * The descriptions are taken from man errno(3). + */ +char *MLton_strerror(int code) { + static char buffer[80]; - /* Cut message at EOL */ - for (int i = 0; buffer[i]; ++i) - if (buffer[i] == '\n' || buffer[i] == '\r') - buffer[i] = 0; - +#undef strerror + if (code < sys_nerr) return strerror(code); +#define strerror MLton_strerror + + strcpy(buffer, MLton_strerrorExtension(code)); return buffer; } Index: mlton-20100608/mlton/atoms/real-x.fun =================================================================== --- mlton-20100608.orig/mlton/atoms/real-x.fun 2011-07-19 11:34:22.000000000 +0000 +++ mlton-20100608/mlton/atoms/real-x.fun 2011-07-19 11:34:28.000000000 +0000 @@ -1,4 +1,4 @@ -(* Copyright (C) 2009 Matthew Fluet. +(* Copyright (C) 2009,2011 Matthew Fluet. * Copyright (C) 2004-2006 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * @@ -42,9 +42,12 @@ | R64 => doit (Real64.fromString, Real64.isFinite, Real64) end -(* We need to check the sign bit when comparing reals so that we don't treat - * 0.0 and ~0.0 identically. The difference between the two is detectable by - * user programs that look at the sign bit. +(* RealX.equals determines if two floating-point constants are equal. + * Must check the sign bit, since Real{32,64}.== ignores the sign of + * zeros; the difference between 0.0 and ~0.0 is observable by + * programs that examine the sign bit. + * Must check for nan, since Real{32,64}.== returns false for any + * comparison with nan values. *) fun equals (r, r') = case (r, r') of @@ -52,13 +55,15 @@ let open Real32 in - equals (r, r') andalso signBit r = signBit r' + (equals (r, r') andalso signBit r = signBit r') + orelse (isNan r andalso isNan r') end | (Real64 r, Real64 r') => let open Real64 in - equals (r, r') andalso signBit r = signBit r' + (equals (r, r') andalso signBit r = signBit r') + orelse (isNan r andalso isNan r') end | _ => false Index: mlton-20100608/mlton/main/main.fun =================================================================== --- mlton-20100608.orig/mlton/main/main.fun 2011-07-19 11:34:22.000000000 +0000 +++ mlton-20100608/mlton/main/main.fun 2011-07-19 11:34:28.000000000 +0000 @@ -737,7 +737,7 @@ Result.Yes () => () | Result.No s' => usage (concat ["invalid -ssa2-passes arg: ", s'])) | NONE => Error.bug "ssa2 optimization passes missing")), - (Normal, "stop", " {f|g|o|sml|tc}", "when to stop", + (Normal, "stop", " {f|g|o|tc}", "when to stop", SpaceString (fn s => stop := (case s of Index: mlton-20100608/mlton/ssa/common-subexp.fun =================================================================== --- mlton-20100608.orig/mlton/ssa/common-subexp.fun 2011-07-19 11:34:22.000000000 +0000 +++ mlton-20100608/mlton/ssa/common-subexp.fun 2011-07-19 11:34:28.000000000 +0000 @@ -1,4 +1,4 @@ -(* Copyright (C) 2009 Matthew Fluet. +(* Copyright (C) 2009,2011 Matthew Fluet. * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * Copyright (C) 1997-2000 NEC Research Institute. @@ -17,7 +17,7 @@ fun eliminate (Program.T {globals, datatypes, functions, main}) = let (* Keep track of control-flow specific cse's, - * arguments, and in-degree of blocks. + * arguments, and in-degree of blocks. *) val {get = labelInfo: Label.t -> {add: (Var.t * Exp.t) list ref, args: (Var.t * Type.t) vector, @@ -33,7 +33,7 @@ Property.getSetOnce (Var.plist, Property.initConst NONE) (* Keep track of the variable that holds the length of arrays (and * vectors and strings). - *) + *) val {get = getLength: Var.t -> Var.t option, set = setLength, ...} = Property.getSetOnce (Var.plist, Property.initConst NONE) fun canonVar x = @@ -52,8 +52,8 @@ | Const _ => e | PrimApp {prim, targs, args} => let - fun doit args = - PrimApp {prim = prim, + fun doit args = + PrimApp {prim = prim, targs = targs, args = args} val args = canonVars args @@ -86,7 +86,7 @@ | IntInf_xorb => true | _ => false) then - let + let val (a0, a1) = canon2 () in doit (Vector.new3 (a0, a1, arg 2)) end @@ -103,7 +103,7 @@ HashSet.new {hash = #hash} fun lookup (var, exp, hash) = HashSet.lookupOrInsert - (table, hash, + (table, hash, fn {exp = exp', ...} => Exp.equals (exp, exp'), fn () => {exp = exp, hash = hash, @@ -113,9 +113,9 @@ (* The hash-cons'ing of globals in ConstantPropagation ensures * that each global is unique. *) - val _ = + val _ = Vector.foreach - (globals, fn Statement.T {var, exp, ...} => + (globals, fn Statement.T {var, exp, ...} => let val exp = canon exp val _ = lookup (valOf var, exp, Exp.hash exp) @@ -138,15 +138,25 @@ display (seq [Label.layout label, str ": ", str s]) end) val _ = diag "started" - val removes = ref [] + val remove = ref [] val {add, ...} = labelInfo label + val _ = Control.diagnostics + (fn display => + let open Layout + in + display (seq [str "add: ", + List.layout (fn (var,exp) => + seq [Var.layout var, + str ": ", + Exp.layout exp]) (!add)]) + end) val _ = List.foreach (!add, fn (var, exp) => let val hash = Exp.hash exp val elem as {var = var', ...} = lookup (var, exp, hash) val _ = if Var.equals(var, var') - then List.push (removes, elem) + then List.push (remove, elem) else () in () @@ -165,18 +175,18 @@ in case var of NONE => keep () - | SOME var => + | SOME var => let fun replace var' = (setReplace (var, SOME var'); NONE) fun doit () = let val hash = Exp.hash exp - val elem as {var = var', ...} = + val elem as {var = var', ...} = lookup (var, exp, hash) in if Var.equals(var, var') - then (List.push (removes, elem) + then (List.push (remove, elem) ; keep ()) else replace var' end @@ -216,14 +226,15 @@ val _ = diag "statements" val transfer = Transfer.replaceVar (transfer, canonVar) val transfer = - case transfer of + case transfer of Arith {prim, args, overflow, success, ...} => let val {args = succArgs, inDeg = succInDeg, - add = succAdd, ...} = + add = succAdd, ...} = labelInfo success - val {inDeg = overInDeg, add = overAdd, ...} = + val {inDeg = overInDeg, + add = overAdd, ...} = labelInfo overflow val exp = canon (PrimApp {prim = prim, targs = Vector.new0 (), @@ -241,7 +252,7 @@ then let val (var', _) = Vector.sub (succArgs, 0) - in + in setReplace (var', SOME var) end else () @@ -251,7 +262,7 @@ then let val (var, _) = Vector.sub (succArgs, 0) - in + in List.push (succAdd, (var, exp)) end @@ -284,27 +295,27 @@ label = label, statements = statements, transfer = transfer} + val _ = List.push (blocks, block) + val _ = Vector.foreach (children, loop) + val _ = diag "children" + val _ = Control.diagnostics + (fn display => + let open Layout + in + display (seq [str "remove: ", + List.layout (fn {var,exp,...} => + seq [Var.layout var, + str ": ", + Exp.layout exp]) (!remove)]) + end) + val _ = List.foreach + (!remove, fn {var, hash, ...} => + HashSet.remove + (table, hash, fn {var = var', ...} => + Var.equals (var, var'))) + val _ = diag "removed" in - List.push (blocks, block) ; - Vector.foreach (children, loop) ; - diag "children"; - Control.diagnostics - (fn display => - let open Layout - in - display (seq [str "removes: ", - List.layout (fn {var,exp,...} => - seq [Var.layout var, - str ": ", - Exp.layout exp]) (!removes)]) - end); - List.foreach - (!removes, fn {var, exp, hash} => - HashSet.remove - (table, hash, fn {var = var', exp = exp', ...} => - Var.equals (var, var') andalso - Exp.equals (exp, exp'))); - diag "removed" + () end val _ = Control.diagnostics @@ -327,7 +338,7 @@ val shrink = shrinkFunction {globals = globals} val functions = List.revMap - (functions, fn f => + (functions, fn f => let val {args, blocks, mayInline, name, raises, returns, start} = Function.dest f @@ -340,7 +351,7 @@ val _ = Vector.foreach (blocks, fn Block.T {transfer, ...} => - Transfer.foreachLabel (transfer, fn label' => + Transfer.foreachLabel (transfer, fn label' => Int.inc (#inDeg (labelInfo label')))) val blocks = doitTree (Function.dominatorTree f) in @@ -352,7 +363,7 @@ returns = returns, start = start}) end) - val program = + val program = Program.T {datatypes = datatypes, globals = globals, functions = functions, Index: mlton-20100608/mlton/backend/ssa-to-rssa.fun =================================================================== --- mlton-20100608.orig/mlton/backend/ssa-to-rssa.fun 2011-07-19 11:34:22.000000000 +0000 +++ mlton-20100608/mlton/backend/ssa-to-rssa.fun 2011-07-19 11:34:28.000000000 +0000 @@ -1,4 +1,4 @@ -(* Copyright (C) 2009 Matthew Fluet. +(* Copyright (C) 2009,2011 Matthew Fluet. * Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * Copyright (C) 1997-2000 NEC Research Institute. @@ -1375,7 +1375,9 @@ (CFunction.weakGet {arg = Operand.ty (a 0), return = t}), - none) + fn () => (case toRtype ty of + NONE => none () + | SOME t => move (bogus t))) | Weak_new => ifIsWeakPointer (ty, Index: mlton-20100608/mlton/elaborate/elaborate-core.fun =================================================================== --- mlton-20100608.orig/mlton/elaborate/elaborate-core.fun 2011-07-19 11:34:22.000000000 +0000 +++ mlton-20100608/mlton/elaborate/elaborate-core.fun 2011-07-19 11:34:28.000000000 +0000 @@ -2097,31 +2097,32 @@ pats = pats} end)) val numArgs = - Vector.length (#pats (Vector.sub (rs, 0))) + Vector.fold + (rs, Vector.length (#pats (Vector.sub (rs, 0))), + fn (r,numArgs) => + Int.max (Vector.length (#pats r), numArgs)) val argTypes = Vector.tabulate (numArgs, fn i => let - val t = - Cpat.ty - (#pat (Vector.sub - (#pats (Vector.sub (rs, 0)), - i))) + val t = Type.new () val _ = Vector.foreach (rs, fn {pats, ...} => - let - val {pat, region} = - Vector.sub (pats, i) - in - unify - (t, Cpat.ty pat, fn (l1, l2) => - (region, - str "function with argument of different types", - align [seq [str "argument: ", l2], - seq [str "previous: ", l1], - lay ()])) - end) + if Vector.length pats > i + then let + val {pat, region} = + Vector.sub (pats, i) + in + unify + (t, Cpat.ty pat, fn (l1, l2) => + (region, + str "function with argument of different types", + align [seq [str "argument: ", l2], + seq [str "previous: ", l1], + lay ()])) + end + else ()) in t end) Index: mlton-20100608/mlton/codegen/amd64-codegen/amd64-generate-transfers.fun =================================================================== --- mlton-20100608.orig/mlton/codegen/amd64-codegen/amd64-generate-transfers.fun 2011-07-19 11:34:22.000000000 +0000 +++ mlton-20100608/mlton/codegen/amd64-codegen/amd64-generate-transfers.fun 2011-07-19 11:34:28.000000000 +0000 @@ -1357,6 +1357,31 @@ size = pointerSize})), size_stack_args + 32) else (setup_args, size_stack_args) + (* SysV ABI AMD64 requires %rax set to the number + * of xmms registers passed for varags functions; + * since %rax is caller-save, we conservatively + * set %rax for all functions (not just varargs). + *) + val (reg_args, setup_args) = + if not win64 + then let + val mem = applyFFTempRegArg 8 + val reg = Register.rax + in + ((mem,reg) :: reg_args, + AppendList.append + (setup_args, + AppendList.fromList + [Assembly.instruction_mov + {src = Operand.immediate_int (List.length xmmreg_args), + dst = Operand.memloc mem, + size = Size.QUAD}, + Assembly.directive_cache + {caches = [{register = reg, + memloc = mem, + reserve = true}]}])) + end + else (reg_args, setup_args) (* val reserve_args = AppendList.fromList Index: mlton-20100608/doc/changelog =================================================================== --- mlton-20100608.orig/doc/changelog 2011-07-19 11:34:22.000000000 +0000 +++ mlton-20100608/doc/changelog 2011-07-19 11:34:28.000000000 +0000 @@ -1,3 +1,20 @@ +Here are the changes from version 2010608 to version YYYYMMDD. + +* 2011-02-18 + - Fixed bug with treatment of nan in common subexpression + elimination SSA optimization. + +* 2011-02-17 + - Fixed bug in translation from SSA2 to RSSA with weak pointers. + +* 2011-02-05 + - Fixed bug in amd64 codegen calling convention for varargs C calls. + +* 2011-01-17 + - Fixed bug in comment-handling in lexer for mlyacc's input language. + +-------------------------------------------------------------------------------- + Here are the changes from version 20070826 to version 20100608. Summary: Index: mlton-20100608/lib/mlton/basic/real.sig =================================================================== --- mlton-20100608.orig/lib/mlton/basic/real.sig 2011-07-19 11:34:22.000000000 +0000 +++ mlton-20100608/lib/mlton/basic/real.sig 2011-07-19 11:34:28.000000000 +0000 @@ -1,4 +1,4 @@ -(* Copyright (C) 2009 Matthew Fluet. +(* Copyright (C) 2009,2011 Matthew Fluet. * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. * @@ -60,6 +60,7 @@ val input: In0.t -> t val inverse: t -> t val isFinite: t -> bool + val isNan: t -> bool val layout: t -> Layout.t val ln: t -> t val log2: t -> t Index: mlton-20100608/mlyacc/src/yacc.lex =================================================================== --- mlton-20100608.orig/mlyacc/src/yacc.lex 2011-07-19 11:34:22.000000000 +0000 +++ mlton-20100608/mlyacc/src/yacc.lex 2011-07-19 11:34:28.000000000 +0000 @@ -75,11 +75,11 @@ qualid ={id}"."; %% "(*" => (Add yytext; YYBEGIN COMMENT; commentLevel := 1; - continue() before YYBEGIN INITIAL); + continue(); YYBEGIN INITIAL; continue()); "(*" => (YYBEGIN EMPTYCOMMENT; commentLevel := 1; continue()); "(*" => (Add yytext; YYBEGIN COMMENT; commentLevel := 1; - continue() before YYBEGIN CODE); -[^%\013\n]+ => (Add yytext; continue()); + continue(); YYBEGIN CODE; continue()); +[^(%\013\n]+ => (Add yytext; continue()); "%%" => (YYBEGIN A; HEADER (concat (rev (!text)),pos yypos,pos yypos)); {eol} => (Add yytext; incLineNum yypos; continue()); . => (Add yytext; continue()); Index: mlton-20100608/bin/mlton-script =================================================================== --- mlton-20100608.orig/bin/mlton-script 2011-07-19 11:34:22.000000000 +0000 +++ mlton-20100608/bin/mlton-script 2011-07-19 11:34:28.000000000 +0000 @@ -131,6 +131,7 @@ -target-link-opt freebsd '-L/usr/local/lib/' \ -target-link-opt aix '-maix64' \ -target-link-opt ia64 "$ia64hpux" \ + -target-link-opt linux '-Wl,-znoexecstack' \ -target-link-opt mingw \ '-lws2_32 -lkernel32 -lpsapi -lnetapi32 -lwinmm' \ -target-link-opt mingw '-Wl,--enable-stdcall-fixup' \ Index: mlton-20100608/lib/mlton/basic/dir.sml =================================================================== --- mlton-20100608.orig/lib/mlton/basic/dir.sml 2011-07-19 11:34:22.000000000 +0000 +++ mlton-20100608/lib/mlton/basic/dir.sml 2011-07-19 11:34:28.000000000 +0000 @@ -56,6 +56,7 @@ fold (d, ([], []), fn (x, (dirs, files)) => let val file = OS.Path.joinDirFile { dir=d, file=x } + val file = FS.realPath file in if FS.isLink file then (dirs, files) Index: mlton-20100608/runtime/Makefile =================================================================== --- mlton-20100608.orig/runtime/Makefile 2011-07-19 11:34:22.000000000 +0000 +++ mlton-20100608/runtime/Makefile 2011-07-19 11:34:28.000000000 +0000 @@ -179,7 +179,6 @@ # WARNCFLAGS += -Wpadded WARNCFLAGS += -Wredundant-decls WARNCFLAGS += -Wnested-externs -WARNCFLAGS += -Wlong-long # WARNCFLAGS += -Wunreachable-code WARNCFLAGS += $(WARNFLAGS) debian/patches/Replace-__gmp_const-with-const.patch0000644000000000000000000000447512230541465017607 0ustar From a658a1f4a76a01f568116598800f49b80cf8ee1a Mon Sep 17 00:00:00 2001 From: David Larsen Date: Wed, 17 Apr 2013 15:28:24 -0400 Subject: [PATCH] Replace '__gmp_const' with 'const' The __gmp_const macro was added to GMP as a workaround for C compilers which didn't support the const keyword. GMP 5.1 removed support for pre-ANSI C compilers, so the __gmp_const workaround was removed at the same time. This change replaces all uses of '__gmp_const' with uses of the 'const' keword directly, since MLton already expects C99 support from the system C compiler. This should fix the build errors for systems using GMP >= 5.1. --- runtime/gc/int-inf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/gc/int-inf.c b/runtime/gc/int-inf.c index 7f24e64..6a91390 100644 --- a/runtime/gc/int-inf.c +++ b/runtime/gc/int-inf.c @@ -181,8 +181,8 @@ objptr finiIntInfRes (GC_state s, __mpz_struct *res, size_t bytes) { static inline objptr binary (objptr lhs, objptr rhs, size_t bytes, void(*binop)(__mpz_struct *resmpz, - __gmp_const __mpz_struct *lhsspace, - __gmp_const __mpz_struct *rhsspace)) { + const __mpz_struct *lhsspace, + const __mpz_struct *rhsspace)) { __mpz_struct lhsmpz, rhsmpz, resmpz; mp_limb_t lhsspace[LIMBS_PER_OBJPTR + 1], rhsspace[LIMBS_PER_OBJPTR + 1]; @@ -258,7 +258,7 @@ objptr IntInf_xorb (objptr lhs, objptr rhs, size_t bytes) { static objptr unary (objptr arg, size_t bytes, void(*unop)(__mpz_struct *resmpz, - __gmp_const __mpz_struct *argspace)) { + const __mpz_struct *argspace)) { __mpz_struct argmpz, resmpz; mp_limb_t argspace[LIMBS_PER_OBJPTR + 1]; @@ -284,7 +284,7 @@ objptr IntInf_notb (objptr arg, size_t bytes) { static objptr shary (objptr arg, Word32_t shift, size_t bytes, void(*shop)(__mpz_struct *resmpz, - __gmp_const __mpz_struct *argspace, + const __mpz_struct *argspace, unsigned long shift)) { __mpz_struct argmpz, resmpz; -- 1.7.10.4 debian/patches/series0000644000000000000000000000015512230541554012034 0ustar 11-fixes-20100608-to-20110319.patch 22-fixes-20110319-to-20110719.patch Replace-__gmp_const-with-const.patch debian/mlton-runtime-arm-linux-gnueabihf.install0000644000000000000000000000005411611257116017230 0ustar usr/lib/mlton/targets/arm-linux-gnueabihf/* debian/mlton-runtime-x86-64-linux-gnu.install0000644000000000000000000000005111541717433016170 0ustar usr/lib/mlton/targets/x86_64-linux-gnu/* debian/watch0000644000000000000000000000013411321434673010221 0ustar version=3 http://mlton.org/Download /pages/Download/attachments/mlton-([\d\.-]+)\.src\.tgz debian/mlton-runtime-i486-gnu.install0000644000000000000000000000004111541717433014650 0ustar usr/lib/mlton/targets/i486-gnu/* debian/mlton-tools.doc-base.mllex0000644000000000000000000000043611541376114014202 0ustar Document: mllex Title: A lexical analyzer generator for Standard ML Author: Andrew W. Appel, James S. Mattson, David R. Tarditi Abstract: This document describes how write lexer specification files for mllex. Section: Programming Format: PDF Files: /usr/share/doc/mlton/mllex.pdf.gz debian/mlton-runtime-arm-linux-gnueabi.install0000644000000000000000000000005211541717433016715 0ustar usr/lib/mlton/targets/arm-linux-gnueabi/* debian/rules0000755000000000000000000000252511545417363010263 0ustar #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/makefile.mk include /usr/share/cdbs/1/rules/patchsys-quilt.mk HEAPSIZE := $(shell . debian/heap-size) # MLton compiles optimized, debug, and pic versions on its own. DEB_MAKE_INVOKE = $(DEB_MAKE_ENVVARS) make -C $(DEB_BUILDDIR) # The MLton guide is html. Don't compress example .sml files. DEB_COMPRESS_EXCLUDE_ALL = mlton/guide .sml DEB_MAKE_CLEAN_TARGET = clean clean-svn DEB_MAKE_BUILD_TARGET = all RUNTIME_ARGS="$(HEAPSIZE)" DEB_MAKE_INSTALL_TARGET = install-no-strip DESTDIR=$(CURDIR)/debian/tmp/ PREFIX=/usr MAN_PREFIX_EXTRA=/share DEB_MAKE_CHECK_TARGET = check # Useful when inspecting build logs common-configure-arch:: free # Move MLton target to per-architecture path common-install-arch:: mv $(CURDIR)/debian/tmp/usr/lib/mlton/targets/self $(CURDIR)/debian/tmp/usr/lib/mlton/targets/$(DEB_HOST_GNU_TYPE) ln -s $(DEB_HOST_GNU_TYPE) $(CURDIR)/debian/tmp/usr/lib/mlton/targets/self # Remove licenses and empty directories to appease lintian common-install-indep:: find $(CURDIR)/debian/tmp -type d -empty -delete rm -rf $(CURDIR)/debian/tmp/usr/share/doc/mlton/license if test -n "$(DEB_ISNATIVE)"; then mv \ $(CURDIR)/debian/tmp/usr/share/doc/mlton/changelog \ $(CURDIR)/debian/tmp/usr/share/doc/mlton/changelog.PreviousRelease; \ fi debian/compat0000644000000000000000000000000211272062763010372 0ustar 7 debian/mlton-runtime-alpha-linux-gnu.install0000644000000000000000000000005011541717433016400 0ustar usr/lib/mlton/targets/alpha-linux-gnu/* debian/mlton-runtime-i486-linux-gnu.install0000644000000000000000000000004712230542407016004 0ustar usr/lib/mlton/targets/i*86-linux-gnu/* debian/changelog0000644000000000000000000003530012230542501011033 0ustar mlton (20100608-5.1) unstable; urgency=low * Non-Maintainer Upload * Apply upstream patch to avoid __gmp_const breakage (Closes: 707410) * Apply patch from Matthias Klose to allow building on more target triplets on i386, not just i486-linux-gnu (Closes: 640137) -- Florian Weimer Sat, 19 Oct 2013 19:39:58 +0200 mlton (20100608-5) unstable; urgency=low * Newest gcc and binutils fix mips[el] jump problem * Uploaded mips[el] bootstrap packages as 20100608-4 * Build-Depend on newest gcc and binutils * Removed explicit-relocs patch * Include a diffs to current release head * Necessary for 8-bit aligned MIPS read/writes * Increase heap-size for mips post-alignment * Building armel on debian buildd instead of qemu * Heap-size 1.2g on 1.5g machines * Added armhf port -- Wesley W. Terpstra (Debian) Tue, 19 Jul 2011 12:29:52 +0200 mlton (20100608-4) unstable; urgency=low * Add missing install file for sparc runtime * Make the self target symlink relative * Added Replaces and Breaks the old version for smooth upgrades * Previous build needed manual uploads, so buildd rebuild needed * Still needing bootstrap: * mips(el) gcc bug still unresolved and no-explicit-relocs fails too -- Wesley W. Terpstra (Debian) Fri, 01 Apr 2011 22:57:25 +0200 mlton (20100608-3) unstable; urgency=low * Include all bugfixes since 20100608 release * Depend on libgmp-dev (closes: #618268) * Split package into compiler, runtime, basis, tools, and doc * Use multiarch to support cross-compiling * Eliminates the need for a mlton-cross package * Updated standards version (no changes needed) -- Wesley W. Terpstra (Debian) Sun, 20 Mar 2011 14:05:32 +0100 mlton (20100608-2) unstable; urgency=low * Added a new '-mno-explicit-relocs' mips work-around. * Bug filed with gcc upstream (#44537) -- Wesley W. Terpstra (Debian) Mon, 14 Jun 2010 18:28:58 +0200 mlton (20100608-1) unstable; urgency=low * New upstream release * Removed the mips -fPIC work-around * Filing a new gcc bug report upstream -- Wesley W. Terpstra (Debian) Fri, 11 Jun 2010 16:11:59 +0200 mlton (20100504~svn-r7459) unstable; urgency=low * New snapshot from svn/HEAD * Includes fixes for PIC codegen on x86 * Better handling of memory exhaustion * Fix aliasing problem with newest gcc * Switch to using quilt source format -- Wesley W. Terpstra (Debian) Tue, 04 May 2010 19:26:59 +0200 mlton (20100206~svn-r7414) unstable; urgency=low * s390 and hurd need fixed-heap to stop thrashing on resize * qemu'd armel needs max-heap to work-around mmap emulation problems => heap-size must choose {fixed/max}-heap -- Wesley W. Terpstra (Debian) Mon, 08 Feb 2010 20:22:20 +0100 mlton (20100206~svn-r7412) unstable; urgency=low * Restored -fPIC work-around and reopened #552314. * Got a qemu-linux-user with 1G of RAM to work => added armel target. -- Wesley W. Terpstra (Debian) Sat, 06 Feb 2010 11:16:31 +0100 mlton (20100205~svn-r7410) unstable; urgency=low * New snapshot from svn/HEAD * Split targets into sub-folder * makes cross-compiler packages possible * Add a debian/watch file for lintian * Correct spelling errors in the manual page * Updated to policy 3.8.4.0 (no changes) * Removed -fPIC work-around for mips (closes: #552314) -- Wesley W. Terpstra (Debian) Fri, 05 Feb 2010 17:13:06 +0100 mlton (20091212~svn-r7383) unstable; urgency=low * New snapshot from svn/HEAD * Works around incompatible change to 'patch' (closes: #560623) * Use a version number that reflects the snapshot nature (closes: #559014) * Both upstream and debian packaging live in the same svn repository * Prune the packaging folder from snapshots as well as releases * For release versions use 20YYMMDD-rXXX, where * 20YYMMDD is the name of the release soruce tarball * XXX is the svn version of the packaging used * For snapshots use 20YYMMDD~svn-rXXX, where * 20YYMMDD is the date the snapshot was made * XXX is the svn version of the packaging and source used -- Wesley W. Terpstra (Debian) Sat, 12 Dec 2009 02:37:12 +0100 mlton (20091107) unstable; urgency=low * gcc-4.4 miscompiles more than just fpclassify. It is unusable. * gcc-4.1 ICEs so also not an option. * => use gcc-4.3, despite an off-by-one bug in mips branch generation * Using -fPIC to compile changes the assembler enough to get past #552341 -- Wesley W. Terpstra (Debian) Sat, 07 Nov 2009 17:26:11 +0100 mlton (20091104) unstable; urgency=low * Two more regressions disabled on hurd (thread2 and world5) * Switch mips back to gcc-4.4 * Found the cause of the segfault: fpclassify is broken on mips * Disable its on linux/mips and use the MLton IEEE work-around code -- Wesley W. Terpstra (Debian) Wed, 04 Nov 2009 12:04:36 +0100 mlton (20091101) unstable; urgency=low * The mips saga continues * gcc-4.4 miscompiles code * gcc-4.3 outputs bad branch statements * => gcc-4.1 might work! * Don't override gcc version on any architecture but mips[el] * Change dependencies to require gcc-4.1 only on mips[el] -- Wesley W. Terpstra (Debian) Sun, 01 Nov 2009 18:38:37 +0100 mlton (20091029) unstable; urgency=low * Bump the heap-size up a bit to 800m (850m for align8) -> fixes s390. * Without a porter box it's hard to find the cause of mips(el) build failure * One likely in the gcc changelog is an ABI change in gcc 4.4 * Apparently the packed attribute behaves differently now * Since the runtime uses this attribute, rebuild it using gcc 4.4 as well -- Wesley W. Terpstra (Debian) Sun, 01 Nov 2009 07:19:14 +0100 mlton (20091028) unstable; urgency=low * Added hurd memory-layout definition for mlnlffigen. * Use gcc-4.4; it works around #552314 on mips. * Switch to using cdbs and debhelper. * Appease lintian (hyphens in manual, licence file, empty directories) * Set the Homepage field -- Wesley W. Terpstra (Debian) Wed, 28 Oct 2009 18:35:04 +0100 mlton (20091022) unstable; urgency=low * Added missing hurd variant to mlton-stubs bootstrap library. -- Wesley W. Terpstra (Debian) Thu, 22 Oct 2009 12:00:13 +0200 mlton (20091021) unstable; urgency=low * Revised the heap-size script again to ensure 300m free for the OS. * Got these buildds black-listed for low ram: fano, nautilus, rem * Changed s390 alignment to 8 to fix Real64 regressions. * Filled in regression tests for alpha, hppa, mips/el, powerpc, and s390. * Added option DEB_BUILD_HEAP to override debian/heap-size defaults. -- Wesley W. Terpstra (Debian) Mon, 19 Oct 2009 14:37:57 +0200 mlton (20091018) unstable; urgency=low * Apparently, procps needs to be installed to use 'free'. * The buildds aren't overloaded, they just suck. Revised heap-size. -- Wesley W. Terpstra (Debian) Mon, 19 Oct 2009 02:32:45 +0200 mlton (20091017) unstable; urgency=low * Debian buildds are heavily loaded -> ram-slop 0.7 is a bad idea. * caused thrashing on nautilus (amd64) * bootstrap troubles from 20070812 on paer (hppa) * Solution => fixed-heap based on debian target (rules/heap-size) * 800MB for 32-bit systems * hppa, i386, kfreebsd-i386, mips, mipsel, powerpc, s390, sparc * 1400MB for 64-bit systems * alpha, amd64, ia64, kfreebsd-amd64 * Added hurd-i386 port * 700MB fixed-heap (hurd can only map 800MB physical RAM) * Disable regression suite on hurd; there is a bug in signal handling on this platform (#551470) which causes these tests to hang: mutex prodcons signals signals2 suspend timeout * Otherwise all regressions pass -- Wesley W. Terpstra (Debian) Sat, 17 Oct 2009 19:12:00 +0200 mlton (20091015) unstable; urgency=low * Rebuild proper packages using the buildd * Added mips and mipsel architectures (bootstrap already uploaded) * Switch to debian native version numbers * Base the MLton version on the changelog * Mark the smlnj script as bash-specific (closes: #530142) -- Wesley W. Terpstra (Debian) Thu, 15 Oct 2009 21:09:17 +0200 mlton (20091013-1) unstable; urgency=low * New maintainer * New upstream version taken from svn r7263 * Standards-version 3.8.3.0 (no changes) * Added alpha ia64 kfreebsd-i386 s390 ports * manual uploads of (half-broken) bootstrap packages will follow * Handle nostrip build option (closes: #437581) -- Wesley W. Terpstra (Debian) Wed, 14 Oct 2009 15:37:25 +0200 mlton (20070826-1) unstable; urgency=low * new upstream version -- Stephen Weeks Mon, 03 Sep 2007 13:34:12 -0400 mlton (20061107-1) unstable; urgency=low * new upstream version * Use max-heap 640m instead of fixed-heap 512m. hopefully closes: #396980 -- Stephen Weeks Tue, 07 Nov 2006 14:01:53 -0800 mlton (20061026-1) unstable; urgency=low * new upstream version * Eliminated broken "cd" in bin/make-pdf-guide. closes: #394981 -- Stephen Weeks Thu, 26 Oct 2006 12:04:20 -0700 mlton (20060213-1) unstable; urgency=low * new upstream version * Added dependence on libc6-dev. closes: #352645 -- Stephen Weeks Mon, 13 Feb 2006 10:16:46 -0800 mlton (20051202-1) unstable; urgency=low * new upstream version -- Stephen Weeks Thu, 01 Dec 2005 22:53:04 -0800 mlton (20051109-1) unstable; urgency=low * new upstream version -- Stephen Weeks Wed, 09 Nov 2005 18:47:04 -0800 mlton (20051102-1) unstable; urgency=low * new upstream version -- Stephen Weeks Wed, 02 Nov 2005 18:45:50 -0800 mlton (20050930-1) unstable; urgency=low * Fixed postinst problem. closes: #329692 -- Stephen Weeks Fri, 30 Sep 2005 09:19:50 -0700 mlton (20050906-1) unstable; urgency=low * Replaces -mv8 with -mcpu=v8 for Sparc. -- Stephen Weeks Tue, 06 Sep 2005 14:57:46 -0700 mlton (20050901-1) unstable; urgency=low * remaking package, linking normally with libgmp. Thus, the package will depend on libgmp3c2, but that is OK for unstable. * Fixed postinst script. closes: #325850 -- Stephen Weeks Thu, 01 Sep 2005 00:20:20 -0700 mlton (20050826-1) unstable; urgency=low * new upstream version * Fixed broken $lib in mlton script. The previous package didn't work at all. -- Stephen Weeks Thu, 25 Aug 2005 13:33:41 -0700 mlton (20050825-1) unstable; urgency=low * new upstream version * don't build statically, just link statically with libgmp.a -- Stephen Weeks Thu, 25 Aug 2005 06:14:06 -0700 mlton (20050824-1) unstable; urgency=low * new upstream version * built statically, closes: #324859 -- Stephen Weeks Wed, 24 Aug 2005 15:13:19 -0700 mlton (20050823-1) unstable; urgency=low * new upstream version -- Stephen Weeks Tue, 23 Aug 2005 14:56:59 -0700 mlton (20050822-1) unstable; urgency=low * new upstream version -- Stephen Weeks Mon, 22 Aug 2005 17:13:09 -0700 mlton (20041109-1) unstable; urgency=low * new upstream version -- Stephen Weeks Tue, 09 Nov 2004 00:00:00 -0800 mlton (20040227-1) unstable; urgency=low * new upstream version -- Stephen Weeks Fri, 27 Feb 2004 17:20:04 -0800 mlton (20040106-1) unstable; urgency=low * new upstream version -- Stephen Weeks Wed, 10 Dec 2003 10:45:33 -0800 mlton (20031202-1) unstable; urgency=low * new upstream version * define MREMAP_MAYMOVE to avoid including linux/mman.h, closes: #219987 * Switched from laxex2html to HeVeA, closes: #221341 -- Stephen Weeks Tue, 02 Dec 2003 06:54:35 -0800 mlton (20030716-1) unstable; urgency=low * new upstream version -- Stephen Weeks Wed, 16 Jul 2003 10:42:34 -0700 mlton (20030710-1) unstable; urgency=low * new upstream version -- Stephen Weeks Fri, 14 Mar 2003 00:23:46 -0800 mlton (20021122-1) unstable; urgency=low * new upstream version * build in an unstable environment instead of testing * renaming original source package -- treating as nonnative package * added man page for mllex, closes: #166880 * added man page for mlyacc, closes: #166882 -- Stephen Weeks Mon, 28 Oct 2002 20:08:36 -0800 mlton (20021018.1-1) unstable; urgency=low * Build in a testing environment instead of stable. * Put doc files in /usr/share/doc, not /usr/doc. -- Stephen Weeks Thu, 17 Oct 2002 15:07:53 -0700 mlton (20020930.1-1) unstable; urgency=low * Recompiling without setting rpath. -- Stephen Weeks Mon, 30 Sep 2002 15:37:04 -0700 mlton (20020929.1-1) unstable; urgency=low * Took over packaging and maintenance responsibilites from Barak. * Moved the debian packaging stuff into the MLton CVS. -- Stephen Weeks Sun, 29 Sep 2002 00:01:46 -0700 mlton (20020728.1-1) unstable; urgency=low * new upstream version -- Barak Pearlmutter Mon, 29 Jul 2002 10:57:36 -0600 mlton (20020410.1-1) unstable; urgency=low * new upstream version -- Barak Pearlmutter Sun, 14 Apr 2002 13:49:16 -0600 mlton (20011006.1-2) unstable; urgency=low * remove dependency on gcc; upstream 20011006 no longer uses it. -- Barak Pearlmutter Mon, 15 Oct 2001 02:49:26 -0600 mlton (20011006.1-1) unstable; urgency=low * new upstream source -- Barak Pearlmutter Thu, 11 Oct 2001 02:20:57 -0600 mlton (20010806-3) unstable; urgency=low * add build-time dependency on package time * ignore upstream, use libgmp3-dev (closes: #111000) (closes: #111327) -- Barak Pearlmutter Thu, 6 Sep 2001 01:35:40 -0600 mlton (20010806-2) unstable; urgency=low * add dependency on libgmp2-dev; mlton links its output with libgmp2 * add dependency on gcc; mlton calls it * stop dh_strip from gnawing crucial bits off libmlton.a (closes: #109825) * remove redundant license files * longer explanation of compilation requirements in README.Debian * rename upstream documentation file CHANGES.gz to changelog -- Barak Pearlmutter Fri, 24 Aug 2001 01:05:27 -0600 mlton (20010806-1) unstable; urgency=low * Initial Release. -- Barak Pearlmutter Mon, 20 Aug 2001 01:57:57 -0600