Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK)) by mollari.NetBSD.org (Postfix) with ESMTPS id 3BE0CA61C3 for ; Sun, 15 Dec 2013 18:35:32 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id A8E6714A30C; Sun, 15 Dec 2013 18:35:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 5D43A14A303 for ; Sun, 15 Dec 2013 18:35:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at NetBSD.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.NetBSD.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id wb5CDiVJMA-v for ; Sun, 15 Dec 2013 18:35:23 +0000 (UTC) Received: from cvs.netbsd.org (cvs.NetBSD.org [IPv6:2001:4f8:3:7:2e0:81ff:fe30:95bd]) by mail.netbsd.org (Postfix) with ESMTP id 5E25A14A2FC for ; Sun, 15 Dec 2013 18:35:23 +0000 (UTC) Received: by cvs.netbsd.org (Postfix, from userid 500) id 5910296; Sun, 15 Dec 2013 18:35:23 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sun, 15 Dec 2013 18:35:23 +0000 From: "Aleksej Saushev" Subject: CVS commit: pkgsrc/lang/polyml To: pkgsrc-changes@NetBSD.org Reply-To: asau@netbsd.org X-Mailer: log_accum Message-Id: <20131215183523.5910296@cvs.netbsd.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk Module Name: pkgsrc Committed By: asau Date: Sun Dec 15 18:35:23 UTC 2013 Modified Files: pkgsrc/lang/polyml: Makefile PLIST distinfo pkgsrc/lang/polyml/patches: patch-libpolyml_elfexport.cpp Added Files: pkgsrc/lang/polyml/patches: patch-buildpolyc Log Message: Update to Poly/ML 5.5.1 Contributed by Imre Vadasz on pkgsrc-users (slightly adapted). Changes in Poly/ML Version 5.5.1 Major New Features and Changes * The intermediate code optimiser has been largely rewritten. The optimiser now detects various additional cases where a closures or tuples can be stored on the stack rather than requiring heap storage * The match compiler that processes a sequence of patterns in a case or fun-binding has been reworked. This now handles complex matches that used to result in a code blow-up * A"polyc" script has been added to aid compiling and linking ML code to produce a stand-alone binary. This is intended as an analogue of cc and gcc. The easiest way to build a binary is now to put the ML code into a file (foo.ML) with a function "main" that is the entry point to the code. Then run polyc -o foo foo.ML The script takes care of any libraries that may be required. It does require that the poly binary and libraries have been installed to the location that was specified in the configure script. * Set the default in the configure script not to build a shared library. This can be overidden with --enable-shared. The advantage of this is that binaries created from Poly/ML, including poly itself, do not require libpolyml at run-time. * Additions and changes to the command-line options when starting the ML top-level + The --eval option can be followed by a string which is compiled and executed before the top-level is entered + The --script option can be used to allow ML code to be run as a script (a "shell script") in Unix. It reads the file name given as the last option, skipping the first line if it begins #!. Implies -q option. Note: because of the way scripts pass their options if used this must be the only option. To use ML as a script put the ML code into a file, put #! /usr/local/bin/poly --script as the first line, modifying the path depending on where poly is installed, and set the file to have execute permission. + The -q option now sets the print depth to zero as well as suppressing the start-up message + The input prompt (> or #) is only produced if the input is a terminal. The -i option should be used to cause the prompt to be produced if, for example, the input is from a pipe. Minor Additions and Changes * The -H option now sets the initial heap size rather than being a synonym for --minheap * Add large file support * When printing the fields a record print them in alphabetical order rather than the system order used in the compiler * Convert the representation of the statistics to use ASN1 encoding. This is byte-order and word-length independent and allows 32-bit Poly/ML to read the statistics of 64-bit Poly/ ML on the same machine and vice-versa. * Add a substructure Exception to the PolyML structure to hold all the functions related to exceptions. * The default for --gc-threads is now the number of independent physical processors. Hyperthreaded cores are counted as single cores rather than dual cores. * Improve the GC and allocation code for very large arrays * Improve handling of OS.Process.system in Cygwin * Improved versions of Word32 and Word64. These are used for SystemWord and LargeWord. Bug Fixes * Fix Word32.fromLargeInt which could return values outside the range of Word32 * Fix segfault in PolyML.stackTrace * Fix errors in conversion of string to real values * Fix segfault when a thread created in foreign code called an ML callback * Fix profiler which could often report UNKNOWN function * Fix bug with overlapped areas in ArraySlice.copy * Fix InternalError exception with ML code where a fixed record type could not be found * Fix bug with equality on BoolVector.vector * Raise the correct exception (Size) for negative lengths in canInput and inputN * Fix Real.fromInt with an argument that was an arbitrary precision number in the long form * Fix error in the timing information printed with PolyML.timing true in Windows. * Fix occasional problem with input/output as a result of the stream token being represented by an immutable value but then being checked for equality * Fix bug in X86-64 code-generator with literal constants that do not fit in 32-bits. It could result in an "InternalError: gen32s: invalid word" exception. Includes regression test. * Fix LargWord.fromInt which was wrong for large negative values * Fix bug in power-of-two function in code-generator. This caused an infinite loop with Word.* when multiplying by a constant with the highest bit set and not a power of two. * Fix bug in structure matching code * Use ELF_Rela relocation structures for all relocations in X86-64. Some systems e.g. Solaris require this. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 pkgsrc/lang/polyml/Makefile cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/lang/polyml/PLIST cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/polyml/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/lang/polyml/patches/patch-buildpolyc cvs rdiff -u -r1.1 -r1.2 \ pkgsrc/lang/polyml/patches/patch-libpolyml_elfexport.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.