diff -rNu smalltalk-3.0.2/ChangeLog smalltalk-3.0.3/ChangeLog --- smalltalk-3.0.2/ChangeLog 2008-03-07 11:53:43.000000000 +0100 +++ smalltalk-3.0.3/ChangeLog 2008-05-14 12:02:32.000000000 +0200 @@ -1,3 +1,80 @@ +2008-05-11 Paolo Bonzini + + * examples/xml.sed: Fix for VW7. + * scripts/Convert.st: Sync with trunk. Apply rewrites to doits too. + +2008-04-30 Paolo Bonzini + + * kernel/Object.st: Inline call to #release. + +2008-04-21 Paolo Bonzini + + * kernel/Float.st: Define #asCNumber. + * kernel/Fraction.st: Define #asCNumber. + * kernel/LargeInt.st: Define #asCNumber. + * kernel/Number.st: Define #asCNumber. + * kernel/ScaledDec.st: Define #asCNumber. + * kernel/SmallInt.st: Define #asCNumber. + +2008-04-17 Paolo Bonzini + + * kernel/DLD.st: Don't register DLD with ObjectMemory. + * kernel/ObjMemory.st: Execute #returnFromSnapshot callback + at high priority, and pass it to DLD before anything else. + +2008-04-15 Paolo Bonzini + + * kernel/File.st: Don't prepend a \ if an absolute path is + created by #computePathFrom:to: and the destination path has a + disk letter in it. + +2008-04-09 Paolo Bonzini + + * kernel/FileDescr.st: Move #isOpen checks after #ensureReadable + and #ensureWritable. + +2008-04-09 Paolo Bonzini + + * kernel/FileDescr.st: Move open checks to #checkError, use #isOpen. + +2008-04-09 Paolo Bonzini + + * kernel/FileDescr.st: Add a couple of methods for polymorphism + with sockets. + +2008-04-08 Stephen Compall + + * kernel/Class.st: Never answer nil from #sharedPoolDictionaries. + * kernel/DeferBinding.st: Remove symmetric nil check. + * kernel/Metaclass.st: Likewise. + +2008-03-24 Paolo Bonzini + + * kernel/FileDescr.st: Open URLs from #open:mode:ifFail:. + +2008-03-19 Paolo Bonzini + + * kernel/File.st: Return result of evaluating block from + File>>#withReadStreamDo: and File>>#withWriteStreamDo:. + +2008-03-19 Paolo Bonzini + + * kernel/Regex.st: Add #allOccurrencesOfRegex:do:. + +2008-03-18 Paolo Bonzini + + * kernel/Class.st: Rename #policy/#policy: to + #securityPolicy/#securityPolicy:. + +2008-03-15 Paolo Bonzini + + * main.c: Fix -S. + +2008-03-11 Paolo Bonzini + + * scripts/Load.st: Add -i. + * gst-tool.c: Likewise. + 2008-03-04 Paolo Bonzini * main.c: Set GST_NO_TTY in Emacs mode. diff -rNu smalltalk-3.0.2/Makefile.in smalltalk-3.0.3/Makefile.in --- smalltalk-3.0.2/Makefile.in 2008-03-07 11:54:45.000000000 +0100 +++ smalltalk-3.0.3/Makefile.in 2008-05-14 12:04:51.000000000 +0200 @@ -222,6 +222,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -234,10 +236,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -252,12 +254,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ diff -rNu smalltalk-3.0.2/NEWS smalltalk-3.0.3/NEWS --- smalltalk-3.0.2/NEWS 2008-03-07 11:53:43.000000000 +0100 +++ smalltalk-3.0.3/NEWS 2008-05-14 12:02:32.000000000 +0200 @@ -1,18 +1,67 @@ List of user-visible changes in GNU Smalltalk +NEWS FROM 3.0.2 TO 3.0.3 + +o File>>#withReadStreamDo: and File>>#withWriteStreamDo: now return + the result of evaluating their argument, instead of returning the + File object. + +o Fixed command-line option -S to actually work. + +o Fixed GC bugs in SQLite bindings. Also, the bindings could sometimes + call sqlite3_finalize twice. + +o Fixed rare finalization bug. + +o Fixes to the JIT compiler. + +o Generational GC is now disabled on Alpha. + +o More fixes for MinGW. + +o New command-line option -i (--rebuild-image) for gst-load. + +o New methods: + + Number>>#asCNumber + String>>allOccurrencesOfRegex:do: + String>>allOccurrencesOfRegex:from:to:do: + TCP.AbstractSocket>>#canRead + TCP.AbstractSocket>>#canWrite + TCP.AbstractSocket>>#ensureReadable + TCP.AbstractSocket>>#ensureWriteable + +o The callback for the #returnFromSnapshot event is executed as a + high-priority process. While relatively invasive, this change was + needed to fix crashes when reloading images that used C bindings + extensively. + +o A system-installed libffi can be used. The included libffi has been + upgraded to version 3.0.4. + +o URLs can be passed to FileDescriptor class>>#open:mode:ifFail:. + + +Thanks to everyone who reported bugs and/or provided fixes that went +into this release, including Stephen Compall, Thomas Girard, Tim Kack, +Cesar Rabak. + + +----------------------------------------------------------------------------- + NEWS FROM 3.0.1 TO 3.0.2 -o Fixed bugs in floating-point I/O +o Fixed bugs in floating-point I/O. o Fixed bugs in comparisons between ScaledDecimals and Integers. -o Fixes for MinGW +o Fixes for MinGW. o Fixes to the Emacs modes. o Improved GNUPlot bindings (support for histograms). -o Improved SqueakParser +o Improved SqueakParser. o Number>>#readFrom: will return floating-point numbers, not fractions. @@ -42,7 +91,7 @@ Time>>#addSeconds: Time>>#midnight -o Regex is now a subclass of Object +o Regex is now a subclass of Object. o SQLite bindings return a different Row object for each #next call to a ResultSet. diff -rNu smalltalk-3.0.2/THANKS smalltalk-3.0.3/THANKS --- smalltalk-3.0.2/THANKS 2008-03-07 11:53:43.000000000 +0100 +++ smalltalk-3.0.3/THANKS 2008-04-10 11:10:56.000000000 +0200 @@ -59,16 +59,20 @@ Fernando Lopez Hernandez Peter William Lount Elisa Manara +Philippe Marschall David Mentre Dragomir Milivojevic Eben Moglen Hiroshi Nanosecond Ryan Pavlik -Nicolas Pelletier Jeronimo Pellegrini +Nicolas Pelletier +Sam Phillips +Damien Pollet Ian Piumarta J Pfersich Robin Redeker +Lukas Renggli Janis Rucis Jeff Rosenwald Stefan Schmiedl diff -rNu smalltalk-3.0.2/build-aux/gst-package.m4 smalltalk-3.0.3/build-aux/gst-package.m4 --- smalltalk-3.0.2/build-aux/gst-package.m4 2008-02-19 18:49:43.000000000 +0100 +++ smalltalk-3.0.3/build-aux/gst-package.m4 2008-04-10 11:10:56.000000000 +0200 @@ -17,6 +17,7 @@ AC_DEFUN([GST_PACKAGE_DEPENDENCIES], [ m4_define([_GST_PKG_DEPENDENCIES], [$1])]) +m4_define([_GST_PKG_DEPENDENCIES], []) m4_define([_GST_RULES_PREPARE], [m4_expand_once([ diff -rNu smalltalk-3.0.2/build-aux/pkg.m4 smalltalk-3.0.3/build-aux/pkg.m4 --- smalltalk-3.0.2/build-aux/pkg.m4 2008-01-22 11:14:31.000000000 +0100 +++ smalltalk-3.0.3/build-aux/pkg.m4 2008-04-10 11:10:56.000000000 +0200 @@ -1,57 +1,157 @@ - -dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) -dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page -dnl also defines GSTUFF_PKG_ERRORS on error -AC_DEFUN([PKG_CHECK_MODULES], [ - succeeded=no - - if test -z "$PKG_CONFIG"; then - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - AC_MSG_CHECKING(for $2) - - if $PKG_CONFIG --exists "$2" ; then - AC_MSG_RESULT(yes) - succeeded=yes - - AC_MSG_CHECKING($1_CFLAGS) - $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` - AC_MSG_RESULT($$1_CFLAGS) - - AC_MSG_CHECKING($1_LIBS) - $1_LIBS=`$PKG_CONFIG --libs "$2"` - AC_MSG_RESULT($$1_LIBS) - else - $1_CFLAGS="" - $1_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - ifelse([$4], ,echo $$1_PKG_ERRORS,) +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# +# Copyright © 2004 Scott James Remnant . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi + +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# +# Similar to PKG_CHECK_MODULES, make sure that the first instance of +# this or PKG_CHECK_MODULES is called, or make sure to call +# PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_ifval([$2], [$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$PKG_CONFIG"; then + if test -n "$$1"; then + pkg_cv_[]$1="$$1" + else + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + fi +else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - AC_SUBST($1_CFLAGS) - AC_SUBST($1_LIBS) - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi - - if test $succeeded = yes; then - ifelse([$3], , :, [$3]) - else - ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) - fi -]) + ifelse([$4], , [AC_MSG_ERROR(dnl +[Package requirements ($2) were not met: +$$1_PKG_ERRORS +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT +])], + [AC_MSG_RESULT([no]) + $4]) +elif test $pkg_failed = untried; then + ifelse([$4], , [AC_MSG_FAILURE(dnl +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see .])], + [$4]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + ifelse([$3], , :, [$3]) +fi[]dnl +])# PKG_CHECK_MODULES diff -rNu smalltalk-3.0.2/configure smalltalk-3.0.3/configure --- smalltalk-3.0.2/configure 2008-03-07 11:54:48.000000000 +0100 +++ smalltalk-3.0.3/configure 2008-05-14 12:04:54.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for GNU Smalltalk 3.0.2. +# Generated by GNU Autoconf 2.61 for GNU Smalltalk 3.0.3. # # Report bugs to . # @@ -724,8 +724,8 @@ # Identity of this package. PACKAGE_NAME='GNU Smalltalk' PACKAGE_TARNAME='smalltalk' -PACKAGE_VERSION='3.0.2' -PACKAGE_STRING='GNU Smalltalk 3.0.2' +PACKAGE_VERSION='3.0.3' +PACKAGE_STRING='GNU Smalltalk 3.0.3' PACKAGE_BUGREPORT='help-smalltalk@gnu.org' ac_unique_file="main.c" @@ -871,10 +871,15 @@ GPERF AUTOM4TE subdirs +PKG_CONFIG +FFI_CFLAGS +FFI_LIBS +INCFFI +LIBFFI LIBSNPRINTFV INCSNPRINTFV -HAVE_SIGSEGV_TRUE -HAVE_SIGSEGV_FALSE +INCSIGSEGV +LIBSIGSEGV imagedir LIBC_SO_NAME LIBC_SO_DIR @@ -902,7 +907,6 @@ BUILT_PACKAGES PACKAGE_DLOPEN_FLAGS enable_mysql_tests -PKG_CONFIG ATK_CFLAGS ATK_LIBS PANGO_CFLAGS @@ -941,7 +945,14 @@ CPPFLAGS CPP EMACS -EMACSLOADPATH' +EMACSLOADPATH +PKG_CONFIG +FFI_CFLAGS +FFI_LIBS +ATK_CFLAGS +ATK_LIBS +PANGO_CFLAGS +PANGO_LIBS' ac_subdirs_all='libffi snprintfv sigsegv' @@ -1446,7 +1457,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU Smalltalk 3.0.2 to adapt to many kinds of systems. +\`configure' configures GNU Smalltalk 3.0.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1516,7 +1527,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU Smalltalk 3.0.2:";; + short | recursive ) echo "Configuration of GNU Smalltalk 3.0.3:";; esac cat <<\_ACEOF @@ -1554,6 +1565,8 @@ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-emacs disable Emacs modes for Smalltalk --with-lispdir override the default lisp directory + --with-system-libffi=PATH use system libffi.la (search in PATH if given) + --with-system-libsigsegv=PATH use system libsigsegv.la likewise --with-imagedir=PATH path where to place the system image (default: /usr/local/var/lib/smalltalk) --with-gnu-ld assume the C compiler uses GNU ld [default=no] @@ -1581,6 +1594,14 @@ EMACS the Emacs editor command EMACSLOADPATH the Emacs library search path + PKG_CONFIG path to pkg-config utility + FFI_CFLAGS C compiler flags for FFI, overriding pkg-config + FFI_LIBS linker flags for FFI, overriding pkg-config + ATK_CFLAGS C compiler flags for ATK, overriding pkg-config + ATK_LIBS linker flags for ATK, overriding pkg-config + PANGO_CFLAGS + C compiler flags for PANGO, overriding pkg-config + PANGO_LIBS linker flags for PANGO, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1646,7 +1667,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU Smalltalk configure 3.0.2 +GNU Smalltalk configure 3.0.3 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1660,7 +1681,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU Smalltalk $as_me 3.0.2, which was +It was created by GNU Smalltalk $as_me 3.0.3, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2067,7 +2088,7 @@ VERSION=$PACKAGE_VERSION -VERSION_INFO=7:0:0 +VERSION_INFO=7:1:0 # Split the version number @@ -2434,7 +2455,7 @@ # Define the identity of the package. PACKAGE='smalltalk' - VERSION='3.0.2' + VERSION='3.0.3' cat >>confdefs.h <<_ACEOF @@ -5255,7 +5276,218 @@ -subdirs="$subdirs libffi" + +# Check whether --with-system-libffi was given. +if test "${with_system_libffi+set}" = set; then + withval=$with_system_libffi; +else + with_system_libffi=no +fi + + +if test $with_system_libffi = no; then + subdirs="$subdirs libffi" + + INCFFI='-I$(top_srcdir)/libffi/include -I$(top_builddir)/libffi/include' + LIBFFI='$(top_builddir)/libffi/libffi.la' +elif test $with_system_libffi = yes; then + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + PKG_CONFIG="" + fi + +fi + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for FFI" >&5 +echo $ECHO_N "checking for FFI... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$FFI_CFLAGS"; then + pkg_cv_FFI_CFLAGS="$FFI_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libffi\"") >&5 + ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$FFI_LIBS"; then + pkg_cv_FFI_LIBS="$FFI_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libffi\"") >&5 + ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_FFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + FFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libffi"` + else + FFI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libffi"` + fi + # Put the nasty error message in config.log where it belongs + echo "$FFI_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + INCFFI= LIBFFI=-lffi + +elif test $pkg_failed = untried; then + INCFFI= LIBFFI=-lffi + +else + FFI_CFLAGS=$pkg_cv_FFI_CFLAGS + FFI_LIBS=$pkg_cv_FFI_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + INCFFI="$FFI_CFLAGS" LIBFFI="$FFI_LIBS" +fi +else + INCFFI="-I$withval/../include" LIBFFI="-L$withval -lffi" +fi + case $ac_configure_args in @@ -5282,32 +5514,46 @@ enableval=$enable_generational_gc; else case $host in - *-*-cygwin* | *-*-mingw* | ia64-*-* ) enable_generational_gc=no ;; - *) enable_generational_gc=yes ;; + *-*-cygwin* | *-*-mingw* | ia64-*-* | alpha*-*-* ) + enable_generational_gc=no ;; + *) + enable_generational_gc=yes ;; esac fi -if test $enable_generational_gc != no; then - subdirs="$subdirs sigsegv" +# Check whether --with-system-libsigsegv was given. +if test "${with_system_libsigsegv+set}" = set; then + withval=$with_system_libsigsegv; +else + with_system_libsigsegv=no +fi + + +if test $enable_generational_gc = no; then + INCSIGSEGV= LIBSIGSEGV= +else + cat >>confdefs.h <<\_ACEOF #define HAVE_SIGSEGV_H 1 _ACEOF -fi - + if test $with_system_libsigsegv = no; then + subdirs="$subdirs sigsegv" -if test "$enable_generational_gc" != no; then - HAVE_SIGSEGV_TRUE= - HAVE_SIGSEGV_FALSE='#' -else - HAVE_SIGSEGV_TRUE='#' - HAVE_SIGSEGV_FALSE= + INCSIGSEGV='-I$(top_srcdir)/sigsegv/src -I$(top_builddir)/sigsegv/src' + LIBSIGSEGV='$(top_builddir)/sigsegv/src/libsigsegv.la' + elif test $with_system_libsigsegv = yes; then + INCSIGSEGV= LIBSIGSEGV=-lsigsegv + else + INCSIGSEGV="-I$withval/../include" LIBSIGSEGV="-L$withval -lsigsegv" + fi fi + # Check whether --with-imagedir was given. if test "${with_imagedir+set}" = set; then withval=$with_imagedir; imagedir="$withval" @@ -8530,7 +8776,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 8533 "configure"' > conftest.$ac_ext + echo '#line 8779 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -10088,11 +10334,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10091: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10337: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10095: \$? = $ac_status" >&5 + echo "$as_me:10341: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -10331,11 +10577,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10334: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10580: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10338: \$? = $ac_status" >&5 + echo "$as_me:10584: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -10391,11 +10637,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10394: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10640: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10398: \$? = $ac_status" >&5 + echo "$as_me:10644: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12539,7 +12785,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&6; } - succeeded=no +pkg_failed=no +{ echo "$as_me:$LINENO: checking for ATK" >&5 +echo $ECHO_N "checking for ATK... $ECHO_C" >&6; } - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test -n "$PKG_CONFIG"; then + if test -n "$ATK_CFLAGS"; then + pkg_cv_ATK_CFLAGS="$ATK_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"atk >= 1.0.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "atk >= 1.0.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_ATK_CFLAGS=`$PKG_CONFIG --cflags "atk >= 1.0.0" 2>/dev/null` else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6; } + if test -n "$ATK_LIBS"; then + pkg_cv_ATK_LIBS="$ATK_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"atk >= 1.0.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "atk >= 1.0.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_ATK_LIBS=`$PKG_CONFIG --libs "atk >= 1.0.0" 2>/dev/null` else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - fi - - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { echo "$as_me:$LINENO: checking for atk >= 1.0.0" >&5 -echo $ECHO_N "checking for atk >= 1.0.0... $ECHO_C" >&6; } - if $PKG_CONFIG --exists "atk >= 1.0.0" ; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - succeeded=yes +if test $pkg_failed = yes; then - { echo "$as_me:$LINENO: checking ATK_CFLAGS" >&5 -echo $ECHO_N "checking ATK_CFLAGS... $ECHO_C" >&6; } - ATK_CFLAGS=`$PKG_CONFIG --cflags "atk >= 1.0.0"` - { echo "$as_me:$LINENO: result: $ATK_CFLAGS" >&5 -echo "${ECHO_T}$ATK_CFLAGS" >&6; } - - { echo "$as_me:$LINENO: checking ATK_LIBS" >&5 -echo $ECHO_N "checking ATK_LIBS... $ECHO_C" >&6; } - ATK_LIBS=`$PKG_CONFIG --libs "atk >= 1.0.0"` - { echo "$as_me:$LINENO: result: $ATK_LIBS" >&5 -echo "${ECHO_T}$ATK_LIBS" >&6; } +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + ATK_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "atk >= 1.0.0"` else - ATK_CFLAGS="" - ATK_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - ATK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "atk >= 1.0.0"` - echo $ATK_PKG_ERRORS + ATK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "atk >= 1.0.0"` fi + # Put the nasty error message in config.log where it belongs + echo "$ATK_PKG_ERRORS" >&5 + { { echo "$as_me:$LINENO: error: Package requirements (atk >= 1.0.0) were not met: +$ATK_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then +Alternatively, you may set the environment variables ATK_CFLAGS +and ATK_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (atk >= 1.0.0) were not met: +$ATK_PKG_ERRORS - succeeded=no +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test -z "$PKG_CONFIG"; then - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +Alternatively, you may set the environment variables ATK_CFLAGS +and ATK_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables ATK_CFLAGS +and ATK_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables ATK_CFLAGS +and ATK_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS + ATK_CFLAGS=$pkg_cv_ATK_CFLAGS + ATK_LIBS=$pkg_cv_ATK_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } - test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for PANGO" >&5 +echo $ECHO_N "checking for PANGO... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$PANGO_CFLAGS"; then + pkg_cv_PANGO_CFLAGS="$PANGO_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pango >= 1.0.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "pango >= 1.0.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PANGO_CFLAGS=`$PKG_CONFIG --cflags "pango >= 1.0.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6; } + if test -n "$PANGO_LIBS"; then + pkg_cv_PANGO_LIBS="$PANGO_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pango >= 1.0.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "pango >= 1.0.0") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PANGO_LIBS=`$PKG_CONFIG --libs "pango >= 1.0.0" 2>/dev/null` else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - fi - if test "$PKG_CONFIG" = "no" ; then - echo "*** The pkg-config script could not be found. Make sure it is" - echo "*** in your path, or set the PKG_CONFIG environment variable" - echo "*** to the full path to pkg-config." - echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." - else - PKG_CONFIG_MIN_VERSION=0.9.0 - if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then - { echo "$as_me:$LINENO: checking for pango >= 1.0.0" >&5 -echo $ECHO_N "checking for pango >= 1.0.0... $ECHO_C" >&6; } - - if $PKG_CONFIG --exists "pango >= 1.0.0" ; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - succeeded=yes +if test $pkg_failed = yes; then - { echo "$as_me:$LINENO: checking PANGO_CFLAGS" >&5 -echo $ECHO_N "checking PANGO_CFLAGS... $ECHO_C" >&6; } - PANGO_CFLAGS=`$PKG_CONFIG --cflags "pango >= 1.0.0"` - { echo "$as_me:$LINENO: result: $PANGO_CFLAGS" >&5 -echo "${ECHO_T}$PANGO_CFLAGS" >&6; } - - { echo "$as_me:$LINENO: checking PANGO_LIBS" >&5 -echo $ECHO_N "checking PANGO_LIBS... $ECHO_C" >&6; } - PANGO_LIBS=`$PKG_CONFIG --libs "pango >= 1.0.0"` - { echo "$as_me:$LINENO: result: $PANGO_LIBS" >&5 -echo "${ECHO_T}$PANGO_LIBS" >&6; } +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + PANGO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pango >= 1.0.0"` else - PANGO_CFLAGS="" - PANGO_LIBS="" - ## If we have a custom action on failure, don't print errors, but - ## do set a variable so people can do so. - PANGO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pango >= 1.0.0"` - echo $PANGO_PKG_ERRORS + PANGO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pango >= 1.0.0"` fi + # Put the nasty error message in config.log where it belongs + echo "$PANGO_PKG_ERRORS" >&5 + { { echo "$as_me:$LINENO: error: Package requirements (pango >= 1.0.0) were not met: +$PANGO_PKG_ERRORS - else - echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." - echo "*** See http://www.freedesktop.org/software/pkgconfig" - fi - fi +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. - if test $succeeded = yes; then - enable_gtk=$maybe_enable_gtk - else - { { echo "$as_me:$LINENO: error: Library requirements (pango >= 1.0.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (pango >= 1.0.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +Alternatively, you may set the environment variables PANGO_CFLAGS +and PANGO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +echo "$as_me: error: Package requirements (pango >= 1.0.0) were not met: + +$PANGO_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables PANGO_CFLAGS +and PANGO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} { (exit 1); exit 1; }; } - fi +elif test $pkg_failed = untried; then + { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables PANGO_CFLAGS +and PANGO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +To get pkg-config, see . +See \`config.log' for more details." >&5 +echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables PANGO_CFLAGS +and PANGO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. - else - { { echo "$as_me:$LINENO: error: Library requirements (atk >= 1.0.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 -echo "$as_me: error: Library requirements (atk >= 1.0.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} +To get pkg-config, see . +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } - fi +else + PANGO_CFLAGS=$pkg_cv_PANGO_CFLAGS + PANGO_LIBS=$pkg_cv_PANGO_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + enable_gtk=$maybe_enable_gtk +fi +fi else { echo "$as_me:$LINENO: result: no" >&5 @@ -27231,13 +27501,6 @@ Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${HAVE_SIGSEGV_TRUE}" && test -z "${HAVE_SIGSEGV_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"HAVE_SIGSEGV\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"HAVE_SIGSEGV\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"INSTALL_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -27579,7 +27842,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU Smalltalk $as_me 3.0.2, which was +This file was extended by GNU Smalltalk $as_me 3.0.3, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -27636,7 +27899,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -GNU Smalltalk config.status 3.0.2 +GNU Smalltalk config.status 3.0.3 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -28005,10 +28268,15 @@ GPERF!$GPERF$ac_delim AUTOM4TE!$AUTOM4TE$ac_delim subdirs!$subdirs$ac_delim +PKG_CONFIG!$PKG_CONFIG$ac_delim +FFI_CFLAGS!$FFI_CFLAGS$ac_delim +FFI_LIBS!$FFI_LIBS$ac_delim +INCFFI!$INCFFI$ac_delim +LIBFFI!$LIBFFI$ac_delim LIBSNPRINTFV!$LIBSNPRINTFV$ac_delim INCSNPRINTFV!$INCSNPRINTFV$ac_delim -HAVE_SIGSEGV_TRUE!$HAVE_SIGSEGV_TRUE$ac_delim -HAVE_SIGSEGV_FALSE!$HAVE_SIGSEGV_FALSE$ac_delim +INCSIGSEGV!$INCSIGSEGV$ac_delim +LIBSIGSEGV!$LIBSIGSEGV$ac_delim imagedir!$imagedir$ac_delim LIBC_SO_NAME!$LIBC_SO_NAME$ac_delim LIBC_SO_DIR!$LIBC_SO_DIR$ac_delim @@ -28036,7 +28304,6 @@ BUILT_PACKAGES!$BUILT_PACKAGES$ac_delim PACKAGE_DLOPEN_FLAGS!$PACKAGE_DLOPEN_FLAGS$ac_delim enable_mysql_tests!$enable_mysql_tests$ac_delim -PKG_CONFIG!$PKG_CONFIG$ac_delim ATK_CFLAGS!$ATK_CFLAGS$ac_delim ATK_LIBS!$ATK_LIBS$ac_delim PANGO_CFLAGS!$PANGO_CFLAGS$ac_delim @@ -28065,7 +28332,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 75; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff -rNu smalltalk-3.0.2/configure.ac smalltalk-3.0.3/configure.ac --- smalltalk-3.0.2/configure.ac 2008-03-07 11:53:43.000000000 +0100 +++ smalltalk-3.0.3/configure.ac 2008-05-14 12:02:32.000000000 +0200 @@ -7,13 +7,13 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.60) -AC_INIT([GNU Smalltalk], 3.0.2, help-smalltalk@gnu.org, smalltalk) +AC_INIT([GNU Smalltalk], 3.0.3, help-smalltalk@gnu.org, smalltalk) MAINTAINER="bonzini@gnu.org" dnl CURRENT:REVISION:AGE means this is the REVISION-th version of dnl the CURRENT-th interface; all the interface from CURRENT-AGE dnl to CURRENT are supported. -GST_REVISION(7:0:0) +GST_REVISION(7:1:0) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([build-aux]) AC_CONFIG_SRCDIR([main.c]) @@ -72,7 +72,24 @@ dnl dnl ------------------------------ SUBDIRS -------------------- -AC_CONFIG_SUBDIRS(libffi) +AC_ARG_WITH(system-libffi, +[ --with-system-libffi[=PATH] use system libffi.la (search in PATH if given)], +[], [with_system_libffi=no]) + +if test $with_system_libffi = no; then + AC_CONFIG_SUBDIRS(libffi) + INCFFI='-I$(top_srcdir)/libffi/include -I$(top_builddir)/libffi/include' + LIBFFI='$(top_builddir)/libffi/libffi.la' +elif test $with_system_libffi = yes; then + PKG_CHECK_MODULES(FFI, libffi, + [ INCFFI="$FFI_CFLAGS" LIBFFI="$FFI_LIBS" ], + [ INCFFI= LIBFFI=-lffi ] + ) +else + INCFFI="-I$withval/../include" LIBFFI="-L$withval -lffi" +fi +AC_SUBST(INCFFI) +AC_SUBST(LIBFFI) case $ac_configure_args in *--enable-subdir) ;; @@ -84,15 +101,32 @@ AC_ARG_ENABLE(generational-gc, [ --disable-generational-gc disable generational garbage collection], , [case $host in - *-*-cygwin* | *-*-mingw* | ia64-*-* ) enable_generational_gc=no ;; - *) enable_generational_gc=yes ;; + *-*-cygwin* | *-*-mingw* | ia64-*-* | alpha*-*-* ) + enable_generational_gc=no ;; + *) + enable_generational_gc=yes ;; esac]) -if test $enable_generational_gc != no; then - AC_CONFIG_SUBDIRS(sigsegv) - AC_DEFINE(HAVE_SIGSEGV_H, 1, - [Define to 1 if libsigsegv is being used]) + +AC_ARG_WITH(system-libsigsegv, +[ --with-system-libsigsegv[=PATH] use system libsigsegv.la likewise], +[], [with_system_libsigsegv=no]) + +if test $enable_generational_gc = no; then + INCSIGSEGV= LIBSIGSEGV= +else + AC_DEFINE(HAVE_SIGSEGV_H, 1, [Define to 1 if libsigsegv is being used]) + if test $with_system_libsigsegv = no; then + AC_CONFIG_SUBDIRS(sigsegv) + INCSIGSEGV='-I$(top_srcdir)/sigsegv/src -I$(top_builddir)/sigsegv/src' + LIBSIGSEGV='$(top_builddir)/sigsegv/src/libsigsegv.la' + elif test $with_system_libsigsegv = yes; then + INCSIGSEGV= LIBSIGSEGV=-lsigsegv + else + INCSIGSEGV="-I$withval/../include" LIBSIGSEGV="-L$withval -lsigsegv" + fi fi -AM_CONDITIONAL(HAVE_SIGSEGV, test "$enable_generational_gc" != no) +AC_SUBST(INCSIGSEGV) +AC_SUBST(LIBSIGSEGV) AC_ARG_WITH(imagedir, [ --with-imagedir=PATH path where to place the system image diff -rNu smalltalk-3.0.2/doc/Makefile.in smalltalk-3.0.3/doc/Makefile.in --- smalltalk-3.0.2/doc/Makefile.in 2008-03-07 11:54:37.000000000 +0100 +++ smalltalk-3.0.3/doc/Makefile.in 2008-05-14 12:04:44.000000000 +0200 @@ -140,6 +140,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -152,10 +154,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -170,12 +172,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ diff -rNu smalltalk-3.0.2/doc/classes.texi smalltalk-3.0.3/doc/classes.texi --- smalltalk-3.0.2/doc/classes.texi 2008-03-07 12:04:08.000000000 +0100 +++ smalltalk-3.0.3/doc/classes.texi 2008-05-14 12:35:03.000000000 +0200 @@ -6107,12 +6107,12 @@ @item check:@- aPermission Not commented. -@meindex policy -@item policy +@meindex securityPolicy +@item securityPolicy Answer `securityPolicy'. -@meindex policy:@- -@item policy:@- aSecurityPolicy +@meindex securityPolicy:@- +@item securityPolicy:@- aSecurityPolicy Not commented. @end table @@ -12627,6 +12627,7 @@ @menu * FileDescriptor class-initialization:: (class) * FileDescriptor class-instance creation:: (class) +* FileDescriptor class-still unclassified:: (class) * FileDescriptor-accessing:: (instance) * FileDescriptor-basic:: (instance) * FileDescriptor-built ins:: (instance) @@ -12732,31 +12733,6 @@ To keep a file open, send it @-#removeToBeFinalized -@meindex open:@-mode:@- -@slindex append -@slindex create -@slindex readWrite -@slindex read -@slindex write -@slindex close -@slindex removeToBeFinalized - -@item open:@- fileName mode:@- fileMode -Open fileName in the required mode - answered by @-#append, @-#create, -@-#readWrite, @-#read or @-#write - and fail if the file cannot be opened. -Else answer a new FileStream. For mode anyway you can use any -standard C non-binary fopen mode. fileName can be a `virtual -filesystem' path, including URLs and '@-#' suffixes that are -inspected by the virtual filesystem layers and replaced with -tasks such as un-gzipping a file or extracting a file from an -archive. - -The file will be automatically closed upon GC if the object is not -referenced anymore, but it is better to close it as soon as you're -finished with it anyway, using @-#close. To keep a file open even when -no references exist anymore, send it @-#removeToBeFinalized - - @meindex open:@-mode:@-ifFail:@- @slindex append @slindex create @@ -12842,6 +12818,39 @@ +@node FileDescriptor class-still unclassified +@subsection FileDescriptor class:@- still unclassified + +@table @b +@meindex open:@-mode:@- +@slindex append +@slindex create +@slindex readWrite +@slindex read +@slindex write +@slindex close +@slindex removeToBeFinalized + +@item open:@- fileName mode:@- fileMode +Open fileName in the required mode - answered by @-#append, @-#create, +@-#readWrite, @-#read or @-#write - and fail if the file cannot be opened. +Else answer a new FileStream. For mode anyway you can use any +standard C non-binary fopen mode. fileName can be a `virtual +filesystem' path, including URLs and '@-#' suffixes that are +inspected by the virtual filesystem layers and replaced with +tasks such as un-gzipping a file or extracting a file from an +archive. + +The file will be automatically closed upon GC if the object is not +referenced anymore, but it is better to close it as soon as you're +finished with it anyway, using @-#close. To keep a file open even when +no references exist anymore, send it @-#removeToBeFinalized + + +@end table + + + @node FileDescriptor-accessing @subsection FileDescriptor:@- accessing @@ -13697,6 +13706,7 @@ * Float-basic:: (instance) * Float-built ins:: (instance) * Float-coercing:: (instance) +* Float-coercion:: (instance) * Float-comparing:: (instance) * Float-printing:: (instance) * Float-storing:: (instance) @@ -13913,6 +13923,20 @@ +@node Float-coercion +@subsection Float:@- coercion + +@table @b +@meindex asCNumber +@item asCNumber +Convert the receiver to a kind of number that is understood by +the C call-out mechanism. + + +@end table + + + @node Float-comparing @subsection Float:@- comparing @@ -14840,6 +14864,7 @@ * Fraction-accessing:: (instance) * Fraction-arithmetic:: (instance) * Fraction-coercing:: (instance) +* Fraction-coercion:: (instance) * Fraction-comparing:: (instance) * Fraction-converting:: (instance) * Fraction-optimized cases:: (instance) @@ -14987,6 +15012,20 @@ +@node Fraction-coercion +@subsection Fraction:@- coercion + +@table @b +@meindex asCNumber +@item asCNumber +Convert the receiver to a kind of number that is understood by +the C call-out mechanism. + + +@end table + + + @node Fraction-comparing @subsection Fraction:@- comparing @@ -16599,6 +16638,12 @@ @subsection LargeInteger:@- coercion @table @b +@meindex asCNumber +@item asCNumber +Convert the receiver to a kind of number that is understood by +the C call-out mechanism. + + @meindex coerce:@- @item coerce:@- aNumber Truncate the number; if needed, convert it to LargeInteger @@ -19534,6 +19579,7 @@ * Number class-converting:: (class) * Number class-testing:: (class) * Number-arithmetic:: (instance) +* Number-coercion:: (instance) * Number-comparing:: (instance) * Number-converting:: (instance) * Number-copying:: (instance) @@ -19644,6 +19690,20 @@ +@node Number-coercion +@subsection Number:@- coercion + +@table @b +@meindex asCNumber +@item asCNumber +Convert the receiver to a kind of number that is understood by +the C call-out mechanism. + + +@end table + + + @node Number-comparing @subsection Number:@- comparing @@ -21532,8 +21592,7 @@ @table @b @meindex changed:@- @item changed:@- aSymbol -Before quitting, wait until all processes are done. - +Not commented. @meindex initialize @item initialize @@ -25092,6 +25151,12 @@ @subsection ScaledDecimal:@- coercion @table @b +@meindex asCNumber +@item asCNumber +Convert the receiver to a kind of number that is understood by +the C call-out mechanism. + + @meindex asFloatD @item asFloatD Answer the receiver, converted to a FloatD @@ -26486,6 +26551,7 @@ * SmallInteger-bit arithmetic:: (instance) * SmallInteger-built ins:: (instance) * SmallInteger-builtins:: (instance) +* SmallInteger-coercion:: (instance) * SmallInteger-coercion methods:: (instance) * SmallInteger-testing functionality:: (instance) @end menu @@ -26730,6 +26796,20 @@ +@node SmallInteger-coercion +@subsection SmallInteger:@- coercion + +@table @b +@meindex asCNumber +@item asCNumber +Convert the receiver to a kind of number that is understood by +the C call-out mechanism. + + +@end table + + + @node SmallInteger-coercion methods @subsection SmallInteger:@- coercion methods @@ -27756,6 +27836,12 @@ collect them into an OrderedCollection. +@meindex allOccurrencesOfRegex:@-do:@- +@item allOccurrencesOfRegex:@- pattern do:@- aBlock +Find all the matches of pattern within the receiver and +pass the RegexResults objects to aBlock. + + @meindex allOccurrencesOfRegex:@-from:@-to:@- @item allOccurrencesOfRegex:@- pattern from:@- from to:@- to Find all the matches of pattern within the receiver and within the @@ -27763,6 +27849,13 @@ which is then returned. +@meindex allOccurrencesOfRegex:@-from:@-to:@-do:@- +@item allOccurrencesOfRegex:@- pattern from:@- from to:@- to do:@- aBlock +Find all the matches of pattern within the receiver and within the +given range of indices. For each match, pass the RegexResults object +to aBlock. + + @meindex asRegex @item asRegex Answer the receiver, converted to a Regex object. diff -rNu smalltalk-3.0.2/doc/gst-base.info smalltalk-3.0.3/doc/gst-base.info --- smalltalk-3.0.2/doc/gst-base.info 2008-03-07 12:12:21.000000000 +0100 +++ smalltalk-3.0.3/doc/gst-base.info 2008-05-14 12:35:05.000000000 +0200 @@ -16,10 +16,10 @@  Indirect: gst-base.info-1: 691 -gst-base.info-2: 299671 -gst-base.info-3: 598229 -gst-base.info-4: 777294 -gst-base.info-5: 1230129 +gst-base.info-2: 300026 +gst-base.info-3: 599722 +gst-base.info-4: 779467 +gst-base.info-5: 1233018  Tag Table: (Indirect) @@ -201,939 +201,944 @@ Node: Class-printing144106 Node: Class-saving and loading144503 Node: Class-security145885 -Node: Class-testing146169 -Node: Class-testing functionality146414 -Node: ClassDescription146647 -Node: ClassDescription-compiling147431 -Node: ClassDescription-conversion148273 -Node: ClassDescription-copying148740 -Node: ClassDescription-filing149951 -Node: ClassDescription-organization of messages and classes150748 -Node: ClassDescription-parsing class declarations152177 -Node: ClassDescription-printing152686 -Node: ClassDescription-still unclassified153483 -Node: CLong154036 -Node: CLong class-accessing154320 -Node: CLong-accessing154687 -Node: CLongDouble155007 -Node: CLongDouble class-accessing155306 -Node: CLongDouble-accessing155703 -Node: CObject156053 -Node: CObject class-conversion156958 -Node: CObject class-instance creation157222 -Node: CObject class-subclassing157842 -Node: CObject-accessing158112 -Node: CObject-C data access158555 -Node: CObject-conversion159173 -Node: CObject-finalization159836 -Node: CObject-pointer-like behavior160314 -Node: Collection162588 -Node: Collection class-instance creation163575 -Node: Collection class-multibyte encodings165023 -Node: Collection-adding165363 -Node: Collection-converting165726 -Node: Collection-copying Collections166997 -Node: Collection-enumeration167549 -Node: Collection-finalization171192 -Node: Collection-printing171511 -Node: Collection-removing171868 -Node: Collection-storing172822 -Node: Collection-testing collections173095 -Node: CompiledBlock173859 -Node: CompiledBlock class-instance creation174367 -Node: CompiledBlock-accessing175136 -Node: CompiledBlock-basic176209 -Node: CompiledBlock-printing176932 -Node: CompiledBlock-saving and loading177213 -Node: CompiledCode177648 -Node: CompiledCode class-cache flushing178511 -Node: CompiledCode class-instance creation178881 -Node: CompiledCode class-tables179480 -Node: CompiledCode-accessing180715 -Node: CompiledCode-basic182235 -Node: CompiledCode-copying183000 -Node: CompiledCode-debugging183239 -Node: CompiledCode-decoding bytecodes183512 -Node: CompiledCode-literals - iteration183937 -Node: CompiledCode-security184499 -Node: CompiledCode-testing accesses184831 -Node: CompiledCode-translation185998 -Node: CompiledMethod186272 -Node: CompiledMethod class-instance creation187269 -Node: CompiledMethod class-lean images188145 -Node: CompiledMethod-accessing188480 -Node: CompiledMethod-attributes190182 -Node: CompiledMethod-basic191138 -Node: CompiledMethod-c call-outs191455 -Node: CompiledMethod-compiling192005 -Node: CompiledMethod-invoking192855 -Node: CompiledMethod-printing193902 -Node: CompiledMethod-saving and loading194260 -Node: CompiledMethod-source code194730 -Node: CompiledMethod-testing195436 -Node: ContextPart196029 -Node: ContextPart class-built ins196897 -Node: ContextPart class-exception handling197212 -Node: ContextPart-accessing198208 -Node: ContextPart-built ins201551 -Node: ContextPart-copying202251 -Node: ContextPart-debugging202611 -Node: ContextPart-enumerating203469 -Node: ContextPart-exception handling204087 -Node: ContextPart-printing204363 -Node: ContextPart-security checks204776 -Node: Continuation205344 -Node: Continuation class-instance creation206014 -Node: Continuation-invocation206688 -Node: CPtr208055 -Node: CPtr-accessing208297 -Node: CPtrCType208846 -Node: CPtrCType class-instance creation209174 -Node: CPtrCType-accessing209545 -Node: CPtrCType-storing210046 -Node: CScalar210231 -Node: CScalar class-instance creation210527 -Node: CScalar-accessing210999 -Node: CScalarCType211528 -Node: CScalarCType-accessing211826 -Node: CScalarCType-storing212168 -Node: CShort212404 -Node: CShort class-accessing212688 -Node: CShort-accessing213060 -Node: CSmalltalk213385 -Node: CSmalltalk class-accessing213680 -Node: CSmalltalk-accessing214072 -Node: CString214417 -Node: CString class-accessing215465 -Node: CString class-instance creation215759 -Node: CString-accessing216263 -Node: CStringCType216792 -Node: CStringCType-accessing217061 -Node: CStruct217276 -Node: CStruct class-subclass creation217536 -Node: CType217777 -Node: CType class-C instance creation218941 -Node: CType class-initialization219635 -Node: CType-accessing219892 -Node: CType-C instance creation220744 -Node: CType-storing221269 -Node: CUChar221480 -Node: CUChar class-getting info221755 -Node: CUChar-accessing222136 -Node: CUInt222464 -Node: CUInt class-accessing222733 -Node: CUInt-accessing223100 -Node: CULong223420 -Node: CULong class-accessing223693 -Node: CULong-accessing224065 -Node: CUnion224390 -Node: CUnion class-subclass creation224642 -Node: CUShort224879 -Node: CUShort class-accessing225156 -Node: CUShort-accessing225533 -Node: Date225863 -Node: Date class-basic227335 -Node: Date class-instance creation (ANSI)228463 -Node: Date class-instance creation (Blue Book)228953 -Node: Date-basic230273 -Node: Date-compatibility (non-ANSI)230817 -Node: Date-date computations231230 -Node: Date-printing232941 -Node: Date-storing233169 -Node: Date-testing233392 -Node: DateTime233711 -Node: DateTime class-information234373 -Node: DateTime class-instance creation234664 -Node: DateTime class-instance creation (non-ANSI)235965 -Node: DateTime-basic236706 -Node: DateTime-computations237053 -Node: DateTime-printing237745 -Node: DateTime-splitting in dates & times238011 -Node: DateTime-storing238610 -Node: DateTime-testing238875 -Node: DateTime-time zones239250 -Node: DeferredVariableBinding240380 -Node: DeferredVariableBinding class-basic240981 -Node: DeferredVariableBinding-basic241620 -Node: DeferredVariableBinding-storing242108 -Node: Delay242489 -Node: Delay class-instance creation243303 -Node: Delay class-timer process243780 -Node: Delay-accessing244604 -Node: Delay-comparing244891 -Node: Delay-delaying245172 -Node: Delay-initialization245488 -Node: Delay-instance creation245761 -Node: DelayedAdaptor246038 -Node: DelayedAdaptor-accessing246574 -Node: Dictionary246953 -Node: Dictionary class-instance creation248161 -Node: Dictionary-accessing248605 -Node: Dictionary-awful ST-80 compatibility hacks250583 -Node: Dictionary-dictionary enumerating251046 -Node: Dictionary-dictionary removing252134 -Node: Dictionary-dictionary testing253003 -Node: Dictionary-polymorphism hacks253677 -Node: Dictionary-printing253962 -Node: Dictionary-rehashing254326 -Node: Dictionary-storing254543 -Node: Dictionary-testing254805 -Node: DirectedMessage255081 -Node: DirectedMessage class-creating instances255657 -Node: DirectedMessage-accessing256383 -Node: DirectedMessage-basic256691 -Node: DirectedMessage-multiple process257115 -Node: DirectedMessage-saving and loading257713 -Node: Directory258151 -Node: Directory class-file name management258891 -Node: Directory class-file operations259430 -Node: Directory class-reading system defaults260115 -Node: Directory-accessing261330 -Node: Directory-enumerating262431 -Node: DLD263406 -Node: DLD class-C call-outs264086 -Node: DLD class-dynamic linking264338 -Node: DumperProxy265684 -Node: DumperProxy class-accessing266220 -Node: DumperProxy class-instance creation266685 -Node: DumperProxy-saving and restoring267190 -Node: Duration267605 -Node: Duration class-instance creation268016 -Node: Duration class-instance creation (non ANSI)268516 -Node: Duration-arithmetics268995 -Node: Error270183 -Node: Error-exception description270508 -Node: Exception270849 -Node: Exception class-comparison271987 -Node: Exception class-creating ExceptionCollections272451 -Node: Exception class-initialization272875 -Node: Exception class-instance creation273257 -Node: Exception class-interoperability with TrappableEvents273841 -Node: Exception-comparison274315 -Node: Exception-exception description274763 -Node: Exception-exception signaling275206 -Node: ExceptionSet275599 -Node: ExceptionSet class-instance creation276181 -Node: ExceptionSet-enumerating276446 -Node: False277010 -Node: False-basic277409 -Node: False-C hacks278403 -Node: False-printing278583 -Node: File278784 -Node: File class-C functions279647 -Node: File class-file name management279928 -Node: File class-file operations281467 -Node: File class-instance creation282398 -Node: File class-reading system defaults282900 -Node: File class-testing283254 -Node: File-accessing283906 -Node: File-file name management285632 -Node: File-file operations286486 -Node: File-printing288316 -Node: File-testing288620 -Node: FileDescriptor289680 -Node: FileDescriptor class-initialization290841 -Node: FileDescriptor class-instance creation291179 -Node: FileDescriptor-accessing297060 -Node: FileDescriptor-basic298220 -Node: FileDescriptor-built ins299671 -Node: FileDescriptor-class type methods301187 -Node: FileDescriptor-initialize-release301617 -Node: FileDescriptor-low-level access302209 -Node: FileDescriptor-overriding inherited methods303437 -Node: FileDescriptor-printing304281 -Node: FileDescriptor-testing304581 -Node: FileSegment304805 -Node: FileSegment class-basic305424 -Node: FileSegment class-installing305781 -Node: FileSegment-basic306167 -Node: FileSegment-equality307166 -Node: FileStream307449 -Node: FileStream class-file-in308165 -Node: FileStream class-standard streams311702 -Node: FileStream-basic312442 -Node: FileStream-buffering313391 -Node: FileStream-compiling314604 -Node: FileStream-overriding inherited methods314979 -Node: FileStream-testing315760 -Node: Float315982 -Node: Float class-byte-order dependancies316865 -Node: Float class-characterization317145 -Node: Float-arithmetic318167 -Node: Float-basic318577 -Node: Float-built ins318772 -Node: Float-coercing319713 -Node: Float-comparing320218 -Node: Float-printing320868 -Node: Float-storing321093 -Node: Float-testing321501 -Node: Float-testing functionality322270 -Node: Float-transcendental operations322508 -Node: FloatD322993 -Node: FloatD class-byte-order dependencies323498 -Node: FloatD class-characterization323893 -Node: FloatD class-converting325167 -Node: FloatD-built ins325423 -Node: FloatD-coercing326660 -Node: FloatE327063 -Node: FloatE class-byte-order dependancies327618 -Node: FloatE class-byte-order dependencies327910 -Node: FloatE class-characterization328276 -Node: FloatE class-converting329838 -Node: FloatE-built ins330094 -Node: FloatE-coercing331331 -Node: FloatQ331734 -Node: FloatQ class-byte-order dependancies332280 -Node: FloatQ class-characterization332565 -Node: FloatQ class-converting334127 -Node: FloatQ-built ins334383 -Node: FloatQ-coercing335620 -Node: FloatQ-misc math336048 -Node: Fraction336245 -Node: Fraction class-converting337002 -Node: Fraction class-instance creation337246 -Node: Fraction-accessing337631 -Node: Fraction-arithmetic337921 -Node: Fraction-coercing338645 -Node: Fraction-comparing339284 -Node: Fraction-converting339786 -Node: Fraction-optimized cases340287 -Node: Fraction-printing340721 -Node: Fraction-testing341051 -Node: Generator341258 -Node: Generator class-instance creation343564 -Node: Generator-stream protocol344311 -Node: Getopt345374 -Node: Getopt class-instance creation345740 -Node: Halt348379 -Node: Halt-description348673 -Node: HashedCollection348924 -Node: HashedCollection class-instance creation349785 -Node: HashedCollection-accessing350257 -Node: HashedCollection-builtins350837 -Node: HashedCollection-copying351614 -Node: HashedCollection-enumerating the elements of a collection352092 -Node: HashedCollection-rehashing352468 -Node: HashedCollection-removing352754 -Node: HashedCollection-saving and loading353163 -Node: HashedCollection-storing353677 -Node: HashedCollection-testing collections354004 -Node: HomedAssociation354951 -Node: HomedAssociation class-basic355521 -Node: HomedAssociation-accessing355823 -Node: HomedAssociation-finalization356189 -Node: HomedAssociation-storing356809 -Node: IdentityDictionary357078 -Node: IdentitySet357471 -Node: IdentitySet-testing357870 -Node: Integer358131 -Node: Integer class-converting358960 -Node: Integer-accessing359321 -Node: Integer-basic359560 -Node: Integer-bit operators359770 -Node: Integer-converting361138 -Node: Integer-extension361864 -Node: Integer-iterators362177 -Node: Integer-math methods362543 -Node: Integer-printing363444 -Node: Integer-storing364690 -Node: Integer-testing functionality365017 -Node: Interval365291 -Node: Interval class-instance creation365887 -Node: Interval-basic366489 -Node: Interval-printing367175 -Node: Interval-storing367508 -Node: Interval-testing367755 -Node: LargeArray368026 -Node: LargeArray-overridden368429 -Node: LargeArrayedCollection368621 -Node: LargeArrayedCollection class-instance creation369161 -Node: LargeArrayedCollection-accessing369520 -Node: LargeArrayedCollection-basic370024 -Node: LargeByteArray370425 -Node: LargeByteArray-overridden370853 -Node: LargeInteger371294 -Node: LargeInteger-accessing372129 -Node: LargeInteger-arithmetic372368 -Node: LargeInteger-bit operations373495 -Node: LargeInteger-built-ins374170 -Node: LargeInteger-coercion375249 -Node: LargeInteger-disabled375685 -Node: LargeInteger-primitive operations376060 -Node: LargeInteger-testing376540 -Node: LargeNegativeInteger377184 -Node: LargeNegativeInteger-converting377886 -Node: LargeNegativeInteger-numeric testing378274 -Node: LargeNegativeInteger-reverting to LargePositiveInteger378809 -Node: LargePositiveInteger379381 -Node: LargePositiveInteger-arithmetic380258 -Node: LargePositiveInteger-converting380734 -Node: LargePositiveInteger-helper byte-level methods381288 -Node: LargePositiveInteger-numeric testing383025 -Node: LargePositiveInteger-primitive operations383561 -Node: LargeWordArray384255 -Node: LargeWordArray-overridden384685 -Node: LargeZeroInteger384984 -Node: LargeZeroInteger-accessing385812 -Node: LargeZeroInteger-arithmetic386077 -Node: LargeZeroInteger-numeric testing387007 -Node: LargeZeroInteger-printing387344 -Node: Link387642 -Node: Link class-instance creation388187 -Node: Link-basic388419 -Node: Link-iteration388672 -Node: LinkedList389133 -Node: LinkedList-accessing389741 -Node: LinkedList-adding390057 -Node: LinkedList-enumerating390790 -Node: LinkedList-testing391270 -Node: LookupKey391626 -Node: LookupKey class-basic392180 -Node: LookupKey-accessing392422 -Node: LookupKey-printing392687 -Node: LookupKey-storing392934 -Node: LookupKey-testing393190 -Node: LookupTable393624 -Node: LookupTable class-instance creation394499 -Node: LookupTable-accessing394761 -Node: LookupTable-enumerating395570 -Node: LookupTable-hashing396095 -Node: LookupTable-rehashing396336 -Node: LookupTable-removing396561 -Node: LookupTable-storing397063 -Node: Magnitude397302 -Node: Magnitude-basic397758 -Node: Magnitude-misc methods398290 -Node: MappedCollection398706 -Node: MappedCollection class-instance creation400081 -Node: MappedCollection-basic400534 -Node: Memory402289 -Node: Memory class-accessing402849 -Node: Message406981 -Node: Message class-creating instances407657 -Node: Message-accessing408050 -Node: Message-basic408492 -Node: Message-printing408791 -Node: MessageNotUnderstood409123 -Node: MessageNotUnderstood-accessing409617 -Node: MessageNotUnderstood-description409956 -Node: Metaclass410237 -Node: Metaclass class-instance creation411236 -Node: Metaclass-accessing411521 -Node: Metaclass-basic411967 -Node: Metaclass-delegation413311 -Node: Metaclass-filing414840 -Node: Metaclass-printing415131 -Node: Metaclass-testing functionality415686 -Node: MethodContext415947 -Node: MethodContext-accessing416489 -Node: MethodContext-debugging417799 -Node: MethodContext-printing418581 -Node: MethodDictionary418827 -Node: MethodDictionary-adding419358 -Node: MethodDictionary-rehashing419607 -Node: MethodDictionary-removing419861 -Node: MethodInfo420273 -Node: MethodInfo-accessing420759 -Node: MethodInfo-equality421704 -Node: Namespace421997 -Node: Namespace class-accessing422605 -Node: Namespace class-disabling instance creation423008 -Node: Namespace class-initialization423404 -Node: Namespace-accessing423841 -Node: Namespace-namespace hierarchy424130 -Node: Namespace-overrides for superspaces424628 -Node: Namespace-printing426425 -Node: NetClients.URIResolver426929 -Node: NetClients.URIResolver class-api427384 -Node: NetClients.URIResolver class-instance creation428534 -Node: NetClients.URL428911 -Node: NetClients.URL class-encoding URLs429632 -Node: NetClients.URL class-instance creation430137 -Node: NetClients.URL-accessing430962 -Node: NetClients.URL-comparing433687 -Node: NetClients.URL-copying434213 -Node: NetClients.URL-initialize-release434750 -Node: NetClients.URL-printing435049 -Node: NetClients.URL-testing435343 -Node: NetClients.URL-utilities436119 -Node: Notification436429 -Node: Notification-exception description436882 -Node: NullProxy437344 -Node: NullProxy class-instance creation437956 -Node: NullProxy-accessing438227 -Node: NullValueHolder438479 -Node: NullValueHolder class-creating instances439068 -Node: NullValueHolder-accessing439415 -Node: Number439763 -Node: Number class-converting440659 -Node: Number class-testing441119 -Node: Number-arithmetic441387 -Node: Number-comparing442720 -Node: Number-converting443273 -Node: Number-copying444628 -Node: Number-error raising444943 -Node: Number-misc math445314 -Node: Number-point creation447479 -Node: Number-retrying447774 -Node: Number-shortcuts and iterators449579 -Node: Number-testing450828 -Node: Number-truncation and round off452264 -Node: Object453079 -Node: Object class-initialization454035 -Node: Object-built ins454634 -Node: Object-change and update463353 -Node: Object-class type methods464560 -Node: Object-conversion465379 -Node: Object-copying465626 -Node: Object-debugging466290 -Node: Object-dependents access466619 -Node: Object-error raising467323 -Node: Object-finalization468010 -Node: Object-printing469003 -Node: Object-relational operators470748 -Node: Object-saving and loading471112 -Node: Object-storing472115 -Node: Object-syntax shortcuts472813 -Node: Object-testing functionality473140 -Node: Object-VM callbacks474708 -Node: ObjectDumper475193 -Node: ObjectDumper class-establishing proxy classes476398 -Node: ObjectDumper class-instance creation477247 -Node: ObjectDumper class-shortcuts477660 -Node: ObjectDumper class-testing478054 -Node: ObjectDumper-accessing478498 -Node: ObjectDumper-loading/dumping objects479006 -Node: ObjectDumper-stream interface479446 -Node: ObjectMemory479828 -Node: ObjectMemory class-accessing480913 -Node: ObjectMemory class-builtins481180 -Node: ObjectMemory class-initialization484527 -Node: ObjectMemory class-saving the image484894 -Node: ObjectMemory-accessing485222 -Node: ObjectMemory-builtins490176 -Node: ObjectMemory-derived information490461 -Node: OrderedCollection491448 -Node: OrderedCollection class-instance creation492170 -Node: OrderedCollection-accessing492528 -Node: OrderedCollection-adding492995 -Node: OrderedCollection-removing495059 -Node: Package495714 -Node: Package class-instance creation496188 -Node: Package-accessing496444 -Node: PackageLoader499504 -Node: PackageLoader class-accessing500068 -Node: PackageLoader class-loading502689 -Node: PackageLoader class-testing503089 -Node: Permission503380 -Node: Permission class-testing503849 -Node: Permission-accessing504599 -Node: Permission-testing505177 -Node: PluggableAdaptor505427 -Node: PluggableAdaptor class-creating instances506064 -Node: PluggableAdaptor-accessing507160 -Node: PluggableProxy507461 -Node: PluggableProxy class-accessing508099 -Node: PluggableProxy-saving and restoring508549 -Node: Point508984 -Node: Point class-instance creation509723 -Node: Point-accessing510036 -Node: Point-arithmetic510470 -Node: Point-comparing511189 -Node: Point-converting512002 -Node: Point-point functions512521 -Node: Point-printing513469 -Node: Point-storing513703 -Node: Point-truncation and round off513951 -Node: PositionableStream514363 -Node: PositionableStream class-instance creation515327 -Node: PositionableStream-accessing-reading515852 -Node: PositionableStream-class type methods517227 -Node: PositionableStream-compiling517762 -Node: PositionableStream-positioning518256 -Node: PositionableStream-testing519487 -Node: PositionableStream-truncating519969 -Node: Process520269 -Node: Process-accessing520849 -Node: Process-basic521974 -Node: Process-builtins523686 -Node: Process-printing524806 -Node: ProcessorScheduler525020 -Node: ProcessorScheduler class-instance creation525699 -Node: ProcessorScheduler-basic526013 -Node: ProcessorScheduler-built ins527487 -Node: ProcessorScheduler-idle tasks528189 -Node: ProcessorScheduler-printing528693 -Node: ProcessorScheduler-priorities529012 -Node: ProcessorScheduler-storing530678 -Node: ProcessorScheduler-timed invocation531019 -Node: Promise531590 -Node: Promise class-creating instances532217 -Node: Promise-accessing532628 -Node: Promise-initializing533083 -Node: Promise-printing533327 -Node: Promise-still unclassified533569 -Node: Random533825 -Node: Random class-instance creation534286 -Node: Random class-shortcuts534668 -Node: Random-basic535058 -Node: Random-testing535488 -Node: ReadStream535814 -Node: ReadStream class-instance creation536221 -Node: ReadWriteStream536641 -Node: ReadWriteStream class-instance creation537139 -Node: ReadWriteStream-positioning537777 -Node: Rectangle538096 -Node: Rectangle class-instance creation538897 -Node: Rectangle-accessing539455 -Node: Rectangle-copying541869 -Node: Rectangle-printing542103 -Node: Rectangle-rectangle functions542445 -Node: Rectangle-testing544348 -Node: Rectangle-transforming545178 -Node: Rectangle-truncation and round off545818 -Node: RecursionLock546123 -Node: RecursionLock class-instance creation546527 -Node: RecursionLock-accessing546777 -Node: RecursionLock-mutual exclusion547390 -Node: RecursionLock-printing547765 -Node: Regex548031 -Node: Regex class-instance creation549046 -Node: Regex-basic549305 -Node: Regex-conversion549727 -Node: Regex-printing550033 -Node: RegexResults550693 -Node: RegexResults-accessing551311 -Node: RegexResults-testing552824 -Node: RootNamespace553856 -Node: RootNamespace class-instance creation554416 -Node: RootNamespace-namespace hierarchy554765 -Node: RootNamespace-overrides for superspaces555212 -Node: RootNamespace-printing555843 -Node: RunArray556367 -Node: RunArray class-instance creation557340 -Node: RunArray-accessing557628 -Node: RunArray-adding557978 -Node: RunArray-basic559068 -Node: RunArray-copying559389 -Node: RunArray-enumerating559761 -Node: RunArray-removing560237 -Node: RunArray-searching560718 -Node: RunArray-testing561148 -Node: ScaledDecimal561407 -Node: ScaledDecimal class-instance creation562185 -Node: ScaledDecimal-arithmetic562600 -Node: ScaledDecimal-coercion563335 -Node: ScaledDecimal-comparing564256 -Node: ScaledDecimal-constants564908 -Node: ScaledDecimal-printing565226 -Node: ScaledDecimal-storing565702 -Node: SecurityPolicy566143 -Node: SecurityPolicy-modifying566731 -Node: SecurityPolicy-querying567083 -Node: Semaphore567342 -Node: Semaphore class-instance creation568018 -Node: Semaphore-accessing568407 -Node: Semaphore-builtins568907 -Node: Semaphore-mutual exclusion570268 -Node: Semaphore-printing570618 -Node: SequenceableCollection570864 -Node: SequenceableCollection class-instance creation571678 -Node: SequenceableCollection-basic572172 -Node: SequenceableCollection-concatenating576820 -Node: SequenceableCollection-copying SequenceableCollections578608 -Node: SequenceableCollection-enumerating581373 -Node: SequenceableCollection-replacing items584935 -Node: SequenceableCollection-sorting585898 -Node: SequenceableCollection-testing586472 -Node: Set587023 -Node: Set-arithmetic587455 -Node: Set-awful ST-80 compatibility hacks587800 -Node: Set-comparing588177 -Node: SharedQueue588588 -Node: SharedQueue class-instance creation589122 -Node: SharedQueue-accessing589507 -Node: Signal590025 -Node: Signal-accessing590693 -Node: Signal-copying591548 -Node: Signal-exception handling591821 -Node: SingletonProxy594452 -Node: SingletonProxy class-accessing595068 -Node: SingletonProxy class-instance creation595449 -Node: SingletonProxy-saving and restoring595906 -Node: SmallInteger596349 -Node: SmallInteger class-getting limits597048 -Node: SmallInteger class-testing597550 -Node: SmallInteger-bit arithmetic597862 -Node: SmallInteger-built ins598229 -Node: SmallInteger-builtins600659 -Node: SmallInteger-coercion methods601426 -Node: SmallInteger-testing functionality601798 -Node: SortedCollection602047 -Node: SortedCollection class-hacking603191 -Node: SortedCollection class-instance creation603476 -Node: SortedCollection-basic604005 -Node: SortedCollection-copying604566 -Node: SortedCollection-disabled604889 -Node: SortedCollection-enumerating605759 -Node: SortedCollection-saving and loading606105 -Node: SortedCollection-searching606467 -Node: Stream607070 -Node: Stream-accessing-reading608109 -Node: Stream-accessing-writing609981 -Node: Stream-basic610694 -Node: Stream-built ins610885 -Node: Stream-character writing611815 -Node: Stream-concatenating612686 -Node: Stream-enumerating613359 -Node: Stream-filing out613737 -Node: Stream-filtering614097 -Node: Stream-polymorphism616268 -Node: Stream-positioning616674 -Node: Stream-printing617856 -Node: Stream-storing618611 -Node: Stream-testing618979 -Node: String619493 -Node: String class-instance creation620565 -Node: String class-multibyte encodings621049 -Node: String-accessing621377 -Node: String-basic621774 -Node: String-built ins622179 -Node: String-converting624042 -Node: String-printing624521 -Node: String-regex625369 -Node: String-testing functionality631548 -Node: Symbol631750 -Node: Symbol class-built ins632588 -Node: Symbol class-instance creation632819 -Node: Symbol class-symbol table633974 -Node: Symbol-basic635399 -Node: Symbol-built ins636168 -Node: Symbol-converting636493 -Node: Symbol-misc636849 -Node: Symbol-storing637029 -Node: Symbol-testing637935 -Node: Symbol-testing functionality638219 -Node: SymLink638456 -Node: SymLink class-instance creation639017 -Node: SymLink-accessing639353 -Node: SymLink-iteration639704 -Node: SymLink-printing639935 -Node: SystemDictionary640151 -Node: SystemDictionary class-initialization641108 -Node: SystemDictionary-basic641383 -Node: SystemDictionary-builtins641726 -Node: SystemDictionary-c call-outs643072 -Node: SystemDictionary-command-line643481 -Node: SystemDictionary-miscellaneous646172 -Node: SystemDictionary-printing646638 -Node: SystemDictionary-special accessing647073 -Node: SystemDictionary-testing647686 -Node: SystemExceptions.AlreadyDefined648036 -Node: SystemExceptions.AlreadyDefined-accessing648562 -Node: SystemExceptions.ArgumentOutOfRange648830 -Node: SystemExceptions.ArgumentOutOfRange class-signaling649430 -Node: SystemExceptions.ArgumentOutOfRange-accessing649852 -Node: SystemExceptions.BadReturn650446 -Node: SystemExceptions.BadReturn-accessing650936 -Node: SystemExceptions.CInterfaceError651196 -Node: SystemExceptions.CInterfaceError-accessing651707 -Node: SystemExceptions.EmptyCollection651991 -Node: SystemExceptions.EmptyCollection-accessing652488 -Node: SystemExceptions.EndOfStream652772 -Node: SystemExceptions.EndOfStream class-signaling653273 -Node: SystemExceptions.EndOfStream-accessing653629 -Node: SystemExceptions.FileError654065 -Node: SystemExceptions.FileError-accessing654554 -Node: SystemExceptions.IndexOutOfRange654814 -Node: SystemExceptions.IndexOutOfRange class-signaling655410 -Node: SystemExceptions.IndexOutOfRange-accessing655792 -Node: SystemExceptions.InvalidArgument656322 -Node: SystemExceptions.InvalidArgument-accessing656829 -Node: SystemExceptions.InvalidProcessState657102 -Node: SystemExceptions.InvalidProcessState-accessing657643 -Node: SystemExceptions.InvalidSize657943 -Node: SystemExceptions.InvalidSize-accessing658420 -Node: SystemExceptions.InvalidValue658688 -Node: SystemExceptions.InvalidValue class-signaling659225 -Node: SystemExceptions.InvalidValue-accessing659690 -Node: SystemExceptions.MustBeBoolean660197 -Node: SystemExceptions.MustBeBoolean class-signaling660688 -Node: SystemExceptions.MutationError661018 -Node: SystemExceptions.MutationError class-instance creation661557 -Node: SystemExceptions.MutationError-accessing661950 -Node: SystemExceptions.NoRunnableProcess662289 -Node: SystemExceptions.NoRunnableProcess-accessing662795 -Node: SystemExceptions.NotEnoughElements663087 -Node: SystemExceptions.NotEnoughElements class-signaling663653 -Node: SystemExceptions.NotEnoughElements-accessing664038 -Node: SystemExceptions.NotFound664590 -Node: SystemExceptions.NotFound class-accessing665116 -Node: SystemExceptions.NotFound-accessing665507 -Node: SystemExceptions.NotImplemented665813 -Node: SystemExceptions.NotImplemented-accessing666281 -Node: SystemExceptions.NotIndexable666561 -Node: SystemExceptions.NotIndexable-accessing667034 -Node: SystemExceptions.NotYetImplemented667306 -Node: SystemExceptions.NotYetImplemented-accessing667832 -Node: SystemExceptions.PackageNotAvailable668124 -Node: SystemExceptions.PackageNotAvailable class-still unclassified668648 -Node: SystemExceptions.PackageNotAvailable-description669086 -Node: SystemExceptions.PrimitiveFailed669523 -Node: SystemExceptions.PrimitiveFailed-accessing670020 -Node: SystemExceptions.ProcessBeingTerminated670304 -Node: SystemExceptions.ProcessBeingTerminated-accessing670798 -Node: SystemExceptions.ProcessTerminated671262 -Node: SystemExceptions.ProcessTerminated-accessing671797 -Node: SystemExceptions.ReadOnlyObject672089 -Node: SystemExceptions.ReadOnlyObject-accessing672575 -Node: SystemExceptions.SecurityError672855 -Node: SystemExceptions.SecurityError class-accessing673429 -Node: SystemExceptions.SecurityError-accessing673825 -Node: SystemExceptions.ShouldNotImplement674311 -Node: SystemExceptions.ShouldNotImplement-accessing674850 -Node: SystemExceptions.SubclassResponsibility675146 -Node: SystemExceptions.SubclassResponsibility-accessing675726 -Node: SystemExceptions.UserInterrupt676038 -Node: SystemExceptions.UserInterrupt-accessing676510 -Node: SystemExceptions.VerificationError676786 -Node: SystemExceptions.VerificationError-accessing677271 -Node: SystemExceptions.VMError677563 -Node: SystemExceptions.VMError-accessing678003 -Node: SystemExceptions.WrongArgumentCount678255 -Node: SystemExceptions.WrongArgumentCount-accessing678821 -Node: SystemExceptions.WrongClass679117 -Node: SystemExceptions.WrongClass class-signaling679745 -Node: SystemExceptions.WrongClass-accessing680417 -Node: SystemExceptions.WrongMessageSent681086 -Node: SystemExceptions.WrongMessageSent class-signaling681743 -Node: SystemExceptions.WrongMessageSent-accessing682176 -Node: TextCollector682781 -Node: TextCollector class-accessing683491 -Node: TextCollector-accessing684004 -Node: TextCollector-printing684839 -Node: TextCollector-set up685187 -Node: TextCollector-storing685766 -Node: Time686110 -Node: Time class-basic (UTC)686894 -Node: Time class-builtins687448 -Node: Time class-clocks688489 -Node: Time class-initialization689060 -Node: Time class-instance creation689420 -Node: Time-accessing (ANSI for DateAndTimes)690313 -Node: Time-accessing (non ANSI & for Durations)690845 -Node: Time-arithmetic691311 -Node: Time-comparing691902 -Node: True692203 -Node: True-basic692583 -Node: True-C hacks693549 -Node: True-printing693725 -Node: UndefinedObject693923 -Node: UndefinedObject-basic694659 -Node: UndefinedObject-class creation - alternative694958 -Node: UndefinedObject-class polymorphism697247 -Node: UndefinedObject-CObject interoperability700339 -Node: UndefinedObject-dependents access700767 -Node: UndefinedObject-printing701156 -Node: UndefinedObject-storing701650 -Node: UndefinedObject-testing702129 -Node: UnicodeCharacter702981 -Node: UnicodeCharacter class-built ins703573 -Node: UnicodeString704108 -Node: UnicodeString class-converting704687 -Node: UnicodeString class-multibyte encodings705065 -Node: UnicodeString-built-ins705564 -Node: UnicodeString-converting705837 -Node: UnicodeString-multibyte encodings706577 -Node: ValueAdaptor707085 -Node: ValueAdaptor class-creating instances707579 -Node: ValueAdaptor-accessing707883 -Node: ValueAdaptor-printing708306 -Node: ValueHolder708535 -Node: ValueHolder class-creating instances709162 -Node: ValueHolder-accessing709561 -Node: ValueHolder-initializing709870 -Node: VariableBinding710109 -Node: VariableBinding-printing710753 -Node: VariableBinding-saving and loading711084 -Node: VariableBinding-storing711557 -Node: VariableBinding-testing712048 -Node: VersionableObjectProxy712322 -Node: VersionableObjectProxy class-saving and restoring713230 -Node: VersionableObjectProxy-saving and restoring714270 -Node: VFS.ArchiveFileHandler714620 -Node: VFS.ArchiveFileHandler-ArchiveMemberHandler protocol715567 -Node: VFS.ArchiveFileHandler-directory operations716769 -Node: VFS.ArchiveFileHandler-querying717432 -Node: VFS.ArchiveFileHandler-TmpFileArchiveMemberHandler protocol717935 -Node: VFS.ArchiveMemberHandler718572 -Node: VFS.ArchiveMemberHandler-accessing719294 -Node: VFS.ArchiveMemberHandler-directory operations720707 -Node: VFS.ArchiveMemberHandler-file operations721344 -Node: VFS.ArchiveMemberHandler-initializing722026 -Node: VFS.ArchiveMemberHandler-testing722730 -Node: VFS.CStatStruct723756 -Node: VFS.CStatStruct class-accessing724150 -Node: VFS.CStatStruct-accessing724410 -Node: VFS.CStatStruct-debugging724835 -Node: VFS.DecodedFileHandler725061 -Node: VFS.DecodedFileHandler class-registering725452 -Node: VFS.DecodedFileHandler-files726590 -Node: VFS.FileHandlerWrapper727400 -Node: VFS.FileHandlerWrapper class-instance creation727995 -Node: VFS.FileHandlerWrapper-accessing728411 -Node: VFS.FileHandlerWrapper-delegation728821 -Node: VFS.RealFileHandler730389 -Node: VFS.RealFileHandler class-C call-outs731153 -Node: VFS.RealFileHandler class-initialization731437 -Node: VFS.RealFileHandler-accessing731780 -Node: VFS.RealFileHandler-directory operations733436 -Node: VFS.RealFileHandler-file operations733948 -Node: VFS.RealFileHandler-testing734717 -Node: VFS.TmpFileArchiveMemberHandler735353 -Node: VFS.TmpFileArchiveMemberHandler-directory operations735800 -Node: VFS.TmpFileArchiveMemberHandler-finalization736349 -Node: VFS.VFSHandler736742 -Node: VFS.VFSHandler class-initializing737537 -Node: VFS.VFSHandler class-instance creation738620 -Node: VFS.VFSHandler-accessing738979 -Node: VFS.VFSHandler-directory operations740364 -Node: VFS.VFSHandler-file operations740967 -Node: VFS.VFSHandler-releasing742112 -Node: VFS.VFSHandler-testing742434 -Node: Warning743350 -Node: Warning-exception description743681 -Node: WeakArray743901 -Node: WeakArray class-instance creation744406 -Node: WeakArray-accessing744746 -Node: WeakArray-conversion746410 -Node: WeakArray-loading747061 -Node: WeakIdentitySet747342 -Node: WeakIdentitySet-accessing747859 -Node: WeakKeyDictionary748149 -Node: WeakKeyDictionary class-hacks748753 -Node: WeakKeyDictionary-accessing749085 -Node: WeakKeyIdentityDictionary749420 -Node: WeakSet749960 -Node: WeakSet-accessing750492 -Node: WeakSet-copying750873 -Node: WeakSet-loading751267 -Node: WeakValueIdentityDictionary751535 -Node: WeakValueLookupTable752093 -Node: WeakValueLookupTable class-hacks752759 -Node: WeakValueLookupTable-hacks753073 -Node: WeakValueLookupTable-rehashing753687 -Node: WordArray753926 -Node: WriteStream754244 -Node: WriteStream class-instance creation754744 -Node: WriteStream-accessing-writing755438 -Node: WriteStream-positioning756280 -Node: ZeroDivide756506 -Node: ZeroDivide class-instance creation757011 -Node: ZeroDivide-accessing757407 -Node: ZeroDivide-description757676 -Node: Class index757907 -Node: Method index777294 -Node: Cross-reference1230129 +Node: Class-testing146185 +Node: Class-testing functionality146430 +Node: ClassDescription146663 +Node: ClassDescription-compiling147447 +Node: ClassDescription-conversion148289 +Node: ClassDescription-copying148756 +Node: ClassDescription-filing149967 +Node: ClassDescription-organization of messages and classes150764 +Node: ClassDescription-parsing class declarations152193 +Node: ClassDescription-printing152702 +Node: ClassDescription-still unclassified153499 +Node: CLong154052 +Node: CLong class-accessing154336 +Node: CLong-accessing154703 +Node: CLongDouble155023 +Node: CLongDouble class-accessing155322 +Node: CLongDouble-accessing155719 +Node: CObject156069 +Node: CObject class-conversion156974 +Node: CObject class-instance creation157238 +Node: CObject class-subclassing157858 +Node: CObject-accessing158128 +Node: CObject-C data access158571 +Node: CObject-conversion159189 +Node: CObject-finalization159852 +Node: CObject-pointer-like behavior160330 +Node: Collection162604 +Node: Collection class-instance creation163591 +Node: Collection class-multibyte encodings165039 +Node: Collection-adding165379 +Node: Collection-converting165742 +Node: Collection-copying Collections167013 +Node: Collection-enumeration167565 +Node: Collection-finalization171208 +Node: Collection-printing171527 +Node: Collection-removing171884 +Node: Collection-storing172838 +Node: Collection-testing collections173111 +Node: CompiledBlock173875 +Node: CompiledBlock class-instance creation174383 +Node: CompiledBlock-accessing175152 +Node: CompiledBlock-basic176225 +Node: CompiledBlock-printing176948 +Node: CompiledBlock-saving and loading177229 +Node: CompiledCode177664 +Node: CompiledCode class-cache flushing178527 +Node: CompiledCode class-instance creation178897 +Node: CompiledCode class-tables179496 +Node: CompiledCode-accessing180731 +Node: CompiledCode-basic182251 +Node: CompiledCode-copying183016 +Node: CompiledCode-debugging183255 +Node: CompiledCode-decoding bytecodes183528 +Node: CompiledCode-literals - iteration183953 +Node: CompiledCode-security184515 +Node: CompiledCode-testing accesses184847 +Node: CompiledCode-translation186014 +Node: CompiledMethod186288 +Node: CompiledMethod class-instance creation187285 +Node: CompiledMethod class-lean images188161 +Node: CompiledMethod-accessing188496 +Node: CompiledMethod-attributes190198 +Node: CompiledMethod-basic191154 +Node: CompiledMethod-c call-outs191471 +Node: CompiledMethod-compiling192021 +Node: CompiledMethod-invoking192871 +Node: CompiledMethod-printing193918 +Node: CompiledMethod-saving and loading194276 +Node: CompiledMethod-source code194746 +Node: CompiledMethod-testing195452 +Node: ContextPart196045 +Node: ContextPart class-built ins196913 +Node: ContextPart class-exception handling197228 +Node: ContextPart-accessing198224 +Node: ContextPart-built ins201567 +Node: ContextPart-copying202267 +Node: ContextPart-debugging202627 +Node: ContextPart-enumerating203485 +Node: ContextPart-exception handling204103 +Node: ContextPart-printing204379 +Node: ContextPart-security checks204792 +Node: Continuation205360 +Node: Continuation class-instance creation206030 +Node: Continuation-invocation206704 +Node: CPtr208071 +Node: CPtr-accessing208313 +Node: CPtrCType208862 +Node: CPtrCType class-instance creation209190 +Node: CPtrCType-accessing209561 +Node: CPtrCType-storing210062 +Node: CScalar210247 +Node: CScalar class-instance creation210543 +Node: CScalar-accessing211015 +Node: CScalarCType211544 +Node: CScalarCType-accessing211842 +Node: CScalarCType-storing212184 +Node: CShort212420 +Node: CShort class-accessing212704 +Node: CShort-accessing213076 +Node: CSmalltalk213401 +Node: CSmalltalk class-accessing213696 +Node: CSmalltalk-accessing214088 +Node: CString214433 +Node: CString class-accessing215481 +Node: CString class-instance creation215775 +Node: CString-accessing216279 +Node: CStringCType216808 +Node: CStringCType-accessing217077 +Node: CStruct217292 +Node: CStruct class-subclass creation217552 +Node: CType217793 +Node: CType class-C instance creation218957 +Node: CType class-initialization219651 +Node: CType-accessing219908 +Node: CType-C instance creation220760 +Node: CType-storing221285 +Node: CUChar221496 +Node: CUChar class-getting info221771 +Node: CUChar-accessing222152 +Node: CUInt222480 +Node: CUInt class-accessing222749 +Node: CUInt-accessing223116 +Node: CULong223436 +Node: CULong class-accessing223709 +Node: CULong-accessing224081 +Node: CUnion224406 +Node: CUnion class-subclass creation224658 +Node: CUShort224895 +Node: CUShort class-accessing225172 +Node: CUShort-accessing225549 +Node: Date225879 +Node: Date class-basic227351 +Node: Date class-instance creation (ANSI)228479 +Node: Date class-instance creation (Blue Book)228969 +Node: Date-basic230289 +Node: Date-compatibility (non-ANSI)230833 +Node: Date-date computations231246 +Node: Date-printing232957 +Node: Date-storing233185 +Node: Date-testing233408 +Node: DateTime233727 +Node: DateTime class-information234389 +Node: DateTime class-instance creation234680 +Node: DateTime class-instance creation (non-ANSI)235981 +Node: DateTime-basic236722 +Node: DateTime-computations237069 +Node: DateTime-printing237761 +Node: DateTime-splitting in dates & times238027 +Node: DateTime-storing238626 +Node: DateTime-testing238891 +Node: DateTime-time zones239266 +Node: DeferredVariableBinding240396 +Node: DeferredVariableBinding class-basic240997 +Node: DeferredVariableBinding-basic241636 +Node: DeferredVariableBinding-storing242124 +Node: Delay242505 +Node: Delay class-instance creation243319 +Node: Delay class-timer process243796 +Node: Delay-accessing244620 +Node: Delay-comparing244907 +Node: Delay-delaying245188 +Node: Delay-initialization245504 +Node: Delay-instance creation245777 +Node: DelayedAdaptor246054 +Node: DelayedAdaptor-accessing246590 +Node: Dictionary246969 +Node: Dictionary class-instance creation248177 +Node: Dictionary-accessing248621 +Node: Dictionary-awful ST-80 compatibility hacks250599 +Node: Dictionary-dictionary enumerating251062 +Node: Dictionary-dictionary removing252150 +Node: Dictionary-dictionary testing253019 +Node: Dictionary-polymorphism hacks253693 +Node: Dictionary-printing253978 +Node: Dictionary-rehashing254342 +Node: Dictionary-storing254559 +Node: Dictionary-testing254821 +Node: DirectedMessage255097 +Node: DirectedMessage class-creating instances255673 +Node: DirectedMessage-accessing256399 +Node: DirectedMessage-basic256707 +Node: DirectedMessage-multiple process257131 +Node: DirectedMessage-saving and loading257729 +Node: Directory258167 +Node: Directory class-file name management258907 +Node: Directory class-file operations259446 +Node: Directory class-reading system defaults260131 +Node: Directory-accessing261346 +Node: Directory-enumerating262447 +Node: DLD263422 +Node: DLD class-C call-outs264102 +Node: DLD class-dynamic linking264354 +Node: DumperProxy265700 +Node: DumperProxy class-accessing266236 +Node: DumperProxy class-instance creation266701 +Node: DumperProxy-saving and restoring267206 +Node: Duration267621 +Node: Duration class-instance creation268032 +Node: Duration class-instance creation (non ANSI)268532 +Node: Duration-arithmetics269011 +Node: Error270199 +Node: Error-exception description270524 +Node: Exception270865 +Node: Exception class-comparison272003 +Node: Exception class-creating ExceptionCollections272467 +Node: Exception class-initialization272891 +Node: Exception class-instance creation273273 +Node: Exception class-interoperability with TrappableEvents273857 +Node: Exception-comparison274331 +Node: Exception-exception description274779 +Node: Exception-exception signaling275222 +Node: ExceptionSet275615 +Node: ExceptionSet class-instance creation276197 +Node: ExceptionSet-enumerating276462 +Node: False277026 +Node: False-basic277425 +Node: False-C hacks278419 +Node: False-printing278599 +Node: File278800 +Node: File class-C functions279663 +Node: File class-file name management279944 +Node: File class-file operations281483 +Node: File class-instance creation282414 +Node: File class-reading system defaults282916 +Node: File class-testing283270 +Node: File-accessing283922 +Node: File-file name management285648 +Node: File-file operations286502 +Node: File-printing288332 +Node: File-testing288636 +Node: FileDescriptor289696 +Node: FileDescriptor class-initialization290910 +Node: FileDescriptor class-instance creation291248 +Node: FileDescriptor class-still unclassified296344 +Node: FileDescriptor-accessing297414 +Node: FileDescriptor-basic298575 +Node: FileDescriptor-built ins300026 +Node: FileDescriptor-class type methods301542 +Node: FileDescriptor-initialize-release301972 +Node: FileDescriptor-low-level access302564 +Node: FileDescriptor-overriding inherited methods303792 +Node: FileDescriptor-printing304638 +Node: FileDescriptor-testing304938 +Node: FileSegment305162 +Node: FileSegment class-basic305781 +Node: FileSegment class-installing306138 +Node: FileSegment-basic306524 +Node: FileSegment-equality307523 +Node: FileStream307806 +Node: FileStream class-file-in308522 +Node: FileStream class-standard streams312059 +Node: FileStream-basic312799 +Node: FileStream-buffering313748 +Node: FileStream-compiling314961 +Node: FileStream-overriding inherited methods315336 +Node: FileStream-testing316117 +Node: Float316339 +Node: Float class-byte-order dependancies317253 +Node: Float class-characterization317533 +Node: Float-arithmetic318555 +Node: Float-basic318965 +Node: Float-built ins319160 +Node: Float-coercing320101 +Node: Float-coercion320605 +Node: Float-comparing320868 +Node: Float-printing321518 +Node: Float-storing321743 +Node: Float-testing322153 +Node: Float-testing functionality322922 +Node: Float-transcendental operations323160 +Node: FloatD323645 +Node: FloatD class-byte-order dependencies324150 +Node: FloatD class-characterization324545 +Node: FloatD class-converting325819 +Node: FloatD-built ins326075 +Node: FloatD-coercing327312 +Node: FloatE327715 +Node: FloatE class-byte-order dependancies328270 +Node: FloatE class-byte-order dependencies328562 +Node: FloatE class-characterization328928 +Node: FloatE class-converting330490 +Node: FloatE-built ins330746 +Node: FloatE-coercing331983 +Node: FloatQ332386 +Node: FloatQ class-byte-order dependancies332932 +Node: FloatQ class-characterization333217 +Node: FloatQ class-converting334779 +Node: FloatQ-built ins335035 +Node: FloatQ-coercing336272 +Node: FloatQ-misc math336700 +Node: Fraction336897 +Node: Fraction class-converting337688 +Node: Fraction class-instance creation337932 +Node: Fraction-accessing338317 +Node: Fraction-arithmetic338607 +Node: Fraction-coercing339331 +Node: Fraction-coercion339969 +Node: Fraction-comparing340250 +Node: Fraction-converting340752 +Node: Fraction-optimized cases341253 +Node: Fraction-printing341687 +Node: Fraction-testing342019 +Node: Generator342226 +Node: Generator class-instance creation344532 +Node: Generator-stream protocol345279 +Node: Getopt346342 +Node: Getopt class-instance creation346708 +Node: Halt349347 +Node: Halt-description349641 +Node: HashedCollection349892 +Node: HashedCollection class-instance creation350753 +Node: HashedCollection-accessing351225 +Node: HashedCollection-builtins351805 +Node: HashedCollection-copying352582 +Node: HashedCollection-enumerating the elements of a collection353060 +Node: HashedCollection-rehashing353436 +Node: HashedCollection-removing353722 +Node: HashedCollection-saving and loading354131 +Node: HashedCollection-storing354645 +Node: HashedCollection-testing collections354972 +Node: HomedAssociation355919 +Node: HomedAssociation class-basic356489 +Node: HomedAssociation-accessing356791 +Node: HomedAssociation-finalization357157 +Node: HomedAssociation-storing357777 +Node: IdentityDictionary358046 +Node: IdentitySet358439 +Node: IdentitySet-testing358838 +Node: Integer359099 +Node: Integer class-converting359928 +Node: Integer-accessing360289 +Node: Integer-basic360528 +Node: Integer-bit operators360738 +Node: Integer-converting362106 +Node: Integer-extension362832 +Node: Integer-iterators363145 +Node: Integer-math methods363511 +Node: Integer-printing364412 +Node: Integer-storing365658 +Node: Integer-testing functionality365985 +Node: Interval366259 +Node: Interval class-instance creation366855 +Node: Interval-basic367457 +Node: Interval-printing368143 +Node: Interval-storing368476 +Node: Interval-testing368723 +Node: LargeArray368994 +Node: LargeArray-overridden369397 +Node: LargeArrayedCollection369589 +Node: LargeArrayedCollection class-instance creation370129 +Node: LargeArrayedCollection-accessing370488 +Node: LargeArrayedCollection-basic370992 +Node: LargeByteArray371393 +Node: LargeByteArray-overridden371821 +Node: LargeInteger372262 +Node: LargeInteger-accessing373097 +Node: LargeInteger-arithmetic373336 +Node: LargeInteger-bit operations374463 +Node: LargeInteger-built-ins375138 +Node: LargeInteger-coercion376217 +Node: LargeInteger-disabled376763 +Node: LargeInteger-primitive operations377138 +Node: LargeInteger-testing377618 +Node: LargeNegativeInteger378262 +Node: LargeNegativeInteger-converting378964 +Node: LargeNegativeInteger-numeric testing379352 +Node: LargeNegativeInteger-reverting to LargePositiveInteger379887 +Node: LargePositiveInteger380459 +Node: LargePositiveInteger-arithmetic381336 +Node: LargePositiveInteger-converting381812 +Node: LargePositiveInteger-helper byte-level methods382366 +Node: LargePositiveInteger-numeric testing384103 +Node: LargePositiveInteger-primitive operations384639 +Node: LargeWordArray385333 +Node: LargeWordArray-overridden385763 +Node: LargeZeroInteger386062 +Node: LargeZeroInteger-accessing386890 +Node: LargeZeroInteger-arithmetic387155 +Node: LargeZeroInteger-numeric testing388085 +Node: LargeZeroInteger-printing388422 +Node: Link388720 +Node: Link class-instance creation389265 +Node: Link-basic389497 +Node: Link-iteration389750 +Node: LinkedList390211 +Node: LinkedList-accessing390819 +Node: LinkedList-adding391135 +Node: LinkedList-enumerating391868 +Node: LinkedList-testing392348 +Node: LookupKey392704 +Node: LookupKey class-basic393258 +Node: LookupKey-accessing393500 +Node: LookupKey-printing393765 +Node: LookupKey-storing394012 +Node: LookupKey-testing394268 +Node: LookupTable394702 +Node: LookupTable class-instance creation395577 +Node: LookupTable-accessing395839 +Node: LookupTable-enumerating396648 +Node: LookupTable-hashing397173 +Node: LookupTable-rehashing397414 +Node: LookupTable-removing397639 +Node: LookupTable-storing398141 +Node: Magnitude398380 +Node: Magnitude-basic398836 +Node: Magnitude-misc methods399368 +Node: MappedCollection399784 +Node: MappedCollection class-instance creation401159 +Node: MappedCollection-basic401612 +Node: Memory403367 +Node: Memory class-accessing403927 +Node: Message408059 +Node: Message class-creating instances408735 +Node: Message-accessing409128 +Node: Message-basic409570 +Node: Message-printing409869 +Node: MessageNotUnderstood410201 +Node: MessageNotUnderstood-accessing410695 +Node: MessageNotUnderstood-description411034 +Node: Metaclass411315 +Node: Metaclass class-instance creation412314 +Node: Metaclass-accessing412599 +Node: Metaclass-basic413045 +Node: Metaclass-delegation414389 +Node: Metaclass-filing415918 +Node: Metaclass-printing416209 +Node: Metaclass-testing functionality416764 +Node: MethodContext417025 +Node: MethodContext-accessing417567 +Node: MethodContext-debugging418877 +Node: MethodContext-printing419659 +Node: MethodDictionary419905 +Node: MethodDictionary-adding420436 +Node: MethodDictionary-rehashing420685 +Node: MethodDictionary-removing420939 +Node: MethodInfo421351 +Node: MethodInfo-accessing421837 +Node: MethodInfo-equality422782 +Node: Namespace423075 +Node: Namespace class-accessing423683 +Node: Namespace class-disabling instance creation424086 +Node: Namespace class-initialization424482 +Node: Namespace-accessing424919 +Node: Namespace-namespace hierarchy425208 +Node: Namespace-overrides for superspaces425706 +Node: Namespace-printing427503 +Node: NetClients.URIResolver428007 +Node: NetClients.URIResolver class-api428462 +Node: NetClients.URIResolver class-instance creation429612 +Node: NetClients.URL429989 +Node: NetClients.URL class-encoding URLs430710 +Node: NetClients.URL class-instance creation431215 +Node: NetClients.URL-accessing432040 +Node: NetClients.URL-comparing434765 +Node: NetClients.URL-copying435291 +Node: NetClients.URL-initialize-release435828 +Node: NetClients.URL-printing436127 +Node: NetClients.URL-testing436421 +Node: NetClients.URL-utilities437197 +Node: Notification437507 +Node: Notification-exception description437960 +Node: NullProxy438422 +Node: NullProxy class-instance creation439034 +Node: NullProxy-accessing439305 +Node: NullValueHolder439557 +Node: NullValueHolder class-creating instances440146 +Node: NullValueHolder-accessing440493 +Node: Number440841 +Node: Number class-converting441769 +Node: Number class-testing442229 +Node: Number-arithmetic442497 +Node: Number-coercion443829 +Node: Number-comparing444102 +Node: Number-converting444653 +Node: Number-copying446008 +Node: Number-error raising446323 +Node: Number-misc math446694 +Node: Number-point creation448859 +Node: Number-retrying449156 +Node: Number-shortcuts and iterators450961 +Node: Number-testing452210 +Node: Number-truncation and round off453646 +Node: Object454461 +Node: Object class-initialization455417 +Node: Object-built ins456016 +Node: Object-change and update464735 +Node: Object-class type methods465942 +Node: Object-conversion466761 +Node: Object-copying467008 +Node: Object-debugging467672 +Node: Object-dependents access468001 +Node: Object-error raising468705 +Node: Object-finalization469392 +Node: Object-printing470385 +Node: Object-relational operators472130 +Node: Object-saving and loading472494 +Node: Object-storing473497 +Node: Object-syntax shortcuts474195 +Node: Object-testing functionality474522 +Node: Object-VM callbacks476090 +Node: ObjectDumper476575 +Node: ObjectDumper class-establishing proxy classes477780 +Node: ObjectDumper class-instance creation478629 +Node: ObjectDumper class-shortcuts479042 +Node: ObjectDumper class-testing479436 +Node: ObjectDumper-accessing479880 +Node: ObjectDumper-loading/dumping objects480388 +Node: ObjectDumper-stream interface480828 +Node: ObjectMemory481210 +Node: ObjectMemory class-accessing482295 +Node: ObjectMemory class-builtins482562 +Node: ObjectMemory class-initialization485909 +Node: ObjectMemory class-saving the image486239 +Node: ObjectMemory-accessing486567 +Node: ObjectMemory-builtins491521 +Node: ObjectMemory-derived information491806 +Node: OrderedCollection492793 +Node: OrderedCollection class-instance creation493515 +Node: OrderedCollection-accessing493873 +Node: OrderedCollection-adding494340 +Node: OrderedCollection-removing496404 +Node: Package497059 +Node: Package class-instance creation497533 +Node: Package-accessing497789 +Node: PackageLoader500849 +Node: PackageLoader class-accessing501413 +Node: PackageLoader class-loading504034 +Node: PackageLoader class-testing504434 +Node: Permission504725 +Node: Permission class-testing505194 +Node: Permission-accessing505944 +Node: Permission-testing506522 +Node: PluggableAdaptor506772 +Node: PluggableAdaptor class-creating instances507409 +Node: PluggableAdaptor-accessing508505 +Node: PluggableProxy508806 +Node: PluggableProxy class-accessing509444 +Node: PluggableProxy-saving and restoring509894 +Node: Point510329 +Node: Point class-instance creation511068 +Node: Point-accessing511381 +Node: Point-arithmetic511815 +Node: Point-comparing512534 +Node: Point-converting513347 +Node: Point-point functions513866 +Node: Point-printing514814 +Node: Point-storing515048 +Node: Point-truncation and round off515296 +Node: PositionableStream515708 +Node: PositionableStream class-instance creation516672 +Node: PositionableStream-accessing-reading517197 +Node: PositionableStream-class type methods518572 +Node: PositionableStream-compiling519107 +Node: PositionableStream-positioning519601 +Node: PositionableStream-testing520832 +Node: PositionableStream-truncating521314 +Node: Process521614 +Node: Process-accessing522194 +Node: Process-basic523319 +Node: Process-builtins525031 +Node: Process-printing526151 +Node: ProcessorScheduler526365 +Node: ProcessorScheduler class-instance creation527044 +Node: ProcessorScheduler-basic527358 +Node: ProcessorScheduler-built ins528832 +Node: ProcessorScheduler-idle tasks529534 +Node: ProcessorScheduler-printing530038 +Node: ProcessorScheduler-priorities530357 +Node: ProcessorScheduler-storing532023 +Node: ProcessorScheduler-timed invocation532364 +Node: Promise532935 +Node: Promise class-creating instances533562 +Node: Promise-accessing533973 +Node: Promise-initializing534428 +Node: Promise-printing534672 +Node: Promise-still unclassified534914 +Node: Random535170 +Node: Random class-instance creation535631 +Node: Random class-shortcuts536013 +Node: Random-basic536403 +Node: Random-testing536833 +Node: ReadStream537159 +Node: ReadStream class-instance creation537566 +Node: ReadWriteStream537986 +Node: ReadWriteStream class-instance creation538484 +Node: ReadWriteStream-positioning539122 +Node: Rectangle539441 +Node: Rectangle class-instance creation540242 +Node: Rectangle-accessing540800 +Node: Rectangle-copying543214 +Node: Rectangle-printing543448 +Node: Rectangle-rectangle functions543790 +Node: Rectangle-testing545693 +Node: Rectangle-transforming546523 +Node: Rectangle-truncation and round off547163 +Node: RecursionLock547468 +Node: RecursionLock class-instance creation547872 +Node: RecursionLock-accessing548122 +Node: RecursionLock-mutual exclusion548735 +Node: RecursionLock-printing549110 +Node: Regex549376 +Node: Regex class-instance creation550391 +Node: Regex-basic550650 +Node: Regex-conversion551072 +Node: Regex-printing551378 +Node: RegexResults552038 +Node: RegexResults-accessing552656 +Node: RegexResults-testing554169 +Node: RootNamespace555201 +Node: RootNamespace class-instance creation555761 +Node: RootNamespace-namespace hierarchy556110 +Node: RootNamespace-overrides for superspaces556557 +Node: RootNamespace-printing557188 +Node: RunArray557712 +Node: RunArray class-instance creation558685 +Node: RunArray-accessing558973 +Node: RunArray-adding559323 +Node: RunArray-basic560413 +Node: RunArray-copying560734 +Node: RunArray-enumerating561106 +Node: RunArray-removing561582 +Node: RunArray-searching562063 +Node: RunArray-testing562493 +Node: ScaledDecimal562752 +Node: ScaledDecimal class-instance creation563530 +Node: ScaledDecimal-arithmetic563945 +Node: ScaledDecimal-coercion564680 +Node: ScaledDecimal-comparing565711 +Node: ScaledDecimal-constants566363 +Node: ScaledDecimal-printing566681 +Node: ScaledDecimal-storing567157 +Node: SecurityPolicy567598 +Node: SecurityPolicy-modifying568186 +Node: SecurityPolicy-querying568538 +Node: Semaphore568797 +Node: Semaphore class-instance creation569473 +Node: Semaphore-accessing569862 +Node: Semaphore-builtins570362 +Node: Semaphore-mutual exclusion571723 +Node: Semaphore-printing572073 +Node: SequenceableCollection572319 +Node: SequenceableCollection class-instance creation573133 +Node: SequenceableCollection-basic573627 +Node: SequenceableCollection-concatenating578275 +Node: SequenceableCollection-copying SequenceableCollections580063 +Node: SequenceableCollection-enumerating582828 +Node: SequenceableCollection-replacing items586390 +Node: SequenceableCollection-sorting587353 +Node: SequenceableCollection-testing587927 +Node: Set588478 +Node: Set-arithmetic588910 +Node: Set-awful ST-80 compatibility hacks589255 +Node: Set-comparing589632 +Node: SharedQueue590043 +Node: SharedQueue class-instance creation590577 +Node: SharedQueue-accessing590962 +Node: Signal591480 +Node: Signal-accessing592148 +Node: Signal-copying593003 +Node: Signal-exception handling593276 +Node: SingletonProxy595907 +Node: SingletonProxy class-accessing596523 +Node: SingletonProxy class-instance creation596904 +Node: SingletonProxy-saving and restoring597361 +Node: SmallInteger597804 +Node: SmallInteger class-getting limits598541 +Node: SmallInteger class-testing599043 +Node: SmallInteger-bit arithmetic599355 +Node: SmallInteger-built ins599722 +Node: SmallInteger-builtins602152 +Node: SmallInteger-coercion602911 +Node: SmallInteger-coercion methods603225 +Node: SmallInteger-testing functionality603597 +Node: SortedCollection603846 +Node: SortedCollection class-hacking604990 +Node: SortedCollection class-instance creation605275 +Node: SortedCollection-basic605804 +Node: SortedCollection-copying606365 +Node: SortedCollection-disabled606688 +Node: SortedCollection-enumerating607558 +Node: SortedCollection-saving and loading607904 +Node: SortedCollection-searching608266 +Node: Stream608869 +Node: Stream-accessing-reading609908 +Node: Stream-accessing-writing611780 +Node: Stream-basic612493 +Node: Stream-built ins612684 +Node: Stream-character writing613614 +Node: Stream-concatenating614485 +Node: Stream-enumerating615158 +Node: Stream-filing out615536 +Node: Stream-filtering615896 +Node: Stream-polymorphism618067 +Node: Stream-positioning618473 +Node: Stream-printing619655 +Node: Stream-storing620410 +Node: Stream-testing620778 +Node: String621292 +Node: String class-instance creation622364 +Node: String class-multibyte encodings622848 +Node: String-accessing623176 +Node: String-basic623573 +Node: String-built ins623978 +Node: String-converting625841 +Node: String-printing626320 +Node: String-regex627168 +Node: String-testing functionality633721 +Node: Symbol633923 +Node: Symbol class-built ins634761 +Node: Symbol class-instance creation634992 +Node: Symbol class-symbol table636147 +Node: Symbol-basic637572 +Node: Symbol-built ins638341 +Node: Symbol-converting638666 +Node: Symbol-misc639022 +Node: Symbol-storing639202 +Node: Symbol-testing640108 +Node: Symbol-testing functionality640392 +Node: SymLink640629 +Node: SymLink class-instance creation641190 +Node: SymLink-accessing641526 +Node: SymLink-iteration641877 +Node: SymLink-printing642108 +Node: SystemDictionary642324 +Node: SystemDictionary class-initialization643281 +Node: SystemDictionary-basic643556 +Node: SystemDictionary-builtins643899 +Node: SystemDictionary-c call-outs645245 +Node: SystemDictionary-command-line645654 +Node: SystemDictionary-miscellaneous648345 +Node: SystemDictionary-printing648811 +Node: SystemDictionary-special accessing649246 +Node: SystemDictionary-testing649859 +Node: SystemExceptions.AlreadyDefined650209 +Node: SystemExceptions.AlreadyDefined-accessing650735 +Node: SystemExceptions.ArgumentOutOfRange651003 +Node: SystemExceptions.ArgumentOutOfRange class-signaling651603 +Node: SystemExceptions.ArgumentOutOfRange-accessing652025 +Node: SystemExceptions.BadReturn652619 +Node: SystemExceptions.BadReturn-accessing653109 +Node: SystemExceptions.CInterfaceError653369 +Node: SystemExceptions.CInterfaceError-accessing653880 +Node: SystemExceptions.EmptyCollection654164 +Node: SystemExceptions.EmptyCollection-accessing654661 +Node: SystemExceptions.EndOfStream654945 +Node: SystemExceptions.EndOfStream class-signaling655446 +Node: SystemExceptions.EndOfStream-accessing655802 +Node: SystemExceptions.FileError656238 +Node: SystemExceptions.FileError-accessing656727 +Node: SystemExceptions.IndexOutOfRange656987 +Node: SystemExceptions.IndexOutOfRange class-signaling657583 +Node: SystemExceptions.IndexOutOfRange-accessing657965 +Node: SystemExceptions.InvalidArgument658495 +Node: SystemExceptions.InvalidArgument-accessing659002 +Node: SystemExceptions.InvalidProcessState659275 +Node: SystemExceptions.InvalidProcessState-accessing659816 +Node: SystemExceptions.InvalidSize660116 +Node: SystemExceptions.InvalidSize-accessing660593 +Node: SystemExceptions.InvalidValue660861 +Node: SystemExceptions.InvalidValue class-signaling661398 +Node: SystemExceptions.InvalidValue-accessing661863 +Node: SystemExceptions.MustBeBoolean662370 +Node: SystemExceptions.MustBeBoolean class-signaling662861 +Node: SystemExceptions.MutationError663191 +Node: SystemExceptions.MutationError class-instance creation663730 +Node: SystemExceptions.MutationError-accessing664123 +Node: SystemExceptions.NoRunnableProcess664462 +Node: SystemExceptions.NoRunnableProcess-accessing664968 +Node: SystemExceptions.NotEnoughElements665260 +Node: SystemExceptions.NotEnoughElements class-signaling665826 +Node: SystemExceptions.NotEnoughElements-accessing666211 +Node: SystemExceptions.NotFound666763 +Node: SystemExceptions.NotFound class-accessing667289 +Node: SystemExceptions.NotFound-accessing667680 +Node: SystemExceptions.NotImplemented667986 +Node: SystemExceptions.NotImplemented-accessing668454 +Node: SystemExceptions.NotIndexable668734 +Node: SystemExceptions.NotIndexable-accessing669207 +Node: SystemExceptions.NotYetImplemented669479 +Node: SystemExceptions.NotYetImplemented-accessing670005 +Node: SystemExceptions.PackageNotAvailable670297 +Node: SystemExceptions.PackageNotAvailable class-still unclassified670821 +Node: SystemExceptions.PackageNotAvailable-description671259 +Node: SystemExceptions.PrimitiveFailed671696 +Node: SystemExceptions.PrimitiveFailed-accessing672193 +Node: SystemExceptions.ProcessBeingTerminated672477 +Node: SystemExceptions.ProcessBeingTerminated-accessing672971 +Node: SystemExceptions.ProcessTerminated673435 +Node: SystemExceptions.ProcessTerminated-accessing673970 +Node: SystemExceptions.ReadOnlyObject674262 +Node: SystemExceptions.ReadOnlyObject-accessing674748 +Node: SystemExceptions.SecurityError675028 +Node: SystemExceptions.SecurityError class-accessing675602 +Node: SystemExceptions.SecurityError-accessing675998 +Node: SystemExceptions.ShouldNotImplement676484 +Node: SystemExceptions.ShouldNotImplement-accessing677023 +Node: SystemExceptions.SubclassResponsibility677319 +Node: SystemExceptions.SubclassResponsibility-accessing677899 +Node: SystemExceptions.UserInterrupt678211 +Node: SystemExceptions.UserInterrupt-accessing678683 +Node: SystemExceptions.VerificationError678959 +Node: SystemExceptions.VerificationError-accessing679444 +Node: SystemExceptions.VMError679736 +Node: SystemExceptions.VMError-accessing680176 +Node: SystemExceptions.WrongArgumentCount680428 +Node: SystemExceptions.WrongArgumentCount-accessing680994 +Node: SystemExceptions.WrongClass681290 +Node: SystemExceptions.WrongClass class-signaling681918 +Node: SystemExceptions.WrongClass-accessing682590 +Node: SystemExceptions.WrongMessageSent683259 +Node: SystemExceptions.WrongMessageSent class-signaling683916 +Node: SystemExceptions.WrongMessageSent-accessing684349 +Node: TextCollector684954 +Node: TextCollector class-accessing685664 +Node: TextCollector-accessing686177 +Node: TextCollector-printing687012 +Node: TextCollector-set up687360 +Node: TextCollector-storing687939 +Node: Time688283 +Node: Time class-basic (UTC)689067 +Node: Time class-builtins689621 +Node: Time class-clocks690662 +Node: Time class-initialization691233 +Node: Time class-instance creation691593 +Node: Time-accessing (ANSI for DateAndTimes)692486 +Node: Time-accessing (non ANSI & for Durations)693018 +Node: Time-arithmetic693484 +Node: Time-comparing694075 +Node: True694376 +Node: True-basic694756 +Node: True-C hacks695722 +Node: True-printing695898 +Node: UndefinedObject696096 +Node: UndefinedObject-basic696832 +Node: UndefinedObject-class creation - alternative697131 +Node: UndefinedObject-class polymorphism699420 +Node: UndefinedObject-CObject interoperability702512 +Node: UndefinedObject-dependents access702940 +Node: UndefinedObject-printing703329 +Node: UndefinedObject-storing703823 +Node: UndefinedObject-testing704302 +Node: UnicodeCharacter705154 +Node: UnicodeCharacter class-built ins705746 +Node: UnicodeString706281 +Node: UnicodeString class-converting706860 +Node: UnicodeString class-multibyte encodings707238 +Node: UnicodeString-built-ins707737 +Node: UnicodeString-converting708010 +Node: UnicodeString-multibyte encodings708750 +Node: ValueAdaptor709258 +Node: ValueAdaptor class-creating instances709752 +Node: ValueAdaptor-accessing710056 +Node: ValueAdaptor-printing710479 +Node: ValueHolder710708 +Node: ValueHolder class-creating instances711335 +Node: ValueHolder-accessing711734 +Node: ValueHolder-initializing712043 +Node: VariableBinding712282 +Node: VariableBinding-printing712926 +Node: VariableBinding-saving and loading713257 +Node: VariableBinding-storing713730 +Node: VariableBinding-testing714221 +Node: VersionableObjectProxy714495 +Node: VersionableObjectProxy class-saving and restoring715403 +Node: VersionableObjectProxy-saving and restoring716443 +Node: VFS.ArchiveFileHandler716793 +Node: VFS.ArchiveFileHandler-ArchiveMemberHandler protocol717740 +Node: VFS.ArchiveFileHandler-directory operations718942 +Node: VFS.ArchiveFileHandler-querying719605 +Node: VFS.ArchiveFileHandler-TmpFileArchiveMemberHandler protocol720108 +Node: VFS.ArchiveMemberHandler720745 +Node: VFS.ArchiveMemberHandler-accessing721467 +Node: VFS.ArchiveMemberHandler-directory operations722880 +Node: VFS.ArchiveMemberHandler-file operations723517 +Node: VFS.ArchiveMemberHandler-initializing724199 +Node: VFS.ArchiveMemberHandler-testing724903 +Node: VFS.CStatStruct725929 +Node: VFS.CStatStruct class-accessing726323 +Node: VFS.CStatStruct-accessing726583 +Node: VFS.CStatStruct-debugging727008 +Node: VFS.DecodedFileHandler727234 +Node: VFS.DecodedFileHandler class-registering727625 +Node: VFS.DecodedFileHandler-files728763 +Node: VFS.FileHandlerWrapper729573 +Node: VFS.FileHandlerWrapper class-instance creation730168 +Node: VFS.FileHandlerWrapper-accessing730584 +Node: VFS.FileHandlerWrapper-delegation730994 +Node: VFS.RealFileHandler732562 +Node: VFS.RealFileHandler class-C call-outs733326 +Node: VFS.RealFileHandler class-initialization733610 +Node: VFS.RealFileHandler-accessing733953 +Node: VFS.RealFileHandler-directory operations735609 +Node: VFS.RealFileHandler-file operations736121 +Node: VFS.RealFileHandler-testing736890 +Node: VFS.TmpFileArchiveMemberHandler737526 +Node: VFS.TmpFileArchiveMemberHandler-directory operations737973 +Node: VFS.TmpFileArchiveMemberHandler-finalization738522 +Node: VFS.VFSHandler738915 +Node: VFS.VFSHandler class-initializing739710 +Node: VFS.VFSHandler class-instance creation740793 +Node: VFS.VFSHandler-accessing741152 +Node: VFS.VFSHandler-directory operations742537 +Node: VFS.VFSHandler-file operations743140 +Node: VFS.VFSHandler-releasing744285 +Node: VFS.VFSHandler-testing744607 +Node: Warning745523 +Node: Warning-exception description745854 +Node: WeakArray746074 +Node: WeakArray class-instance creation746579 +Node: WeakArray-accessing746919 +Node: WeakArray-conversion748583 +Node: WeakArray-loading749234 +Node: WeakIdentitySet749515 +Node: WeakIdentitySet-accessing750032 +Node: WeakKeyDictionary750322 +Node: WeakKeyDictionary class-hacks750926 +Node: WeakKeyDictionary-accessing751258 +Node: WeakKeyIdentityDictionary751593 +Node: WeakSet752133 +Node: WeakSet-accessing752665 +Node: WeakSet-copying753046 +Node: WeakSet-loading753440 +Node: WeakValueIdentityDictionary753708 +Node: WeakValueLookupTable754266 +Node: WeakValueLookupTable class-hacks754932 +Node: WeakValueLookupTable-hacks755246 +Node: WeakValueLookupTable-rehashing755860 +Node: WordArray756099 +Node: WriteStream756417 +Node: WriteStream class-instance creation756917 +Node: WriteStream-accessing-writing757611 +Node: WriteStream-positioning758453 +Node: ZeroDivide758679 +Node: ZeroDivide class-instance creation759184 +Node: ZeroDivide-accessing759580 +Node: ZeroDivide-description759849 +Node: Class index760080 +Node: Method index779467 +Node: Cross-reference1233018  End Tag Table diff -rNu smalltalk-3.0.2/doc/gst-base.info-1 smalltalk-3.0.3/doc/gst-base.info-1 --- smalltalk-3.0.2/doc/gst-base.info-1 2008-03-07 12:12:21.000000000 +0100 +++ smalltalk-3.0.3/doc/gst-base.info-1 2008-05-14 12:35:05.000000000 +0200 @@ -4668,10 +4668,10 @@ check: aPermission Not commented. -policy +securityPolicy Answer `securityPolicy'. -policy: aSecurityPolicy +securityPolicy: aSecurityPolicy Not commented. @@ -9576,6 +9576,7 @@ * FileDescriptor class-initialization:: (class) * FileDescriptor class-instance creation:: (class) +* FileDescriptor class-still unclassified:: (class) * FileDescriptor-accessing:: (instance) * FileDescriptor-basic:: (instance) * FileDescriptor-built ins:: (instance) @@ -9600,7 +9601,7 @@  -File: gst-base.info, Node: FileDescriptor class-instance creation, Next: FileDescriptor-accessing, Prev: FileDescriptor class-initialization, Up: FileDescriptor +File: gst-base.info, Node: FileDescriptor class-instance creation, Next: FileDescriptor class-still unclassified, Prev: FileDescriptor class-initialization, Up: FileDescriptor 1.72.2 FileDescriptor class: instance creation ---------------------------------------------- @@ -9645,20 +9646,6 @@ anymore, but you should close it with #close anyway. To keep a file open, send it #removeToBeFinalized -open: fileName mode: fileMode - Open fileName in the required mode - answered by #append, #create, - #readWrite, #read or #write - and fail if the file cannot be - opened. Else answer a new FileStream. For mode anyway you can use - any standard C non-binary fopen mode. fileName can be a `virtual - filesystem' path, including URLs and '#' suffixes that are - inspected by the virtual filesystem layers and replaced with tasks - such as un-gzipping a file or extracting a file from an archive. - - The file will be automatically closed upon GC if the object is not - referenced anymore, but it is better to close it as soon as you're - finished with it anyway, using #close. To keep a file open even - when no references exist anymore, send it #removeToBeFinalized - open: fileName mode: fileMode ifFail: aBlock Open fileName in the required mode - answered by #append, #create, #readWrite, #read or #write - and evaluate aBlock if the file @@ -9719,9 +9706,30 @@  -File: gst-base.info, Node: FileDescriptor-accessing, Next: FileDescriptor-basic, Prev: FileDescriptor class-instance creation, Up: FileDescriptor +File: gst-base.info, Node: FileDescriptor class-still unclassified, Next: FileDescriptor-accessing, Prev: FileDescriptor class-instance creation, Up: FileDescriptor + +1.72.3 FileDescriptor class: still unclassified +----------------------------------------------- + +open: fileName mode: fileMode + Open fileName in the required mode - answered by #append, #create, + #readWrite, #read or #write - and fail if the file cannot be + opened. Else answer a new FileStream. For mode anyway you can use + any standard C non-binary fopen mode. fileName can be a `virtual + filesystem' path, including URLs and '#' suffixes that are + inspected by the virtual filesystem layers and replaced with tasks + such as un-gzipping a file or extracting a file from an archive. + + The file will be automatically closed upon GC if the object is not + referenced anymore, but it is better to close it as soon as you're + finished with it anyway, using #close. To keep a file open even + when no references exist anymore, send it #removeToBeFinalized + + + +File: gst-base.info, Node: FileDescriptor-accessing, Next: FileDescriptor-basic, Prev: FileDescriptor class-still unclassified, Up: FileDescriptor -1.72.3 FileDescriptor: accessing +1.72.4 FileDescriptor: accessing -------------------------------- canRead @@ -9763,7 +9771,7 @@  File: gst-base.info, Node: FileDescriptor-basic, Next: FileDescriptor-built ins, Prev: FileDescriptor-accessing, Up: FileDescriptor -1.72.4 FileDescriptor: basic +1.72.5 FileDescriptor: basic ---------------------------- checkError diff -rNu smalltalk-3.0.2/doc/gst-base.info-2 smalltalk-3.0.3/doc/gst-base.info-2 --- smalltalk-3.0.2/doc/gst-base.info-2 2008-03-07 12:12:21.000000000 +0100 +++ smalltalk-3.0.3/doc/gst-base.info-2 2008-05-14 12:35:05.000000000 +0200 @@ -16,7 +16,7 @@  File: gst-base.info, Node: FileDescriptor-built ins, Next: FileDescriptor-class type methods, Prev: FileDescriptor-basic, Up: FileDescriptor -1.72.5 FileDescriptor: built ins +1.72.6 FileDescriptor: built ins -------------------------------- fileOp: ioFuncIndex @@ -63,7 +63,7 @@  File: gst-base.info, Node: FileDescriptor-class type methods, Next: FileDescriptor-initialize-release, Prev: FileDescriptor-built ins, Up: FileDescriptor -1.72.6 FileDescriptor: class type methods +1.72.7 FileDescriptor: class type methods ----------------------------------------- isBinary @@ -79,7 +79,7 @@  File: gst-base.info, Node: FileDescriptor-initialize-release, Next: FileDescriptor-low-level access, Prev: FileDescriptor-class type methods, Up: FileDescriptor -1.72.7 FileDescriptor: initialize-release +1.72.8 FileDescriptor: initialize-release ----------------------------------------- addToBeFinalized @@ -101,7 +101,7 @@  File: gst-base.info, Node: FileDescriptor-low-level access, Next: FileDescriptor-overriding inherited methods, Prev: FileDescriptor-initialize-release, Up: FileDescriptor -1.72.8 FileDescriptor: low-level access +1.72.9 FileDescriptor: low-level access --------------------------------------- nextHunk @@ -137,8 +137,8 @@  File: gst-base.info, Node: FileDescriptor-overriding inherited methods, Next: FileDescriptor-printing, Prev: FileDescriptor-low-level access, Up: FileDescriptor -1.72.9 FileDescriptor: overriding inherited methods ---------------------------------------------------- +1.72.10 FileDescriptor: overriding inherited methods +---------------------------------------------------- isEmpty Answer whether the receiver is empty @@ -166,7 +166,7 @@  File: gst-base.info, Node: FileDescriptor-printing, Next: FileDescriptor-testing, Prev: FileDescriptor-overriding inherited methods, Up: FileDescriptor -1.72.10 FileDescriptor: printing +1.72.11 FileDescriptor: printing -------------------------------- printOn: aStream @@ -176,7 +176,7 @@  File: gst-base.info, Node: FileDescriptor-testing, Prev: FileDescriptor-printing, Up: FileDescriptor -1.72.11 FileDescriptor: testing +1.72.12 FileDescriptor: testing ------------------------------- atEnd @@ -539,6 +539,7 @@ * Float-basic:: (instance) * Float-built ins:: (instance) * Float-coercing:: (instance) +* Float-coercion:: (instance) * Float-comparing:: (instance) * Float-printing:: (instance) * Float-storing:: (instance) @@ -671,7 +672,7 @@  -File: gst-base.info, Node: Float-coercing, Next: Float-comparing, Prev: Float-built ins, Up: Float +File: gst-base.info, Node: Float-coercing, Next: Float-coercion, Prev: Float-built ins, Up: Float 1.75.6 Float: coercing ---------------------- @@ -690,9 +691,20 @@  -File: gst-base.info, Node: Float-comparing, Next: Float-printing, Prev: Float-coercing, Up: Float +File: gst-base.info, Node: Float-coercion, Next: Float-comparing, Prev: Float-coercing, Up: Float + +1.75.7 Float: coercion +---------------------- + +asCNumber + Convert the receiver to a kind of number that is understood by the + C call-out mechanism. + + + +File: gst-base.info, Node: Float-comparing, Next: Float-printing, Prev: Float-coercion, Up: Float -1.75.7 Float: comparing +1.75.8 Float: comparing ----------------------- max: aNumber @@ -713,7 +725,7 @@  File: gst-base.info, Node: Float-printing, Next: Float-storing, Prev: Float-comparing, Up: Float -1.75.8 Float: printing +1.75.9 Float: printing ---------------------- printOn: aStream @@ -723,8 +735,8 @@  File: gst-base.info, Node: Float-storing, Next: Float-testing, Prev: Float-printing, Up: Float -1.75.9 Float: storing ---------------------- +1.75.10 Float: storing +---------------------- isLiteralObject Answer whether the receiver is expressible as a Smalltalk literal. @@ -739,7 +751,7 @@  File: gst-base.info, Node: Float-testing, Next: Float-testing functionality, Prev: Float-storing, Up: Float -1.75.10 Float: testing +1.75.11 Float: testing ---------------------- isFinite @@ -770,7 +782,7 @@  File: gst-base.info, Node: Float-testing functionality, Next: Float-transcendental operations, Prev: Float-testing, Up: Float -1.75.11 Float: testing functionality +1.75.12 Float: testing functionality ------------------------------------ isFloat @@ -780,7 +792,7 @@  File: gst-base.info, Node: Float-transcendental operations, Prev: Float-testing functionality, Up: Float -1.75.12 Float: transcendental operations +1.75.13 Float: transcendental operations ---------------------------------------- asFloat @@ -1344,6 +1356,7 @@ * Fraction-accessing:: (instance) * Fraction-arithmetic:: (instance) * Fraction-coercing:: (instance) +* Fraction-coercion:: (instance) * Fraction-comparing:: (instance) * Fraction-converting:: (instance) * Fraction-optimized cases:: (instance) @@ -1417,7 +1430,7 @@  -File: gst-base.info, Node: Fraction-coercing, Next: Fraction-comparing, Prev: Fraction-arithmetic, Up: Fraction +File: gst-base.info, Node: Fraction-coercing, Next: Fraction-coercion, Prev: Fraction-arithmetic, Up: Fraction 1.79.5 Fraction: coercing ------------------------- @@ -1447,9 +1460,20 @@  -File: gst-base.info, Node: Fraction-comparing, Next: Fraction-converting, Prev: Fraction-coercing, Up: Fraction +File: gst-base.info, Node: Fraction-coercion, Next: Fraction-comparing, Prev: Fraction-coercing, Up: Fraction + +1.79.6 Fraction: coercion +------------------------- -1.79.6 Fraction: comparing +asCNumber + Convert the receiver to a kind of number that is understood by the + C call-out mechanism. + + + +File: gst-base.info, Node: Fraction-comparing, Next: Fraction-converting, Prev: Fraction-coercion, Up: Fraction + +1.79.7 Fraction: comparing -------------------------- < arg @@ -1474,7 +1498,7 @@  File: gst-base.info, Node: Fraction-converting, Next: Fraction-optimized cases, Prev: Fraction-comparing, Up: Fraction -1.79.7 Fraction: converting +1.79.8 Fraction: converting --------------------------- asFloatD @@ -1496,7 +1520,7 @@  File: gst-base.info, Node: Fraction-optimized cases, Next: Fraction-printing, Prev: Fraction-converting, Up: Fraction -1.79.8 Fraction: optimized cases +1.79.9 Fraction: optimized cases -------------------------------- negated @@ -1515,8 +1539,8 @@  File: gst-base.info, Node: Fraction-printing, Next: Fraction-testing, Prev: Fraction-optimized cases, Up: Fraction -1.79.9 Fraction: printing -------------------------- +1.79.10 Fraction: printing +-------------------------- printOn: aStream Print a representation of the receiver on aStream @@ -1528,7 +1552,7 @@  File: gst-base.info, Node: Fraction-testing, Prev: Fraction-printing, Up: Fraction -1.79.10 Fraction: testing +1.79.11 Fraction: testing ------------------------- isRational @@ -2682,6 +2706,10 @@ 1.92.5 LargeInteger: coercion ----------------------------- +asCNumber + Convert the receiver to a kind of number that is understood by the + C call-out mechanism. + coerce: aNumber Truncate the number; if needed, convert it to LargeInteger representation. @@ -4910,6 +4938,7 @@ * Number class-converting:: (class) * Number class-testing:: (class) * Number-arithmetic:: (instance) +* Number-coercion:: (instance) * Number-comparing:: (instance) * Number-converting:: (instance) * Number-copying:: (instance) @@ -4947,7 +4976,7 @@  -File: gst-base.info, Node: Number-arithmetic, Next: Number-comparing, Prev: Number class-testing, Up: Number +File: gst-base.info, Node: Number-arithmetic, Next: Number-coercion, Prev: Number class-testing, Up: Number 1.116.3 Number: arithmetic -------------------------- @@ -4991,9 +5020,20 @@  -File: gst-base.info, Node: Number-comparing, Next: Number-converting, Prev: Number-arithmetic, Up: Number +File: gst-base.info, Node: Number-coercion, Next: Number-comparing, Prev: Number-arithmetic, Up: Number + +1.116.4 Number: coercion +------------------------ + +asCNumber + Convert the receiver to a kind of number that is understood by the + C call-out mechanism. + + + +File: gst-base.info, Node: Number-comparing, Next: Number-converting, Prev: Number-coercion, Up: Number -1.116.4 Number: comparing +1.116.5 Number: comparing ------------------------- max: aNumber @@ -5010,7 +5050,7 @@  File: gst-base.info, Node: Number-converting, Next: Number-copying, Prev: Number-comparing, Up: Number -1.116.5 Number: converting +1.116.6 Number: converting -------------------------- asFloat @@ -5065,7 +5105,7 @@  File: gst-base.info, Node: Number-copying, Next: Number-error raising, Prev: Number-converting, Up: Number -1.116.6 Number: copying +1.116.7 Number: copying ----------------------- deepCopy @@ -5078,7 +5118,7 @@  File: gst-base.info, Node: Number-error raising, Next: Number-misc math, Prev: Number-copying, Up: Number -1.116.7 Number: error raising +1.116.8 Number: error raising ----------------------------- arithmeticError: msg @@ -5092,7 +5132,7 @@  File: gst-base.info, Node: Number-misc math, Next: Number-point creation, Prev: Number-error raising, Up: Number -1.116.8 Number: misc math +1.116.9 Number: misc math ------------------------- abs @@ -5188,8 +5228,8 @@  File: gst-base.info, Node: Number-point creation, Next: Number-retrying, Prev: Number-misc math, Up: Number -1.116.9 Number: point creation ------------------------------- +1.116.10 Number: point creation +------------------------------- @ y Answer a new point whose x is the receiver and whose y is y @@ -5201,7 +5241,7 @@  File: gst-base.info, Node: Number-retrying, Next: Number-shortcuts and iterators, Prev: Number-point creation, Up: Number -1.116.10 Number: retrying +1.116.11 Number: retrying ------------------------- retry: aSymbol coercing: aNumber @@ -5247,7 +5287,7 @@  File: gst-base.info, Node: Number-shortcuts and iterators, Next: Number-testing, Prev: Number-retrying, Up: Number -1.116.11 Number: shortcuts and iterators +1.116.12 Number: shortcuts and iterators ---------------------------------------- to: stop @@ -5282,7 +5322,7 @@  File: gst-base.info, Node: Number-testing, Next: Number-truncation and round off, Prev: Number-shortcuts and iterators, Up: Number -1.116.12 Number: testing +1.116.13 Number: testing ------------------------ closeTo: num @@ -5333,7 +5373,7 @@  File: gst-base.info, Node: Number-truncation and round off, Prev: Number-testing, Up: Number -1.116.13 Number: truncation and round off +1.116.14 Number: truncation and round off ----------------------------------------- asInteger @@ -6344,7 +6384,7 @@ ------------------------------------------ changed: aSymbol - Before quitting, wait until all processes are done. + Not commented. initialize Initialize the globals @@ -8994,6 +9034,10 @@ 1.140.3 ScaledDecimal: coercion ------------------------------- +asCNumber + Convert the receiver to a kind of number that is understood by the + C call-out mechanism. + asFloatD Answer the receiver, converted to a FloatD @@ -10030,6 +10074,7 @@ * SmallInteger-bit arithmetic:: (instance) * SmallInteger-built ins:: (instance) * SmallInteger-builtins:: (instance) +* SmallInteger-coercion:: (instance) * SmallInteger-coercion methods:: (instance) * SmallInteger-testing functionality:: (instance) diff -rNu smalltalk-3.0.2/doc/gst-base.info-3 smalltalk-3.0.3/doc/gst-base.info-3 --- smalltalk-3.0.2/doc/gst-base.info-3 2008-03-07 12:12:21.000000000 +0100 +++ smalltalk-3.0.3/doc/gst-base.info-3 2008-05-14 12:35:05.000000000 +0200 @@ -108,7 +108,7 @@  -File: gst-base.info, Node: SmallInteger-builtins, Next: SmallInteger-coercion methods, Prev: SmallInteger-built ins, Up: SmallInteger +File: gst-base.info, Node: SmallInteger-builtins, Next: SmallInteger-coercion, Prev: SmallInteger-built ins, Up: SmallInteger 1.148.5 SmallInteger: builtins ------------------------------ @@ -134,9 +134,20 @@  -File: gst-base.info, Node: SmallInteger-coercion methods, Next: SmallInteger-testing functionality, Prev: SmallInteger-builtins, Up: SmallInteger +File: gst-base.info, Node: SmallInteger-coercion, Next: SmallInteger-coercion methods, Prev: SmallInteger-builtins, Up: SmallInteger -1.148.6 SmallInteger: coercion methods +1.148.6 SmallInteger: coercion +------------------------------ + +asCNumber + Convert the receiver to a kind of number that is understood by the + C call-out mechanism. + + + +File: gst-base.info, Node: SmallInteger-coercion methods, Next: SmallInteger-testing functionality, Prev: SmallInteger-coercion, Up: SmallInteger + +1.148.7 SmallInteger: coercion methods -------------------------------------- generality @@ -152,7 +163,7 @@  File: gst-base.info, Node: SmallInteger-testing functionality, Prev: SmallInteger-coercion methods, Up: SmallInteger -1.148.7 SmallInteger: testing functionality +1.148.8 SmallInteger: testing functionality ------------------------------------------- isSmallInteger @@ -910,11 +921,20 @@ Find all the matches of pattern within the receiver and collect them into an OrderedCollection. +allOccurrencesOfRegex: pattern do: aBlock + Find all the matches of pattern within the receiver and pass the + RegexResults objects to aBlock. + allOccurrencesOfRegex: pattern from: from to: to Find all the matches of pattern within the receiver and within the given range of indices. Collect them into an OrderedCollection, which is then returned. +allOccurrencesOfRegex: pattern from: from to: to do: aBlock + Find all the matches of pattern within the receiver and within the + given range of indices. For each match, pass the RegexResults + object to aBlock. + asRegex Answer the receiver, converted to a Regex object. Binary files smalltalk-3.0.2/doc/gst-base.info-4 and smalltalk-3.0.3/doc/gst-base.info-4 differ Binary files smalltalk-3.0.2/doc/gst-base.info-5 and smalltalk-3.0.3/doc/gst-base.info-5 differ diff -rNu smalltalk-3.0.2/doc/gst-config.1 smalltalk-3.0.3/doc/gst-config.1 --- smalltalk-3.0.2/doc/gst-config.1 2008-01-22 17:12:36.000000000 +0100 +++ smalltalk-3.0.3/doc/gst-config.1 2008-05-14 12:18:13.000000000 +0200 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.28. -.TH GST-CONFIG "1" "January 2008" "gst-config 3.0" "User Commands" +.TH GST-CONFIG "1" "May 2008" "gst-config 3.0.3" "User Commands" .SH NAME gst-config \- configuration for libgst .SH SYNOPSIS diff -rNu smalltalk-3.0.2/doc/gst-convert.1 smalltalk-3.0.3/doc/gst-convert.1 --- smalltalk-3.0.2/doc/gst-convert.1 2008-03-07 12:04:26.000000000 +0100 +++ smalltalk-3.0.3/doc/gst-convert.1 2008-05-14 12:18:15.000000000 +0200 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.28. -.TH GST-CONVERT "1" "March 2008" "gst-convert version 3.0.2" "User Commands" +.TH GST-CONVERT "1" "May 2008" "gst-convert version 3.0.3" "User Commands" .SH NAME gst-convert \- Smalltalk syntax converter and beautifier .SH DESCRIPTION diff -rNu smalltalk-3.0.2/doc/gst-doc.1 smalltalk-3.0.3/doc/gst-doc.1 --- smalltalk-3.0.2/doc/gst-doc.1 2008-03-07 12:04:30.000000000 +0100 +++ smalltalk-3.0.3/doc/gst-doc.1 2008-05-14 12:18:17.000000000 +0200 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.28. -.TH GST-DOC "1" "March 2008" "gst-doc version 3.0.2" "User Commands" +.TH GST-DOC "1" "May 2008" "gst-doc version 3.0.3" "User Commands" .SH NAME gst-doc \- GNU Smalltalk documentation generator .SH DESCRIPTION diff -rNu smalltalk-3.0.2/doc/gst-libs.info smalltalk-3.0.3/doc/gst-libs.info --- smalltalk-3.0.2/doc/gst-libs.info 2008-03-07 12:04:22.000000000 +0100 +++ smalltalk-3.0.3/doc/gst-libs.info 2008-05-14 12:18:10.000000000 +0200 @@ -16,8 +16,8 @@  Indirect: gst-libs.info-1: 694 -gst-libs.info-2: 300040 -gst-libs.info-3: 590729 +gst-libs.info-2: 300249 +gst-libs.info-3: 592169  Tag Table: (Indirect) @@ -321,126 +321,127 @@ Node: TCP.AbstractSocket class-instance creation291774 Node: TCP.AbstractSocket class-timed-out operations292369 Node: TCP.AbstractSocket-accessing293360 -Node: TCP.AbstractSocket-printing294603 -Node: TCP.AbstractSocket-socket options294911 -Node: TCP.AbstractSocket-stream protocol295844 -Node: TCP.AbstractSocket-testing296606 -Node: TCP.AbstractSocketImpl296882 -Node: TCP.AbstractSocketImpl class-abstract297639 -Node: TCP.AbstractSocketImpl class-C call-outs298093 -Node: TCP.AbstractSocketImpl class-C constants299150 -Node: TCP.AbstractSocketImpl class-socket creation299695 -Node: TCP.AbstractSocketImpl-accessing300040 -Node: TCP.AbstractSocketImpl-asynchronous operations301201 -Node: TCP.AbstractSocketImpl-C call-outs301937 -Node: TCP.AbstractSocketImpl-socket operations302985 -Node: TCP.AbstractSocketImpl-socket options304939 -Node: TCP.Datagram307059 -Node: TCP.Datagram class-instance creation307386 -Node: TCP.Datagram-accessing308697 -Node: TCP.DatagramSocket309730 -Node: TCP.DatagramSocket class-accessing310245 -Node: TCP.DatagramSocket class-initialization310894 -Node: TCP.DatagramSocket class-instance creation311256 -Node: TCP.DatagramSocket-accessing312271 -Node: TCP.DatagramSocket-direct operations313174 -Node: TCP.DatagramSocketImpl313489 -Node: TCP.DatagramSocketImpl class-parameters313979 -Node: TCP.DatagramSocketImpl-accessing314280 -Node: TCP.DatagramSocketImpl-C constants314705 -Node: TCP.DatagramSocketImpl-socket operations315151 -Node: TCP.ICMPSocketImpl316305 -Node: TCP.ICMPSocketImpl class-C constants316670 -Node: TCP.ICMPSocketImpl class-implementation316931 -Node: TCP.IPAddress317272 -Node: TCP.IPAddress class-C call-outs317832 -Node: TCP.IPAddress class-C constants318100 -Node: TCP.IPAddress class-constants318412 -Node: TCP.IPAddress class-initialization318775 -Node: TCP.IPAddress class-instance creation319488 -Node: TCP.IPAddress-accessing323368 -Node: TCP.IPAddress-printing324506 -Node: TCP.MulticastSocket324733 -Node: TCP.MulticastSocket-instance creation325052 -Node: TCP.MulticastSocketImpl325883 -Node: TCP.MulticastSocketImpl-multicasting326219 -Node: TCP.OOBSocketImpl327006 -Node: TCP.OOBSocketImpl class-implementation327424 -Node: TCP.OOBSocketImpl-C constants327755 -Node: TCP.OOBSocketImpl-implementation328034 -Node: TCP.RawSocketImpl328434 -Node: TCP.RawSocketImpl class-parameters328744 -Node: TCP.ReadBuffer328986 -Node: TCP.ReadBuffer class-instance creation329466 -Node: TCP.ReadBuffer-buffer handling329937 -Node: TCP.ServerSocket330906 -Node: TCP.ServerSocket class-instance creation331295 -Node: TCP.ServerSocket-accessing332771 -Node: TCP.ServerSocket-initializing333696 -Node: TCP.Socket334091 -Node: TCP.Socket class-accessing334659 -Node: TCP.Socket class-instance creation335464 -Node: TCP.Socket class-tests336308 -Node: TCP.Socket class-well known ports337869 -Node: TCP.Socket-accessing339959 -Node: TCP.Socket-out-of-band data340272 -Node: TCP.Socket-printing340584 -Node: TCP.Socket-stream protocol340854 -Node: TCP.SocketAddress342973 -Node: TCP.SocketAddress class-abstract343504 -Node: TCP.SocketAddress class-accessing343948 -Node: TCP.SocketAddress class-C call-outs345951 -Node: TCP.SocketAddress class-host name lookup346392 -Node: TCP.SocketAddress class-initialization347200 -Node: TCP.SocketAddress-accessing348410 -Node: TCP.SocketImpl349417 -Node: TCP.SocketImpl class-parameters349807 -Node: TCP.SocketImpl-abstract350069 -Node: TCP.SocketImpl-socket operations350402 -Node: TCP.TCPSocketImpl350844 -Node: TCP.TCPSocketImpl class-C constants351297 -Node: TCP.TCPSocketImpl class-implementation351619 -Node: TCP.TCPSocketImpl-implementation351997 -Node: TCP.TCPSocketImpl-socket options352367 -Node: TCP.UDPSocketImpl352726 -Node: TCP.UDPSocketImpl class-C constants353138 -Node: TCP.UDPSocketImpl class-implementation353427 -Node: TCP.UDPSocketImpl-multicasting353803 -Node: TCP.WriteBuffer354711 -Node: TCP.WriteBuffer-buffer handling355133 -Node: ZLib package355587 -Node: ZLib.DeflateStream356670 -Node: ZLib.DeflateStream class-instance creation357055 -Node: ZLib.DeflateWriteStream357532 -Node: ZLib.GZipDeflateStream357906 -Node: ZLib.GZipDeflateStream class-instance creation358326 -Node: ZLib.GZipDeflateWriteStream358819 -Node: ZLib.GZipInflateStream359192 -Node: ZLib.InflateStream359548 -Node: ZLib.RawDeflateStream359907 -Node: ZLib.RawDeflateStream class-instance creation360314 -Node: ZLib.RawDeflateWriteStream361047 -Node: ZLib.RawDeflateWriteStream class-instance creation361473 -Node: ZLib.RawInflateStream361960 -Node: ZLib.RawInflateStream-positioning362356 -Node: ZLib.ZlibError363447 -Node: ZLib.ZlibError-accessing363819 -Node: ZLib.ZlibReadStream364087 -Node: ZLib.ZlibReadStream-streaming364495 -Node: ZLib.ZlibStream365432 -Node: ZLib.ZlibStream class-accessing365953 -Node: ZLib.ZlibStream class-instance creation366678 -Node: ZLib.ZlibStream-streaming367092 -Node: ZLib.ZlibWriteStream367535 -Node: ZLib.ZlibWriteStream-streaming367951 -Node: XML/XPath/XSL packages369786 -Node: Building a DOM from XML370135 -Node: Building XML375543 -Node: Using DTDs378730 -Node: XSL Processing382003 -Node: Attributions383442 -Node: Class index383805 -Node: Method index394119 -Node: Cross-reference590729 +Node: TCP.AbstractSocket-printing294812 +Node: TCP.AbstractSocket-socket options295120 +Node: TCP.AbstractSocket-stream protocol296053 +Node: TCP.AbstractSocket-testing296815 +Node: TCP.AbstractSocketImpl297091 +Node: TCP.AbstractSocketImpl class-abstract297848 +Node: TCP.AbstractSocketImpl class-C call-outs298302 +Node: TCP.AbstractSocketImpl class-C constants299359 +Node: TCP.AbstractSocketImpl class-socket creation299904 +Node: TCP.AbstractSocketImpl-accessing300249 +Node: TCP.AbstractSocketImpl-asynchronous operations301410 +Node: TCP.AbstractSocketImpl-C call-outs302146 +Node: TCP.AbstractSocketImpl-socket operations303194 +Node: TCP.AbstractSocketImpl-socket options305148 +Node: TCP.Datagram307268 +Node: TCP.Datagram class-instance creation307595 +Node: TCP.Datagram-accessing308906 +Node: TCP.DatagramSocket309939 +Node: TCP.DatagramSocket class-accessing310454 +Node: TCP.DatagramSocket class-initialization311103 +Node: TCP.DatagramSocket class-instance creation311465 +Node: TCP.DatagramSocket-accessing312480 +Node: TCP.DatagramSocket-direct operations313383 +Node: TCP.DatagramSocketImpl313698 +Node: TCP.DatagramSocketImpl class-parameters314188 +Node: TCP.DatagramSocketImpl-accessing314489 +Node: TCP.DatagramSocketImpl-C constants314914 +Node: TCP.DatagramSocketImpl-socket operations315360 +Node: TCP.ICMPSocketImpl316514 +Node: TCP.ICMPSocketImpl class-C constants316879 +Node: TCP.ICMPSocketImpl class-implementation317140 +Node: TCP.IPAddress317481 +Node: TCP.IPAddress class-C call-outs318041 +Node: TCP.IPAddress class-C constants318309 +Node: TCP.IPAddress class-constants318621 +Node: TCP.IPAddress class-initialization318984 +Node: TCP.IPAddress class-instance creation319697 +Node: TCP.IPAddress-accessing323577 +Node: TCP.IPAddress-printing324715 +Node: TCP.MulticastSocket324942 +Node: TCP.MulticastSocket-instance creation325261 +Node: TCP.MulticastSocketImpl326092 +Node: TCP.MulticastSocketImpl-multicasting326428 +Node: TCP.OOBSocketImpl327215 +Node: TCP.OOBSocketImpl class-implementation327633 +Node: TCP.OOBSocketImpl-C constants327964 +Node: TCP.OOBSocketImpl-implementation328243 +Node: TCP.RawSocketImpl328643 +Node: TCP.RawSocketImpl class-parameters328953 +Node: TCP.ReadBuffer329195 +Node: TCP.ReadBuffer class-instance creation329675 +Node: TCP.ReadBuffer-buffer handling330146 +Node: TCP.ServerSocket331115 +Node: TCP.ServerSocket class-instance creation331504 +Node: TCP.ServerSocket-accessing332980 +Node: TCP.ServerSocket-initializing333905 +Node: TCP.Socket334300 +Node: TCP.Socket class-accessing334868 +Node: TCP.Socket class-instance creation335673 +Node: TCP.Socket class-tests336517 +Node: TCP.Socket class-well known ports338078 +Node: TCP.Socket-accessing340168 +Node: TCP.Socket-out-of-band data340481 +Node: TCP.Socket-printing340793 +Node: TCP.Socket-stream protocol341063 +Node: TCP.SocketAddress343419 +Node: TCP.SocketAddress class-abstract343950 +Node: TCP.SocketAddress class-accessing344394 +Node: TCP.SocketAddress class-C call-outs346397 +Node: TCP.SocketAddress class-host name lookup346838 +Node: TCP.SocketAddress class-initialization347646 +Node: TCP.SocketAddress-accessing348856 +Node: TCP.SocketImpl349863 +Node: TCP.SocketImpl class-parameters350253 +Node: TCP.SocketImpl-abstract350515 +Node: TCP.SocketImpl-socket operations350848 +Node: TCP.TCPSocketImpl351290 +Node: TCP.TCPSocketImpl class-C constants351743 +Node: TCP.TCPSocketImpl class-implementation352065 +Node: TCP.TCPSocketImpl-implementation352443 +Node: TCP.TCPSocketImpl-socket options352813 +Node: TCP.UDPSocketImpl353172 +Node: TCP.UDPSocketImpl class-C constants353584 +Node: TCP.UDPSocketImpl class-implementation353873 +Node: TCP.UDPSocketImpl-multicasting354249 +Node: TCP.WriteBuffer355157 +Node: TCP.WriteBuffer-buffer handling355619 +Node: TCP.WriteBuffer-testing356105 +Node: ZLib package356316 +Node: ZLib.DeflateStream357399 +Node: ZLib.DeflateStream class-instance creation357784 +Node: ZLib.DeflateWriteStream358261 +Node: ZLib.GZipDeflateStream358635 +Node: ZLib.GZipDeflateStream class-instance creation359055 +Node: ZLib.GZipDeflateWriteStream359548 +Node: ZLib.GZipInflateStream359921 +Node: ZLib.InflateStream360277 +Node: ZLib.RawDeflateStream360636 +Node: ZLib.RawDeflateStream class-instance creation361043 +Node: ZLib.RawDeflateWriteStream361776 +Node: ZLib.RawDeflateWriteStream class-instance creation362202 +Node: ZLib.RawInflateStream362689 +Node: ZLib.RawInflateStream-positioning363085 +Node: ZLib.ZlibError364176 +Node: ZLib.ZlibError-accessing364548 +Node: ZLib.ZlibReadStream364816 +Node: ZLib.ZlibReadStream-streaming365224 +Node: ZLib.ZlibStream366161 +Node: ZLib.ZlibStream class-accessing366682 +Node: ZLib.ZlibStream class-instance creation367407 +Node: ZLib.ZlibStream-streaming367821 +Node: ZLib.ZlibWriteStream368264 +Node: ZLib.ZlibWriteStream-streaming368680 +Node: XML/XPath/XSL packages370515 +Node: Building a DOM from XML370864 +Node: Building XML376272 +Node: Using DTDs379459 +Node: XSL Processing382732 +Node: Attributions384171 +Node: Class index384534 +Node: Method index394848 +Node: Cross-reference592169  End Tag Table diff -rNu smalltalk-3.0.2/doc/gst-libs.info-1 smalltalk-3.0.3/doc/gst-libs.info-1 --- smalltalk-3.0.2/doc/gst-libs.info-1 2008-03-07 12:04:22.000000000 +0100 +++ smalltalk-3.0.3/doc/gst-libs.info-1 2008-05-14 12:18:10.000000000 +0200 @@ -8737,8 +8737,15 @@ subclass). available + Answer whether there is data available on the socket. Same as + #canRead, present for backwards compatibility. + +canRead Answer whether there is data available on the socket. +canWrite + Answer whether there is free space in the socket's write buffer. + close Close the socket represented by the receiver. diff -rNu smalltalk-3.0.2/doc/gst-libs.info-2 smalltalk-3.0.3/doc/gst-libs.info-2 --- smalltalk-3.0.2/doc/gst-libs.info-2 2008-03-07 12:04:22.000000000 +0100 +++ smalltalk-3.0.3/doc/gst-libs.info-2 2008-05-14 12:18:10.000000000 +0200 @@ -1303,16 +1303,24 @@ atEnd Answer whether more data is available on the socket -available +bufferContents + Answer the current contents of the read buffer + +canRead Answer whether more data is available in the socket's read buffer or from the operating system. -bufferContents - Answer the current contents of the read buffer +canWrite + Answer whether more data is available in the socket's read buffer + or from the operating system. close Flush and close the socket. +ensureWriteable + Answer whether more data is available in the socket's read buffer + or from the operating system. + fill Fill the read buffer with data read from the socket @@ -1756,9 +1764,10 @@ * Menu: * TCP.WriteBuffer-buffer handling:: (instance) +* TCP.WriteBuffer-testing:: (instance)  -File: gst-libs.info, Node: TCP.WriteBuffer-buffer handling, Up: TCP.WriteBuffer +File: gst-libs.info, Node: TCP.WriteBuffer-buffer handling, Next: TCP.WriteBuffer-testing, Up: TCP.WriteBuffer 6.19.1 TCP.WriteBuffer: buffer handling --------------------------------------- @@ -1773,6 +1782,16 @@  +File: gst-libs.info, Node: TCP.WriteBuffer-testing, Prev: TCP.WriteBuffer-buffer handling, Up: TCP.WriteBuffer + +6.19.2 TCP.WriteBuffer: testing +------------------------------- + +isFull + Not commented. + + + File: gst-libs.info, Node: ZLib package, Next: Class index, Prev: XML/XPath/XSL packages, Up: Top 7 Compressing and decompressing data with ZLib @@ -2771,29 +2790,29 @@ * /: Complex-math. (line 15) * <: Complex-comparing. (line 6) * <=: Complex-comparing. (line 9) -* = <1>: TCP.SocketAddress-accessing. +* = <1>: Complex-comparing. (line 12) +* =: TCP.SocketAddress-accessing. (line 6) -* =: Complex-comparing. (line 12) * >: Complex-comparing. (line 15) * >=: Complex-comparing. (line 18) -* ? <1>: I18N.LocaleConventions-accessing. +* ? <1>: I18N.LcPrintFormats-printing. (line 6) -* ? <2>: I18N.LcPrintFormats-printing. +* ? <2>: I18N.LcMessages-opening MO files. (line 6) -* ? <3>: I18N.LcMessages-opening MO files. +* ? <3>: I18N.LocaleConventions-accessing. (line 6) -* ? <4>: I18N.LcMessagesDomain-querying. +* ? <4>: I18N.LocaleConventions class-accessing. (line 6) -* ?: I18N.LocaleConventions class-accessing. +* ?: I18N.LcMessagesDomain-querying. (line 6) * abs: Complex-math. (line 18) * absSquared: Complex-math. (line 21) * accept: TCP.ServerSocket-accessing. (line 6) -* accept_ <1>: TCP.ServerSocket-accessing. - (line 10) -* accept_: TCP.AbstractSocketImpl-socket operations. +* accept_ <1>: TCP.AbstractSocketImpl-socket operations. (line 6) +* accept_: TCP.ServerSocket-accessing. + (line 10) * accept_peer_addrLen_ <1>: TCP.AbstractSocketImpl-C call-outs. (line 6) * accept_peer_addrLen_: TCP.AbstractSocketImpl class-C call-outs. @@ -2844,19 +2863,19 @@ (line 23) * addLast_: BLOX.BList-accessing. (line 23) -* addLast_element_ <1>: BLOX.BDropDown-list box accessing. +* addLast_element_ <1>: BLOX.BList-accessing. (line 28) -* addLast_element_: BLOX.BList-accessing. +* addLast_element_: BLOX.BDropDown-list box accessing. (line 28) * addLine: BLOX.BMenu-callback registration. (line 6) * addMenuItemFor_notifying_: BLOX.BMenu-callback registration. (line 9) -* address <1>: TCP.ServerSocket-accessing. - (line 15) -* address <2>: TCP.Datagram-accessing. +* address <1>: TCP.AbstractSocket-accessing. (line 6) -* address <3>: TCP.AbstractSocket-accessing. +* address <2>: TCP.ServerSocket-accessing. + (line 15) +* address <3>: TCP.Datagram-accessing. (line 6) * address <4>: TCP.DatagramSocket-accessing. (line 6) @@ -2864,23 +2883,23 @@ (line 6) * address_: TCP.Datagram-accessing. (line 9) -* addressClass <1>: TCP.AbstractSocketImpl-socket operations. - (line 11) -* addressClass <2>: TCP.OOBSocketImpl class-implementation. +* addressClass <1>: TCP.UDPSocketImpl class-implementation. (line 6) -* addressClass <3>: TCP.UDPSocketImpl class-implementation. +* addressClass <2>: TCP.ICMPSocketImpl class-implementation. (line 6) -* addressClass <4>: TCP.IPAddress-accessing. +* addressClass <3>: TCP.IPAddress-accessing. (line 6) -* addressClass <5>: TCP.TCPSocketImpl class-implementation. +* addressClass <4>: TCP.TCPSocketImpl class-implementation. (line 6) -* addressClass <6>: TCP.ICMPSocketImpl class-implementation. +* addressClass <5>: TCP.AbstractSocketImpl-socket operations. + (line 11) +* addressClass <6>: TCP.OOBSocketImpl class-implementation. (line 6) * addressClass: TCP.AbstractSocketImpl class-abstract. (line 6) -* addressFamily <1>: TCP.SocketAddress class-accessing. +* addressFamily <1>: TCP.IPAddress class-C constants. (line 6) -* addressFamily: TCP.IPAddress class-C constants. +* addressFamily: TCP.SocketAddress class-accessing. (line 6) * addressSize: TCP.IPAddress class-constants. (line 6) @@ -2911,12 +2930,12 @@ * asFraction: Complex-converting. (line 21) * asPrimitiveWidget <1>: BLOX.BExtended-accessing. (line 6) -* asPrimitiveWidget <2>: BLOX.BMenuObject-accessing. - (line 38) -* asPrimitiveWidget <3>: BLOX.BPrimitive-accessing. +* asPrimitiveWidget <2>: BLOX.BPrimitive-accessing. (line 6) -* asPrimitiveWidget: BLOX.Blox-widget protocol. +* asPrimitiveWidget <3>: BLOX.Blox-widget protocol. (line 6) +* asPrimitiveWidget: BLOX.BMenuObject-accessing. + (line 38) * associationAt_ <1>: BLOX.BDropDown-list box accessing. (line 39) * associationAt_: BLOX.BList-accessing. @@ -2925,102 +2944,100 @@ (line 6) * asUnicodeString: I18N.EncodedString-accessing. (line 9) -* at_ <1>: BLOX.BList-accessing. - (line 44) -* at_ <2>: I18N.EncodedString-accessing. +* at_ <1>: I18N.EncodedString-accessing. (line 12) +* at_ <2>: BLOX.BCanvas-widget protocol. + (line 6) * at_ <3>: I18N.LcMessagesDomain-querying. (line 10) -* at_ <4>: BLOX.BDropDown-list box accessing. +* at_ <4>: BLOX.BList-accessing. + (line 44) +* at_ <5>: BLOX.BDropDown-list box accessing. (line 44) -* at_ <5>: BLOX.Blox class-utility. - (line 10) * at_ <6>: DBI.Row-accessing. (line 6) -* at_: BLOX.BCanvas-widget protocol. - (line 6) +* at_: BLOX.Blox class-utility. + (line 10) * at_cache_: TCP.SocketAddress class-accessing. (line 13) * at_plural_with_: I18N.LcMessagesDomain-querying. (line 14) -* at_put_ <1>: I18N.EncodedString-accessing. - (line 15) -* at_put_: I18N.LcMessagesDomain-querying. +* at_put_ <1>: I18N.LcMessagesDomain-querying. (line 18) -* atEnd <1>: TCP.Socket-stream protocol. +* at_put_: I18N.EncodedString-accessing. + (line 15) +* atEnd <1>: TCP.ReadBuffer-buffer handling. (line 6) -* atEnd <2>: TCP.AbstractSocket-stream protocol. +* atEnd <2>: ZLib.ZlibReadStream-streaming. (line 6) * atEnd <3>: DBI.ResultSet-cursor access. (line 6) -* atEnd <4>: ZLib.ZlibReadStream-streaming. +* atEnd <4>: I18N.Encoder-stream operations. (line 6) -* atEnd <5>: I18N.Encoder-stream operations. +* atEnd <5>: TCP.Socket-stream protocol. (line 6) -* atEnd: TCP.ReadBuffer-buffer handling. +* atEnd: TCP.AbstractSocket-stream protocol. (line 6) * atEndOfInput: I18N.Encoder-stream operations. (line 11) * atIndex_: DBI.Row-accessing. (line 9) * atMouse: BLOX.Blox class-utility. (line 15) -* available <1>: TCP.AbstractSocket-accessing. +* available: TCP.AbstractSocket-accessing. (line 11) -* available: TCP.Socket-stream protocol. - (line 9) -* backgroundColor <1>: BLOX.BImage-accessing. - (line 6) -* backgroundColor <2>: BLOX.BMenuObject-accessing. - (line 41) -* backgroundColor <3>: BLOX.BText-accessing. +* backgroundColor <1>: BLOX.BCanvas-accessing. (line 6) -* backgroundColor <4>: BLOX.BForm-accessing. +* backgroundColor <2>: BLOX.BLabel-accessing. + (line 26) +* backgroundColor <3>: BLOX.BButton-accessing. (line 6) -* backgroundColor <5>: BLOX.BList-accessing. +* backgroundColor <4>: BLOX.BList-accessing. (line 47) -* backgroundColor <6>: BLOX.BCanvas-accessing. +* backgroundColor <5>: BLOX.BTextAttributes-setting attributes. (line 6) -* backgroundColor <7>: BLOX.BTextAttributes-setting attributes. +* backgroundColor <6>: BLOX.BImage-accessing. (line 6) -* backgroundColor <8>: BLOX.BEdit-accessing. +* backgroundColor <7>: BLOX.BForm-accessing. (line 6) -* backgroundColor <9>: BLOX.BLabel-accessing. - (line 26) -* backgroundColor <10>: BLOX.BButton-accessing. +* backgroundColor <8>: BLOX.BText-accessing. (line 6) -* backgroundColor <11>: BLOX.BProgress-accessing. +* backgroundColor <9>: BLOX.BDropDown-accessing. (line 6) -* backgroundColor: BLOX.BDropDown-accessing. +* backgroundColor <10>: BLOX.BProgress-accessing. (line 6) -* backgroundColor_ <1>: BLOX.BProgress-accessing. - (line 11) +* backgroundColor <11>: BLOX.BEdit-accessing. + (line 6) +* backgroundColor: BLOX.BMenuObject-accessing. + (line 41) +* backgroundColor_ <1>: BLOX.BTextAttributes-setting attributes. + (line 13) * backgroundColor_ <2>: BLOX.BButton-accessing. (line 12) * backgroundColor_ <3>: BLOX.BCanvas-accessing. (line 12) -* backgroundColor_ <4>: BLOX.BDropDown-accessing. - (line 15) -* backgroundColor_ <5>: BLOX.BDropDownList-accessing. +* backgroundColor_ <4>: BLOX.BTextAttributes class-instance-creation shortcuts. (line 6) -* backgroundColor_ <6>: BLOX.BMenuObject-accessing. - (line 47) -* backgroundColor_ <7>: BLOX.BText-accessing. +* backgroundColor_ <5>: BLOX.BEdit-accessing. (line 12) -* backgroundColor_ <8>: BLOX.BEdit-accessing. +* backgroundColor_ <6>: BLOX.BProgress-accessing. + (line 11) +* backgroundColor_ <7>: BLOX.BForm-accessing. (line 12) -* backgroundColor_ <9>: BLOX.BTextAttributes class-instance-creation shortcuts. - (line 6) -* backgroundColor_ <10>: BLOX.BLabel-accessing. +* backgroundColor_ <8>: BLOX.BLabel-accessing. (line 32) -* backgroundColor_ <11>: BLOX.BTextAttributes-setting attributes. - (line 13) +* backgroundColor_ <9>: BLOX.BMenuObject-accessing. + (line 47) +* backgroundColor_ <10>: BLOX.BDropDown-accessing. + (line 15) +* backgroundColor_ <11>: BLOX.BText-accessing. + (line 12) * backgroundColor_ <12>: BLOX.BDropDownEdit-accessing. (line 6) -* backgroundColor_ <13>: BLOX.BForm-accessing. - (line 12) -* backgroundColor_ <14>: BLOX.BList-accessing. +* backgroundColor_ <13>: BLOX.BList-accessing. (line 53) -* backgroundColor_: BLOX.BImage-accessing. +* backgroundColor_ <14>: BLOX.BImage-accessing. (line 12) +* backgroundColor_: BLOX.BDropDownList-accessing. + (line 6) * balloonDelayTime: BLOX.BBalloon class-accessing. (line 6) * balloonDelayTime_: BLOX.BBalloon class-accessing. @@ -3033,9 +3050,9 @@ (line 20) * between_and_do_: BLOX.BCanvas-widget protocol. (line 10) -* bind_to_addrLen_ <1>: TCP.AbstractSocketImpl class-C call-outs. +* bind_to_addrLen_ <1>: TCP.AbstractSocketImpl-C call-outs. (line 9) -* bind_to_addrLen_: TCP.AbstractSocketImpl-C call-outs. +* bind_to_addrLen_: TCP.AbstractSocketImpl class-C call-outs. (line 9) * bindTo_port_: TCP.AbstractSocketImpl-socket operations. (line 15) @@ -3045,22 +3062,22 @@ (line 10) * blank: BLOX.BImage-image management. (line 6) -* blox <1>: BLOX.Gui-accessing. (line 6) -* blox: BLOX.BCanvasObject-accessing. +* blox <1>: BLOX.BCanvasObject-accessing. (line 6) +* blox: BLOX.Gui-accessing. (line 6) * blox_: BLOX.Gui-accessing. (line 9) -* blue <1>: BLOX.BTextAttributes-colors. - (line 9) -* blue: BLOX.BTextAttributes class-instance-creation shortcuts. +* blue <1>: BLOX.BTextAttributes class-instance-creation shortcuts. (line 13) +* blue: BLOX.BTextAttributes-colors. + (line 9) * borderWidth: BLOX.BWidget-accessing. (line 6) * borderWidth_: BLOX.BWidget-accessing. (line 15) -* boundingBox <1>: BLOX.BBoundingBox-accessing. - (line 6) -* boundingBox <2>: BLOX.BCanvas-widget protocol. +* boundingBox <1>: BLOX.BCanvas-widget protocol. (line 15) +* boundingBox <2>: BLOX.BBoundingBox-accessing. + (line 6) * boundingBox <3>: BLOX.BPolyline-accessing. (line 6) * boundingBox <4>: BLOX.BCanvasObject-accessing. @@ -3074,65 +3091,73 @@ * bufferContents <1>: TCP.ReadBuffer-buffer handling. (line 9) * bufferContents: TCP.Socket-stream protocol. - (line 13) -* bufferSize <1>: ZLib.ZlibStream class-accessing. + (line 9) +* bufferSize <1>: TCP.DatagramSocketImpl-accessing. (line 6) * bufferSize <2>: TCP.DatagramSocket-accessing. (line 9) -* bufferSize: TCP.DatagramSocketImpl-accessing. +* bufferSize: ZLib.ZlibStream class-accessing. (line 6) * bufferSize_ <1>: TCP.DatagramSocketImpl-accessing. (line 9) -* bufferSize_ <2>: ZLib.ZlibStream class-accessing. - (line 10) -* bufferSize_: TCP.DatagramSocket-accessing. +* bufferSize_ <2>: TCP.DatagramSocket-accessing. (line 12) +* bufferSize_: ZLib.ZlibStream class-accessing. + (line 10) * byName_: TCP.SocketAddress class-host name lookup. (line 12) -* callback <1>: BLOX.BEdit-accessing. - (line 18) -* callback <2>: BLOX.BList-widget protocol. +* callback <1>: BLOX.BWindow-accessing. (line 6) -* callback <3>: BLOX.BMenuObject-callback. +* callback <2>: BLOX.BMenuObject-callback. (line 6) -* callback <4>: BLOX.BText-accessing. +* callback <3>: BLOX.BButton-accessing. + (line 18) +* callback <4>: BLOX.BEdit-accessing. (line 18) * callback <5>: BLOX.BButtonLike-accessing. (line 6) -* callback <6>: BLOX.BWindow-accessing. +* callback <6>: BLOX.BDropDown-callbacks. (line 6) -* callback <7>: BLOX.BButton-accessing. +* callback <7>: BLOX.BText-accessing. (line 18) -* callback: BLOX.BDropDown-callbacks. +* callback: BLOX.BList-widget protocol. (line 6) -* callback_message_ <1>: BLOX.BToggle-accessing. +* callback_message_ <1>: BLOX.BDropDownList-callbacks. (line 6) -* callback_message_ <2>: BLOX.BEdit-accessing. - (line 22) -* callback_message_ <3>: BLOX.BText-accessing. - (line 22) -* callback_message_ <4>: BLOX.BList-widget protocol. +* callback_message_ <2>: BLOX.BToggle-accessing. + (line 6) +* callback_message_ <3>: BLOX.BRadioButton-accessing. + (line 6) +* callback_message_ <4>: BLOX.BMenuObject-callback. (line 10) * callback_message_ <5>: BLOX.BWindow-accessing. (line 10) -* callback_message_ <6>: BLOX.BDropDownList-callbacks. - (line 6) -* callback_message_ <7>: BLOX.BDropDown-callbacks. +* callback_message_ <6>: BLOX.BDropDown-callbacks. (line 10) -* callback_message_ <8>: BLOX.BButtonLike-accessing. +* callback_message_ <7>: BLOX.BList-widget protocol. (line 10) -* callback_message_ <9>: BLOX.BRadioButton-accessing. - (line 6) -* callback_message_ <10>: BLOX.BButton-accessing. +* callback_message_ <8>: BLOX.BEdit-accessing. (line 22) -* callback_message_: BLOX.BMenuObject-callback. +* callback_message_ <9>: BLOX.BText-accessing. + (line 22) +* callback_message_ <10>: BLOX.BButtonLike-accessing. (line 10) +* callback_message_: BLOX.BButton-accessing. + (line 22) * callback_message_argument_: BLOX.BMenuObject-callback. (line 15) * callback_using_: BLOX.BMenu-callback registration. (line 17) -* canRead: TCP.OOBSocketImpl-implementation. +* canRead <1>: TCP.OOBSocketImpl-implementation. (line 6) +* canRead <2>: TCP.Socket-stream protocol. + (line 12) +* canRead: TCP.AbstractSocket-accessing. + (line 15) +* canWrite <1>: TCP.Socket-stream protocol. + (line 16) +* canWrite: TCP.AbstractSocket-accessing. + (line 18) * cap <1>: BLOX.BLine-accessing. (line 6) * cap: BLOX.BPolyline-accessing. @@ -3141,27 +3166,27 @@ (line 11) * cap_: BLOX.BPolyline-accessing. (line 16) -* category <1>: I18N.LcNumeric class-accessing. +* category <1>: I18N.LcMonetary class-accessing. (line 6) -* category <2>: I18N.LcTime class-accessing. +* category <2>: I18N.LcMessages class-accessing. (line 6) -* category <3>: I18N.LcMonetary class-accessing. +* category <3>: I18N.LcNumeric class-accessing. (line 6) -* category <4>: I18N.LcMessages class-accessing. +* category <4>: I18N.LcTime class-accessing. (line 6) * category: I18N.LocaleData class-accessing. (line 6) * ceiling: Complex-converting. (line 24) -* center <1>: BLOX.BTextAttributes class-instance-creation shortcuts. - (line 16) -* center <2>: BLOX.BWindow-widget protocol. - (line 6) -* center <3>: BLOX.BDialog-widget protocol. +* center <1>: BLOX.BDialog-widget protocol. (line 6) +* center <2>: BLOX.BTextAttributes class-instance-creation shortcuts. + (line 16) +* center <3>: BLOX.BBoundingBox-accessing. + (line 9) * center <4>: BLOX.BTextAttributes-setting attributes. (line 20) -* center: BLOX.BBoundingBox-accessing. - (line 9) +* center: BLOX.BWindow-widget protocol. + (line 6) * center_extent_: BLOX.BBoundingBox-accessing. (line 12) * centerIn_ <1>: BLOX.BDialog-widget protocol. @@ -3180,70 +3205,70 @@ (line 6) * child_: I18N.RTENegationNode class-initializing. (line 6) -* child_height_ <1>: BLOX.BWidget-geometry management. - (line 12) +* child_height_ <1>: BLOX.BCanvas-geometry management. + (line 13) * child_height_ <2>: BLOX.BText-geometry management. (line 6) * child_height_ <3>: BLOX.BPopupWindow-geometry management. (line 14) -* child_height_: BLOX.BCanvas-geometry management. - (line 13) +* child_height_: BLOX.BWidget-geometry management. + (line 12) * child_heightOffset_ <1>: BLOX.BCanvas-geometry management. (line 16) -* child_heightOffset_ <2>: BLOX.BWidget-geometry management. +* child_heightOffset_ <2>: BLOX.BText-geometry management. + (line 9) +* child_heightOffset_ <3>: BLOX.BWidget-geometry management. (line 23) -* child_heightOffset_ <3>: BLOX.BPopupWindow-geometry management. +* child_heightOffset_: BLOX.BPopupWindow-geometry management. (line 18) -* child_heightOffset_: BLOX.BText-geometry management. - (line 9) * child_stretch_: BLOX.BWidget-geometry management. (line 33) * child_width_ <1>: BLOX.BCanvas-geometry management. (line 19) -* child_width_ <2>: BLOX.BWidget-geometry management. - (line 40) -* child_width_ <3>: BLOX.BText-geometry management. +* child_width_ <2>: BLOX.BText-geometry management. (line 13) +* child_width_ <3>: BLOX.BWidget-geometry management. + (line 40) * child_width_: BLOX.BPopupWindow-geometry management. (line 21) -* child_widthOffset_ <1>: BLOX.BText-geometry management. - (line 16) -* child_widthOffset_ <2>: BLOX.BPopupWindow-geometry management. +* child_widthOffset_ <1>: BLOX.BPopupWindow-geometry management. (line 25) +* child_widthOffset_ <2>: BLOX.BCanvas-geometry management. + (line 22) * child_widthOffset_ <3>: BLOX.BWidget-geometry management. (line 51) -* child_widthOffset_: BLOX.BCanvas-geometry management. - (line 22) +* child_widthOffset_: BLOX.BText-geometry management. + (line 16) * child_x_ <1>: BLOX.BPopupWindow-geometry management. (line 28) -* child_x_ <2>: BLOX.BText-geometry management. - (line 20) +* child_x_ <2>: BLOX.BWidget-geometry management. + (line 61) * child_x_ <3>: BLOX.BCanvas-geometry management. (line 25) -* child_x_: BLOX.BWidget-geometry management. - (line 61) -* child_xOffset_ <1>: BLOX.BWidget-geometry management. - (line 71) -* child_xOffset_ <2>: BLOX.BPopupWindow-geometry management. - (line 32) -* child_xOffset_ <3>: BLOX.BCanvas-geometry management. +* child_x_: BLOX.BText-geometry management. + (line 20) +* child_xOffset_ <1>: BLOX.BCanvas-geometry management. (line 29) -* child_xOffset_: BLOX.BText-geometry management. +* child_xOffset_ <2>: BLOX.BWidget-geometry management. + (line 71) +* child_xOffset_ <3>: BLOX.BText-geometry management. (line 24) -* child_y_ <1>: BLOX.BPopupWindow-geometry management. - (line 35) -* child_y_ <2>: BLOX.BCanvas-geometry management. +* child_xOffset_: BLOX.BPopupWindow-geometry management. (line 32) +* child_y_ <1>: BLOX.BCanvas-geometry management. + (line 32) +* child_y_ <2>: BLOX.BText-geometry management. + (line 27) * child_y_ <3>: BLOX.BWidget-geometry management. (line 81) -* child_y_: BLOX.BText-geometry management. - (line 27) -* child_yOffset_ <1>: BLOX.BText-geometry management. - (line 31) -* child_yOffset_ <2>: BLOX.BCanvas-geometry management. +* child_y_: BLOX.BPopupWindow-geometry management. + (line 35) +* child_yOffset_ <1>: BLOX.BCanvas-geometry management. (line 36) -* child_yOffset_ <3>: BLOX.BWidget-geometry management. +* child_yOffset_ <2>: BLOX.BWidget-geometry management. (line 91) +* child_yOffset_ <3>: BLOX.BText-geometry management. + (line 31) * child_yOffset_: BLOX.BPopupWindow-geometry management. (line 39) * childrenCount: BLOX.Blox-widget protocol. @@ -3262,24 +3287,24 @@ (line 26) * clipboard_: BLOX.Blox class-utility. (line 29) -* close <1>: ZLib.ZlibWriteStream-streaming. +* close <1>: TCP.AbstractSocket-accessing. + (line 21) +* close <2>: DBI.Connection-connecting. (line 6) -* close <2>: TCP.AbstractSocket-accessing. - (line 14) -* close <3>: DBI.Connection-connecting. +* close <3>: TCP.Socket-stream protocol. + (line 20) +* close: ZLib.ZlibWriteStream-streaming. (line 6) -* close: TCP.Socket-stream protocol. - (line 16) * closed: BLOX.BPolyline-accessing. (line 23) * closed_: BLOX.BPolyline-accessing. (line 26) * coerce_: Complex-creation/coercion. (line 6) -* color <1>: BLOX.BCanvasObject-accessing. - (line 12) -* color: BLOX.BColorButton-accessing. +* color <1>: BLOX.BColorButton-accessing. (line 6) +* color: BLOX.BCanvasObject-accessing. + (line 12) * color_ <1>: BLOX.BColorButton-accessing. (line 9) * color_: BLOX.BCanvasObject-accessing. @@ -3291,24 +3316,24 @@ * columnNames <1>: DBI.Row-accessing. (line 19) * columnNames: DBI.ResultSet-accessing. (line 9) -* columns <1>: DBI.Row-accessing. (line 22) -* columns: DBI.ResultSet-accessing. +* columns <1>: DBI.ResultSet-accessing. (line 12) -* compressingTo_ <1>: ZLib.DeflateStream class-instance creation. +* columns: DBI.Row-accessing. (line 22) +* compressingTo_ <1>: ZLib.RawDeflateStream class-instance creation. (line 6) -* compressingTo_ <2>: ZLib.RawDeflateStream class-instance creation. +* compressingTo_ <2>: ZLib.GZipDeflateStream class-instance creation. (line 6) -* compressingTo_: ZLib.GZipDeflateStream class-instance creation. +* compressingTo_: ZLib.DeflateStream class-instance creation. (line 6) -* compressingTo_level_ <1>: ZLib.RawDeflateStream class-instance creation. +* compressingTo_level_ <1>: ZLib.DeflateStream class-instance creation. (line 10) -* compressingTo_level_ <2>: ZLib.DeflateStream class-instance creation. +* compressingTo_level_ <2>: ZLib.RawDeflateStream class-instance creation. (line 10) * compressingTo_level_: ZLib.GZipDeflateStream class-instance creation. (line 10) -* condition_ifTrue_ifFalse_ <1>: I18N.RTEAlternativeNode-computing. +* condition_ifTrue_ifFalse_ <1>: I18N.RTEAlternativeNode class-compiling. (line 6) -* condition_ifTrue_ifFalse_: I18N.RTEAlternativeNode class-compiling. +* condition_ifTrue_ifFalse_: I18N.RTEAlternativeNode-computing. (line 6) * conjugate: Complex-math. (line 24) * connect_to_addrLen_ <1>: TCP.AbstractSocketImpl-C call-outs. @@ -3323,28 +3348,28 @@ (line 6) * connectTo_port_: TCP.SocketImpl-socket operations. (line 6) -* contents <1>: BLOX.BEdit-accessing. - (line 27) -* contents <2>: ZLib.ZlibWriteStream-streaming. - (line 11) -* contents <3>: BLOX.BDialog-accessing. +* contents <1>: BLOX.BDialog-accessing. (line 23) -* contents: BLOX.BText-accessing. +* contents <2>: BLOX.BEdit-accessing. (line 27) +* contents <3>: BLOX.BText-accessing. + (line 27) +* contents: ZLib.ZlibWriteStream-streaming. + (line 11) * contents_ <1>: BLOX.BText-accessing. (line 30) -* contents_ <2>: BLOX.BEdit-accessing. - (line 30) +* contents_ <2>: BLOX.BDialog-accessing. + (line 27) * contents_ <3>: BLOX.BDropDown-list box accessing. (line 47) -* contents_ <4>: BLOX.BDialog-accessing. - (line 27) +* contents_ <4>: BLOX.BEdit-accessing. + (line 30) * contents_: BLOX.BList-accessing. (line 59) -* contents_elements_ <1>: BLOX.BList-accessing. - (line 63) -* contents_elements_: BLOX.BDropDown-list box accessing. +* contents_elements_ <1>: BLOX.BDropDown-list box accessing. (line 51) +* contents_elements_: BLOX.BList-accessing. + (line 63) * continue: Debugger-stepping commands. (line 6) * copy: I18N.EncodedString-copying. @@ -3369,10 +3394,10 @@ (line 15) * cosh: Complex-transcendental functions. (line 18) -* create <1>: BLOX.BExtended-customization. - (line 6) -* create <2>: BLOX.BWidget-customization. +* create <1>: BLOX.BWidget-customization. (line 13) +* create <2>: BLOX.BExtended-customization. + (line 6) * create: BLOX.BCanvasObject-widget protocol. (line 6) * create_type_protocol_ <1>: TCP.AbstractSocketImpl class-C call-outs. @@ -3395,9 +3420,9 @@ (line 10) * createList: BLOX.BDropDown-flexibility. (line 6) -* createLocalAddress <1>: TCP.IPAddress class-initialization. +* createLocalAddress <1>: TCP.SocketAddress class-initialization. (line 6) -* createLocalAddress: TCP.SocketAddress class-initialization. +* createLocalAddress: TCP.IPAddress class-initialization. (line 6) * createLoopbackHost <1>: TCP.IPAddress class-initialization. (line 10) @@ -3405,16 +3430,16 @@ (line 10) * createTextWidget: BLOX.BDropDown-flexibility. (line 11) -* createUnknownAddress <1>: TCP.IPAddress class-initialization. - (line 14) -* createUnknownAddress: TCP.SocketAddress class-initialization. +* createUnknownAddress <1>: TCP.SocketAddress class-initialization. (line 16) +* createUnknownAddress: TCP.IPAddress class-initialization. + (line 14) * currentColumn: BLOX.BText-position & lines. (line 9) -* currentLine <1>: Debugger-inferior process properties. - (line 6) -* currentLine: BLOX.BText-position & lines. +* currentLine <1>: BLOX.BText-position & lines. (line 13) +* currentLine: Debugger-inferior process properties. + (line 6) * currentLineIn_: Debugger class-source code. (line 6) * currentPosition: BLOX.BText-position & lines. @@ -3437,34 +3462,34 @@ (line 18) * darkGreen: BLOX.BTextAttributes class-instance-creation shortcuts. (line 26) -* darkMagenta <1>: BLOX.BTextAttributes-colors. - (line 21) -* darkMagenta: BLOX.BTextAttributes class-instance-creation shortcuts. +* darkMagenta <1>: BLOX.BTextAttributes class-instance-creation shortcuts. (line 29) +* darkMagenta: BLOX.BTextAttributes-colors. + (line 21) * data <1>: TCP.Datagram-accessing. (line 12) * data: BLOX.BEmbeddedImage-accessing. (line 11) -* data_ <1>: BLOX.BImage-image management. - (line 9) -* data_ <2>: BLOX.BEmbeddedImage-accessing. - (line 16) -* data_ <3>: TCP.Datagram-accessing. +* data_ <1>: TCP.Datagram-accessing. (line 15) -* data_: TCP.Datagram class-instance creation. +* data_ <2>: TCP.Datagram class-instance creation. (line 6) +* data_ <3>: BLOX.BEmbeddedImage-accessing. + (line 16) +* data_: BLOX.BImage-image management. + (line 9) * data_address_port_: TCP.Datagram class-instance creation. (line 9) * debuggerClass: Debugger class-disabling debugging. (line 6) -* deepCopy <1>: BLOX.Blox-basic. (line 6) -* deepCopy: BLOX.BCanvasObject-accessing. +* deepCopy <1>: BLOX.BCanvasObject-accessing. (line 42) +* deepCopy: BLOX.Blox-basic. (line 6) * default <1>: I18N.Locale class-instance creation. (line 6) -* default <2>: I18N.LocaleConventions class-accessing. +* default <2>: I18N.LocaleData class-accessing. (line 9) -* default: I18N.LocaleData class-accessing. +* default: I18N.LocaleConventions class-accessing. (line 9) * defaultAddressClass: TCP.AbstractSocket class-defaults. (line 6) @@ -3494,10 +3519,10 @@ (line 25) * defaultImplementationClass <1>: TCP.AbstractSocket class-defaults. (line 16) -* defaultImplementationClass <2>: TCP.DatagramSocket class-accessing. - (line 12) -* defaultImplementationClass: TCP.Socket class-accessing. +* defaultImplementationClass <2>: TCP.Socket class-accessing. (line 6) +* defaultImplementationClass: TCP.DatagramSocket class-accessing. + (line 12) * defaultPortAt_: TCP.Socket class-well known ports. (line 6) * defaultPortAt_ifAbsent_: TCP.Socket class-well known ports. @@ -3520,26 +3545,26 @@ (line 32) * defaultWidth_: BLOX.BForm-accessing. (line 39) -* description <1>: I18N.InvalidSequenceError-accessing. +* description <1>: I18N.IncompleteSequenceError-accessing. (line 6) -* description <2>: I18N.IncompleteSequenceError-accessing. +* description <2>: I18N.InvalidCharsetError-accessing. (line 6) -* description: I18N.InvalidCharsetError-accessing. +* description: I18N.InvalidSequenceError-accessing. (line 6) -* destroy <1>: BLOX.Blox-widget protocol. - (line 16) -* destroy: BLOX.BMenu-callback registration. +* destroy <1>: BLOX.BMenu-callback registration. (line 23) -* destroyed <1>: BLOX.BCanvas-widget protocol. - (line 18) -* destroyed <2>: BLOX.BRadioGroup-widget protocol. +* destroy: BLOX.Blox-widget protocol. + (line 16) +* destroyed <1>: BLOX.BImage-widget protocol. + (line 6) +* destroyed <2>: BLOX.BEdit-widget protocol. (line 6) -* destroyed <3>: BLOX.BImage-widget protocol. +* destroyed <3>: BLOX.BRadioGroup-widget protocol. (line 6) * destroyed <4>: BLOX.BDialog-widget protocol. (line 12) -* destroyed: BLOX.BEdit-widget protocol. - (line 6) +* destroyed: BLOX.BCanvas-widget protocol. + (line 18) * directory: BLOX.BImage class-small icons. (line 6) * dispatchEvents: BLOX.Blox class-event dispatching. @@ -3558,14 +3583,14 @@ (line 39) * dither: BLOX.BImage-image management. (line 13) -* do_ <1>: I18N.EncodedString-accessing. - (line 18) -* do_ <2>: BLOX.BDropDown-list box accessing. - (line 56) -* do_ <3>: DBI.Connection-querying. +* do_ <1>: DBI.Connection-querying. (line 6) -* do_ <4>: BLOX.BList-accessing. +* do_ <2>: BLOX.BList-accessing. (line 68) +* do_ <3>: I18N.EncodedString-accessing. + (line 18) +* do_ <4>: BLOX.BDropDown-list box accessing. + (line 56) * do_: BLOX.BCanvas-widget protocol. (line 22) * domain_: I18N.LcMessages-opening MO files. @@ -3602,10 +3627,10 @@ (line 6) * emacsLike_: BLOX.BText class-accessing. (line 9) -* empty <1>: BLOX.BCanvas-widget protocol. - (line 25) -* empty: BLOX.BMenu-callback registration. +* empty <1>: BLOX.BMenu-callback registration. (line 27) +* empty: BLOX.BCanvas-widget protocol. + (line 25) * enabled: BLOX.Blox-widget protocol. (line 26) * enabled_: BLOX.Blox-widget protocol. @@ -3614,32 +3639,34 @@ (line 21) * encoding: I18N.EncodedStringFactory-instance creation. (line 6) -* encoding_ <1>: I18N.EncodedStream class-instance creation. +* encoding_ <1>: I18N.EncodedStringFactory-instance creation. + (line 9) +* encoding_ <2>: I18N.EncodedStream class-instance creation. (line 6) -* encoding_ <2>: I18N.EncodedString-initializing. +* encoding_ <3>: I18N.EncodedString-initializing. (line 6) -* encoding_ <3>: I18N.EncodedStringFactory class-instance creation. +* encoding_: I18N.EncodedStringFactory class-instance creation. (line 6) -* encoding_: I18N.EncodedStringFactory-instance creation. - (line 9) * encoding_as_: I18N.EncodedStream class-instance creation. (line 11) * endAngle: BLOX.BArc-accessing. (line 6) * endAngle_: BLOX.BArc-accessing. (line 10) -* ensureReadable <1>: TCP.AbstractSocketImpl-asynchronous operations. - (line 6) -* ensureReadable: TCP.OOBSocketImpl-implementation. +* ensureReadable <1>: TCP.OOBSocketImpl-implementation. (line 9) +* ensureReadable: TCP.AbstractSocketImpl-asynchronous operations. + (line 6) +* ensureWriteable <1>: TCP.Socket-stream protocol. + (line 23) * ensureWriteable: TCP.AbstractSocketImpl-asynchronous operations. (line 10) * evalIn_tcl_: BLOX.Blox class-C call-outs. (line 6) * events: BLOX.BTextAttributes-setting attributes. (line 23) -* events_ <1>: BLOX.BTextAttributes class-instance-creation shortcuts. - (line 32) -* events_: BLOX.BTextAttributes-setting attributes. +* events_ <1>: BLOX.BTextAttributes-setting attributes. (line 27) +* events_: BLOX.BTextAttributes class-instance-creation shortcuts. + (line 32) * exclaim: BLOX.BImage class-icons. (line 6) * execute: DBI.Statement-querying. @@ -3660,10 +3687,10 @@ (line 27) * extent: BLOX.BWidget-geometry management. (line 101) -* extent_ <1>: BLOX.BBoundingBox-accessing. - (line 30) -* extent_: BLOX.BWidget-geometry management. +* extent_ <1>: BLOX.BWidget-geometry management. (line 104) +* extent_: BLOX.BBoundingBox-accessing. + (line 30) * extraSpace: BLOX.BCanvas-widget protocol. (line 28) * extraSpace_: BLOX.BCanvas-widget protocol. @@ -3692,10 +3719,10 @@ (line 43) * fileOp_with_with_with_ifFail_: TCP.AbstractSocketImpl-socket operations. (line 47) -* fill <1>: TCP.ReadBuffer-buffer handling. +* fill <1>: TCP.Socket-stream protocol. + (line 27) +* fill: TCP.ReadBuffer-buffer handling. (line 12) -* fill: TCP.Socket-stream protocol. - (line 19) * fillBlock_: TCP.ReadBuffer-buffer handling. (line 16) * fillChord: BLOX.BArc-accessing. (line 14) @@ -3710,131 +3737,131 @@ * fillRectangle_color_: BLOX.BImage-image management. (line 29) * fillSlice: BLOX.BArc-accessing. (line 18) -* finish <1>: ZLib.ZlibWriteStream-streaming. - (line 16) -* finish: Debugger-stepping commands. +* finish <1>: Debugger-stepping commands. (line 10) +* finish: ZLib.ZlibWriteStream-streaming. + (line 16) * finish_: Debugger-stepping commands. (line 13) * floor: Complex-converting. (line 27) -* flush <1>: I18N.LcMessagesMoFileVersion0-flushing the cache. - (line 6) -* flush <2>: ZLib.ZlibWriteStream-streaming. - (line 20) -* flush <3>: TCP.WriteBuffer-buffer handling. +* flush <1>: I18N.LcMessagesDomain-handling the cache. (line 6) -* flush <4>: I18N.Locale class-instance creation. +* flush <2>: TCP.AbstractSocket-accessing. + (line 24) +* flush <3>: I18N.Locale class-instance creation. (line 10) -* flush <5>: TCP.Socket-stream protocol. - (line 22) +* flush <4>: TCP.WriteBuffer-buffer handling. + (line 6) +* flush <5>: TCP.SocketAddress class-initialization. + (line 20) * flush <6>: I18N.LocaleData class-accessing. (line 13) -* flush <7>: TCP.SocketAddress class-initialization. - (line 20) -* flush <8>: I18N.LcMessagesDomain-handling the cache. +* flush <7>: I18N.LcMessagesMoFileVersion0-flushing the cache. (line 6) -* flush: TCP.AbstractSocket-accessing. - (line 17) +* flush <8>: ZLib.ZlibWriteStream-streaming. + (line 20) +* flush: TCP.Socket-stream protocol. + (line 30) * flushBlock_: TCP.WriteBuffer-buffer handling. (line 9) * flushBuffer: ZLib.ZlibWriteStream-streaming. (line 24) * flushDictionary: ZLib.ZlibWriteStream-streaming. (line 27) -* font <1>: BLOX.BText-accessing. +* font <1>: BLOX.BLabel-accessing. + (line 38) +* font <2>: BLOX.BDropDown-accessing. + (line 32) +* font <3>: BLOX.BEmbeddedText-accessing. + (line 6) +* font <4>: BLOX.BButton-accessing. + (line 27) +* font <5>: BLOX.BText-accessing. (line 33) -* font <2>: BLOX.BTextAttributes-setting attributes. +* font <6>: BLOX.BTextAttributes-setting attributes. (line 31) -* font <3>: BLOX.BEdit-accessing. +* font <7>: BLOX.BEdit-accessing. (line 33) -* font <4>: BLOX.BButton-accessing. - (line 27) -* font <5>: BLOX.BList-accessing. +* font: BLOX.BList-accessing. (line 79) -* font <6>: BLOX.BDropDown-accessing. - (line 32) -* font <7>: BLOX.BLabel-accessing. - (line 38) -* font: BLOX.BEmbeddedText-accessing. - (line 6) -* font_ <1>: BLOX.BEmbeddedText-accessing. - (line 29) -* font_ <2>: BLOX.BDropDownEdit-accessing. - (line 12) -* font_ <3>: BLOX.BDropDownList-accessing. - (line 14) -* font_ <4>: BLOX.BDropDown-accessing. - (line 58) -* font_ <5>: BLOX.BTextAttributes-setting attributes. +* font_ <1>: BLOX.BTextAttributes-setting attributes. (line 52) -* font_ <6>: BLOX.BText-accessing. +* font_ <2>: BLOX.BText-accessing. (line 56) -* font_ <7>: BLOX.BList-accessing. - (line 102) -* font_ <8>: BLOX.BTextAttributes class-instance-creation shortcuts. +* font_ <3>: BLOX.BEdit-accessing. + (line 56) +* font_ <4>: BLOX.BButton-accessing. + (line 50) +* font_ <5>: BLOX.BTextAttributes class-instance-creation shortcuts. (line 36) -* font_ <9>: BLOX.BLabel-accessing. +* font_ <6>: BLOX.BDropDownList-accessing. + (line 14) +* font_ <7>: BLOX.BDropDownEdit-accessing. + (line 12) +* font_ <8>: BLOX.BLabel-accessing. (line 61) -* font_ <10>: BLOX.BButton-accessing. - (line 50) -* font_: BLOX.BEdit-accessing. - (line 56) +* font_ <9>: BLOX.BList-accessing. + (line 102) +* font_ <10>: BLOX.BEmbeddedText-accessing. + (line 29) +* font_: BLOX.BDropDown-accessing. + (line 58) * fontHeight_: BLOX.Blox-widget protocol. (line 40) * fonts: BLOX.Blox class-utility. (line 56) * fontWidth_: BLOX.Blox-widget protocol. (line 45) -* foregroundColor <1>: BLOX.BImage-accessing. - (line 46) -* foregroundColor <2>: BLOX.BList-accessing. +* foregroundColor <1>: BLOX.BList-accessing. (line 125) -* foregroundColor <3>: BLOX.BDropDown-accessing. +* foregroundColor <2>: BLOX.BLabel-accessing. (line 84) -* foregroundColor <4>: BLOX.BEdit-accessing. +* foregroundColor <3>: BLOX.BTextAttributes-setting attributes. + (line 73) +* foregroundColor <4>: BLOX.BMenuObject-accessing. + (line 53) +* foregroundColor <5>: BLOX.BEdit-accessing. (line 79) -* foregroundColor <5>: BLOX.BCanvas-accessing. +* foregroundColor <6>: BLOX.BImage-accessing. + (line 46) +* foregroundColor <7>: BLOX.BButton-accessing. + (line 73) +* foregroundColor <8>: BLOX.BCanvas-accessing. (line 18) -* foregroundColor <6>: BLOX.BLabel-accessing. +* foregroundColor <9>: BLOX.BProgress-accessing. + (line 22) +* foregroundColor <10>: BLOX.BText-accessing. + (line 79) +* foregroundColor: BLOX.BDropDown-accessing. (line 84) -* foregroundColor <7>: BLOX.BText-accessing. +* foregroundColor_ <1>: BLOX.BCanvas-accessing. + (line 24) +* foregroundColor_ <2>: BLOX.BLabel-accessing. + (line 90) +* foregroundColor_ <3>: BLOX.BTextAttributes-setting attributes. + (line 80) +* foregroundColor_ <4>: BLOX.BList-accessing. + (line 131) +* foregroundColor_ <5>: BLOX.BTextAttributes class-instance-creation shortcuts. + (line 57) +* foregroundColor_ <6>: BLOX.BImage-accessing. + (line 52) +* foregroundColor_ <7>: BLOX.BButton-accessing. (line 79) -* foregroundColor <8>: BLOX.BButton-accessing. - (line 73) -* foregroundColor <9>: BLOX.BMenuObject-accessing. - (line 53) -* foregroundColor <10>: BLOX.BProgress-accessing. - (line 22) -* foregroundColor: BLOX.BTextAttributes-setting attributes. - (line 73) -* foregroundColor_ <1>: BLOX.BText-accessing. +* foregroundColor_ <8>: BLOX.BEdit-accessing. (line 85) -* foregroundColor_ <2>: BLOX.BDropDownList-accessing. +* foregroundColor_ <9>: BLOX.BText-accessing. + (line 85) +* foregroundColor_ <10>: BLOX.BDropDownList-accessing. (line 37) -* foregroundColor_ <3>: BLOX.BLabel-accessing. - (line 90) -* foregroundColor_ <4>: BLOX.BDropDown-accessing. - (line 93) -* foregroundColor_ <5>: BLOX.BDropDownEdit-accessing. - (line 35) -* foregroundColor_ <6>: BLOX.BCanvas-accessing. - (line 24) -* foregroundColor_ <7>: BLOX.BMenuObject-accessing. +* foregroundColor_ <11>: BLOX.BMenuObject-accessing. (line 59) -* foregroundColor_ <8>: BLOX.BProgress-accessing. +* foregroundColor_ <12>: BLOX.BDropDownEdit-accessing. + (line 35) +* foregroundColor_ <13>: BLOX.BProgress-accessing. (line 27) -* foregroundColor_ <9>: BLOX.BEdit-accessing. - (line 85) -* foregroundColor_ <10>: BLOX.BTextAttributes-setting attributes. - (line 80) -* foregroundColor_ <11>: BLOX.BImage-accessing. - (line 52) -* foregroundColor_ <12>: BLOX.BButton-accessing. - (line 79) -* foregroundColor_ <13>: BLOX.BList-accessing. - (line 131) -* foregroundColor_: BLOX.BTextAttributes class-instance-creation shortcuts. - (line 57) +* foregroundColor_: BLOX.BDropDown-accessing. + (line 93) * from: BLOX.BArc-accessing. (line 23) * from_: BLOX.BArc-accessing. (line 26) * from_to_: BLOX.BArc-accessing. (line 29) @@ -3848,18 +3875,18 @@ (line 16) * fromSockAddr_port_: TCP.SocketAddress class-abstract. (line 6) -* fromString_ <1>: I18N.Locale class-instance creation. +* fromString_ <1>: I18N.LocaleData class-accessing. + (line 16) +* fromString_ <2>: I18N.LocaleConventions class-accessing. + (line 13) +* fromString_ <3>: I18N.Locale class-instance creation. (line 14) -* fromString_ <2>: TCP.IPAddress class-instance creation. +* fromString_ <4>: I18N.EncodedString class-instance creation. + (line 6) +* fromString_ <5>: TCP.IPAddress class-instance creation. (line 21) -* fromString_ <3>: I18N.LocaleConventions class-accessing. - (line 13) -* fromString_ <4>: I18N.LocaleData class-accessing. - (line 16) -* fromString_ <5>: I18N.EncodedStringFactory-instance creation. +* fromString_: I18N.EncodedStringFactory-instance creation. (line 12) -* fromString_: I18N.EncodedString class-instance creation. - (line 6) * fromString_encoding_: I18N.EncodedString class-instance creation. (line 9) * gamma: BLOX.BImage-accessing. @@ -3872,9 +3899,9 @@ (line 18) * getPeerName: TCP.SocketImpl-socket operations. (line 10) -* getPeerName_addr_addrLen_ <1>: TCP.AbstractSocketImpl-C call-outs. +* getPeerName_addr_addrLen_ <1>: TCP.AbstractSocketImpl class-C call-outs. (line 18) -* getPeerName_addr_addrLen_: TCP.AbstractSocketImpl class-C call-outs. +* getPeerName_addr_addrLen_: TCP.AbstractSocketImpl-C call-outs. (line 18) * getSelection: BLOX.BText-accessing. (line 91) @@ -3892,15 +3919,15 @@ (line 29) * grayOut: BLOX.BCanvasObject-accessing. (line 46) -* green <1>: BLOX.BTextAttributes class-instance-creation shortcuts. - (line 61) -* green: BLOX.BTextAttributes-colors. +* green <1>: BLOX.BTextAttributes-colors. (line 24) -* hash <1>: Complex-comparing. (line 21) -* hash <2>: I18N.EncodedString-accessing. - (line 24) -* hash: TCP.SocketAddress-accessing. +* green: BLOX.BTextAttributes class-instance-creation shortcuts. + (line 61) +* hash <1>: TCP.SocketAddress-accessing. (line 17) +* hash <2>: Complex-comparing. (line 21) +* hash: I18N.EncodedString-accessing. + (line 24) * hasSelection: BLOX.BEdit-widget protocol. (line 10) * height <1>: BLOX.BWindow-widget protocol. @@ -3915,48 +3942,48 @@ (line 19) * heightAbsolute: BLOX.BWidget-geometry management. (line 127) -* heightChild_ <1>: BLOX.BPopupWindow-geometry management. +* heightChild_ <1>: BLOX.BText-geometry management. + (line 34) +* heightChild_ <2>: BLOX.BWidget-geometry management. + (line 131) +* heightChild_ <3>: BLOX.BPopupWindow-geometry management. (line 42) -* heightChild_ <2>: BLOX.BCanvas-geometry management. +* heightChild_: BLOX.BCanvas-geometry management. (line 39) -* heightChild_ <3>: BLOX.BWidget-geometry management. - (line 131) -* heightChild_: BLOX.BText-geometry management. - (line 34) * heightOffset: BLOX.BWidget-geometry management. (line 141) -* heightOffset_ <1>: BLOX.BWindow-widget protocol. - (line 23) -* heightOffset_: BLOX.BWidget-geometry management. +* heightOffset_ <1>: BLOX.BWidget-geometry management. (line 146) +* heightOffset_: BLOX.BWindow-widget protocol. + (line 23) * heightPixels_: BLOX.BWidget-geometry management. (line 154) * highlight_: BLOX.BList-widget protocol. (line 18) -* highlightBackground <1>: BLOX.BDropDown-accessing. - (line 102) -* highlightBackground: BLOX.BList-accessing. +* highlightBackground <1>: BLOX.BList-accessing. (line 137) -* highlightBackground_ <1>: BLOX.BDropDownEdit-accessing. - (line 41) -* highlightBackground_ <2>: BLOX.BDropDown-accessing. - (line 108) -* highlightBackground_ <3>: BLOX.BDropDownList-accessing. +* highlightBackground: BLOX.BDropDown-accessing. + (line 102) +* highlightBackground_ <1>: BLOX.BDropDownList-accessing. (line 45) -* highlightBackground_: BLOX.BList-accessing. +* highlightBackground_ <2>: BLOX.BList-accessing. (line 143) -* highlightForeground <1>: BLOX.BDropDown-accessing. - (line 114) -* highlightForeground: BLOX.BList-accessing. +* highlightBackground_ <3>: BLOX.BDropDown-accessing. + (line 108) +* highlightBackground_: BLOX.BDropDownEdit-accessing. + (line 41) +* highlightForeground <1>: BLOX.BList-accessing. (line 149) -* highlightForeground_ <1>: BLOX.BList-accessing. +* highlightForeground: BLOX.BDropDown-accessing. + (line 114) +* highlightForeground_ <1>: BLOX.BDropDown-accessing. + (line 120) +* highlightForeground_ <2>: BLOX.BList-accessing. (line 155) -* highlightForeground_ <2>: BLOX.BDropDownList-accessing. - (line 52) * highlightForeground_ <3>: BLOX.BDropDownEdit-accessing. (line 47) -* highlightForeground_: BLOX.BDropDown-accessing. - (line 120) +* highlightForeground_: BLOX.BDropDownList-accessing. + (line 52) * horizontal: BLOX.BViewport-scrollbars. (line 6) * horizontal_: BLOX.BViewport-scrollbars. @@ -3967,10 +3994,10 @@ (line 18) * host: TCP.IPAddress-accessing. (line 14) -* i <1>: Complex class-instance creation. - (line 6) -* i: Complex-creation/coercion. +* i <1>: Complex-creation/coercion. (line 12) +* i: Complex class-instance creation. + (line 6) * iconify: BLOX.BWindow-widget protocol. (line 26) * id: I18N.LocaleData-accessing. @@ -3997,44 +4024,44 @@ (line 6) * index_: BLOX.BDropDown-list box accessing. (line 63) -* indexAt_ <1>: BLOX.BList-accessing. - (line 168) -* indexAt_: BLOX.BText-position & lines. +* indexAt_ <1>: BLOX.BText-position & lines. (line 35) +* indexAt_: BLOX.BList-accessing. + (line 168) * info: BLOX.BImage class-icons. (line 9) * initialize <1>: TCP.IPAddress class-initialization. (line 18) -* initialize <2>: TCP.Socket class-well known ports. +* initialize <2>: TCP.DatagramSocket class-initialization. + (line 6) +* initialize <3>: TCP.Socket class-well known ports. (line 17) -* initialize <3>: Complex class-instance creation. - (line 9) -* initialize <4>: TCP.DatagramSocket class-initialization. +* initialize <4>: BLOX.BLabel class-initialization. (line 6) -* initialize <5>: BLOX.BLabel class-initialization. +* initialize <5>: I18N.LocaleData class-database. + (line 16) +* initialize <6>: Complex class-instance creation. + (line 9) +* initialize <7>: I18N.EncodedStream class-initializing. (line 6) -* initialize <6>: I18N.EncodedStream class-initializing. +* initialize <8>: I18N.LcMessagesMoFileVersion0 class-plurals. (line 6) -* initialize <7>: I18N.RunTimeExpression class-initializing. +* initialize: I18N.RunTimeExpression class-initializing. (line 6) -* initialize <8>: I18N.LocaleData class-database. - (line 16) -* initialize: I18N.LcMessagesMoFileVersion0 class-plurals. +* initialize_ <1>: BLOX.BWidget-customization. + (line 20) +* initialize_ <2>: BLOX.BEventSet-initializing. (line 6) -* initialize_ <1>: BLOX.BEventSet-initializing. +* initialize_ <3>: BLOX.BBalloon-initializing. (line 6) -* initialize_ <2>: BLOX.BWidget-customization. - (line 20) -* initialize_ <3>: I18N.LocaleData-initialization. +* initialize_: I18N.LocaleData-initialization. (line 9) -* initialize_: BLOX.BBalloon-initializing. - (line 6) * insertAtEnd_ <1>: BLOX.BText-inserting text. (line 6) -* insertAtEnd_ <2>: BLOX.BEdit-widget protocol. - (line 13) -* insertAtEnd_: BLOX.BDropDownEdit-text accessing. +* insertAtEnd_ <2>: BLOX.BDropDownEdit-text accessing. (line 6) +* insertAtEnd_: BLOX.BEdit-widget protocol. + (line 13) * insertAtEnd_attribute_: BLOX.BText-attributes. (line 6) * insertImage_: BLOX.BText-images. (line 6) @@ -4042,10 +4069,10 @@ * insertImageAtEnd_: BLOX.BText-images. (line 22) * insertSelectedText_: BLOX.BText-inserting text. (line 9) -* insertText_ <1>: BLOX.BText-inserting text. - (line 14) -* insertText_: BLOX.BEdit-widget protocol. +* insertText_ <1>: BLOX.BEdit-widget protocol. (line 16) +* insertText_: BLOX.BText-inserting text. + (line 14) * insertText_at_: BLOX.BText-inserting text. (line 18) * insertText_attribute_: BLOX.BText-attributes. @@ -4058,43 +4085,43 @@ (line 6) * interface_: TCP.MulticastSocket-instance creation. (line 10) -* invokeCallback <1>: BLOX.BText-inserting text. - (line 28) -* invokeCallback <2>: BLOX.BList-widget protocol. - (line 21) +* invokeCallback <1>: BLOX.BMenuObject-callback. + (line 22) +* invokeCallback <2>: BLOX.BDropDown-callbacks. + (line 15) * invokeCallback <3>: BLOX.BToggle-accessing. (line 14) -* invokeCallback <4>: BLOX.BEdit-widget protocol. - (line 20) +* invokeCallback <4>: BLOX.BButton-accessing. + (line 85) * invokeCallback <5>: BLOX.BButtonLike-accessing. (line 15) -* invokeCallback <6>: BLOX.BButton-accessing. - (line 85) -* invokeCallback <7>: BLOX.BWindow-accessing. +* invokeCallback <6>: BLOX.BCheckMenuItem-accessing. + (line 6) +* invokeCallback <7>: BLOX.BList-widget protocol. + (line 21) +* invokeCallback <8>: BLOX.BWindow-accessing. (line 20) -* invokeCallback <8>: BLOX.BMenuObject-callback. - (line 22) -* invokeCallback <9>: BLOX.BDropDown-callbacks. - (line 15) -* invokeCallback <10>: BLOX.BDropDownList-callbacks. +* invokeCallback <9>: BLOX.BDropDownList-callbacks. (line 14) -* invokeCallback: BLOX.BCheckMenuItem-accessing. - (line 6) +* invokeCallback <10>: BLOX.BEdit-widget protocol. + (line 20) +* invokeCallback: BLOX.BText-inserting text. + (line 28) * invokeCallback_: BLOX.BDialog-widget protocol. (line 16) * ipAddMembership: TCP.DatagramSocketImpl-C constants. (line 6) * ipDropMembership: TCP.DatagramSocketImpl-C constants. (line 9) -* ipMulticastIf <1>: TCP.UDPSocketImpl-multicasting. +* ipMulticastIf <1>: TCP.MulticastSocketImpl-multicasting. (line 6) -* ipMulticastIf <2>: TCP.MulticastSocketImpl-multicasting. +* ipMulticastIf <2>: TCP.UDPSocketImpl-multicasting. (line 6) * ipMulticastIf: TCP.DatagramSocketImpl-C constants. (line 12) -* ipMulticastIf_ <1>: TCP.MulticastSocketImpl-multicasting. +* ipMulticastIf_ <1>: TCP.UDPSocketImpl-multicasting. (line 10) -* ipMulticastIf_: TCP.UDPSocketImpl-multicasting. +* ipMulticastIf_: TCP.MulticastSocketImpl-multicasting. (line 10) * ipMulticastTtl: TCP.DatagramSocketImpl-C constants. (line 15) @@ -4118,22 +4145,24 @@ (line 17) * isEmpty: TCP.ReadBuffer-buffer handling. (line 21) -* isExternalStream <1>: ZLib.ZlibStream-streaming. +* isExternalStream <1>: TCP.AbstractSocket-testing. (line 6) -* isExternalStream: TCP.AbstractSocket-testing. +* isExternalStream: ZLib.ZlibStream-streaming. (line 6) -* isFull: TCP.ReadBuffer-buffer handling. +* isFull <1>: TCP.ReadBuffer-buffer handling. (line 24) +* isFull: TCP.WriteBuffer-testing. + (line 6) * isMapped: BLOX.BWindow-widget protocol. (line 31) * isMulticast: TCP.IPAddress-accessing. (line 19) * isOpen: TCP.AbstractSocket-accessing. - (line 20) -* isPeerAlive <1>: TCP.AbstractSocket-accessing. - (line 24) -* isPeerAlive: TCP.Socket-stream protocol. - (line 25) + (line 27) +* isPeerAlive <1>: TCP.Socket-stream protocol. + (line 33) +* isPeerAlive: TCP.AbstractSocket-accessing. + (line 31) * isPositionable: ZLib.RawInflateStream-positioning. (line 14) * isPosixLocale: I18N.LocaleData-accessing. @@ -4146,25 +4175,25 @@ (line 91) * isUnderlined: BLOX.BTextAttributes-setting attributes. (line 95) -* isUnicode <1>: I18N.EncodedString class-accessing. +* isUnicode <1>: I18N.EncodedStringFactory-accessing. (line 6) -* isUnicode: I18N.EncodedStringFactory-accessing. +* isUnicode: I18N.EncodedString class-accessing. (line 6) -* isWindow <1>: BLOX.BWindow-widget protocol. - (line 34) -* isWindow: BLOX.Blox-widget protocol. +* isWindow <1>: BLOX.Blox-widget protocol. (line 50) +* isWindow: BLOX.BWindow-widget protocol. + (line 34) * itemHeight: BLOX.BDropDown-flexibility. (line 15) * items: BLOX.BCanvas-widget protocol. (line 36) * join: BLOX.BPolyline-accessing. (line 30) -* join_ <1>: BLOX.BPolyline-accessing. - (line 37) -* join_ <2>: TCP.MulticastSocketImpl-multicasting. +* join_ <1>: TCP.MulticastSocket-instance creation. (line 14) -* join_ <3>: TCP.MulticastSocket-instance creation. +* join_ <2>: BLOX.BPolyline-accessing. + (line 37) +* join_ <3>: TCP.MulticastSocketImpl-multicasting. (line 14) * join_: TCP.UDPSocketImpl-multicasting. (line 14) @@ -4173,34 +4202,34 @@ * justify_: BLOX.BEmbeddedText-accessing. (line 55) * keysAndValuesDo_: DBI.Row-accessing. (line 26) -* label <1>: BLOX.BMenuItem-accessing. - (line 6) -* label <2>: BLOX.BLabel-accessing. - (line 96) -* label <3>: BLOX.BList-accessing. - (line 178) -* label <4>: BLOX.BButton-accessing. +* label <1>: BLOX.BButton-accessing. (line 88) -* label <5>: BLOX.BMenu-accessing. +* label <2>: BLOX.BList-accessing. + (line 178) +* label <3>: BLOX.BMenu-accessing. (line 6) -* label: BLOX.BWindow-accessing. +* label <4>: BLOX.BLabel-accessing. + (line 96) +* label <5>: BLOX.BWindow-accessing. (line 24) -* label_ <1>: BLOX.BLabel-accessing. - (line 104) -* label_ <2>: BLOX.BWindow-accessing. - (line 32) -* label_ <3>: BLOX.BList-accessing. +* label: BLOX.BMenuItem-accessing. + (line 6) +* label_ <1>: BLOX.BButton-accessing. + (line 96) +* label_ <2>: BLOX.BList-accessing. (line 181) +* label_ <3>: BLOX.BLabel-accessing. + (line 104) * label_ <4>: BLOX.BMenuItem-accessing. (line 14) -* label_ <5>: BLOX.BButton-accessing. - (line 96) +* label_ <5>: BLOX.BWindow-accessing. + (line 32) * label_: BLOX.BMenu-accessing. (line 14) -* labelAt_ <1>: BLOX.BDropDown-list box accessing. - (line 67) -* labelAt_: BLOX.BList-accessing. +* labelAt_ <1>: BLOX.BList-accessing. (line 184) +* labelAt_: BLOX.BDropDown-list box accessing. + (line 67) * labels: BLOX.BList-accessing. (line 187) * labelsDo_ <1>: BLOX.BDropDown-list box accessing. @@ -4215,21 +4244,21 @@ (line 23) * language_territory_charset_: I18N.LocaleData class-accessing. (line 26) -* languageDirectory <1>: I18N.LcMessages-accessing. - (line 6) -* languageDirectory: I18N.LocaleData-accessing. +* languageDirectory <1>: I18N.LocaleData-accessing. (line 19) -* languageDirectory_ <1>: I18N.LocaleData-accessing. - (line 23) -* languageDirectory_: I18N.LcMessages-accessing. +* languageDirectory: I18N.LcMessages-accessing. + (line 6) +* languageDirectory_ <1>: I18N.LcMessages-accessing. (line 9) +* languageDirectory_: I18N.LocaleData-accessing. + (line 23) * languages: I18N.LocaleData class-database. (line 19) -* leave_ <1>: TCP.UDPSocketImpl-multicasting. +* leave_ <1>: TCP.MulticastSocket-instance creation. (line 17) * leave_ <2>: TCP.MulticastSocketImpl-multicasting. (line 17) -* leave_: TCP.MulticastSocket-instance creation. +* leave_: TCP.UDPSocketImpl-multicasting. (line 17) * left_top_right_bottom_: BLOX.BWidget-geometry management. (line 163) @@ -4237,9 +4266,9 @@ (line 9) * lhs: I18N.RTEBinaryNode-compiling. (line 6) -* lhs_op_rhs_ <1>: I18N.RTEBinaryNode-computing. +* lhs_op_rhs_ <1>: I18N.RTEBinaryNode class-compiling. (line 6) -* lhs_op_rhs_: I18N.RTEBinaryNode class-compiling. +* lhs_op_rhs_: I18N.RTEBinaryNode-computing. (line 6) * lineAt_: BLOX.BText-position & lines. (line 40) @@ -4257,9 +4286,9 @@ (line 20) * listen_: TCP.AbstractSocketImpl-socket operations. (line 55) -* listen_log_ <1>: TCP.AbstractSocketImpl-C call-outs. +* listen_log_ <1>: TCP.AbstractSocketImpl class-C call-outs. (line 24) -* listen_log_: TCP.AbstractSocketImpl class-C call-outs. +* listen_log_: TCP.AbstractSocketImpl-C call-outs. (line 24) * listSelectAt_: BLOX.BDropDown-flexibility. (line 24) @@ -4272,15 +4301,15 @@ * local_port_: TCP.DatagramSocket class-instance creation. (line 6) * localAddress <1>: TCP.AbstractSocket-accessing. - (line 28) + (line 35) * localAddress: TCP.AbstractSocketImpl-accessing. (line 10) * localHostName: TCP.SocketAddress class-accessing. (line 46) -* localPort <1>: TCP.AbstractSocket-accessing. - (line 31) -* localPort: TCP.AbstractSocketImpl-accessing. +* localPort <1>: TCP.AbstractSocketImpl-accessing. (line 15) +* localPort: TCP.AbstractSocket-accessing. + (line 38) * log: Complex-transcendental functions. (line 27) * lookupAllHostAddr_withHostEnt_: TCP.SocketAddress class-C call-outs. @@ -4305,10 +4334,10 @@ (line 15) * makeChild_on_: BLOX.Blox-creating children. (line 20) -* map <1>: BLOX.BTransientWindow-widget protocol. - (line 6) -* map: BLOX.BWindow-widget protocol. +* map <1>: BLOX.BWindow-widget protocol. (line 37) +* map: BLOX.BTransientWindow-widget protocol. + (line 6) * mapPoint_: BLOX.BCanvas-widget protocol. (line 39) * menu_: BLOX.BWindow-accessing. @@ -4345,58 +4374,58 @@ (line 20) * network: TCP.IPAddress-accessing. (line 23) -* new <1>: BLOX.BTextBindings class-instance creation. - (line 6) -* new <2>: TCP.DatagramSocket class-instance creation. - (line 10) -* new <3>: BLOX.BTransientWindow class-instance creation. +* new <1>: BLOX.BEventSet class-initializing. (line 6) -* new <4>: BLOX.BEventSet class-initializing. +* new <2>: BLOX.BCanvasObject class-instance creation. (line 6) -* new <5>: BLOX.Blox class-instance creation. +* new <3>: TCP.IPAddress class-instance creation. + (line 71) +* new <4>: BLOX.BTransientWindow class-instance creation. (line 6) -* new <6>: BLOX.BWidget class-popups. +* new <5>: ZLib.ZlibStream class-instance creation. (line 6) +* new <6>: I18N.EncodedString class-instance creation. + (line 12) * new <7>: TCP.AbstractSocket class-instance creation. (line 6) -* new <8>: BLOX.BCanvasObject class-instance creation. +* new <8>: BLOX.BWidget class-popups. (line 6) -* new <9>: I18N.EncodedStringFactory-instance creation. - (line 16) -* new <10>: TCP.AbstractSocketImpl class-socket creation. +* new <9>: TCP.AbstractSocketImpl class-socket creation. (line 6) -* new <11>: I18N.EncodedString class-instance creation. +* new <10>: Complex class-instance creation. (line 12) -* new <12>: Complex class-instance creation. - (line 12) -* new <13>: I18N.LocaleData class-accessing. - (line 30) -* new <14>: ZLib.ZlibStream class-instance creation. +* new <11>: BLOX.Blox class-instance creation. + (line 6) +* new <12>: TCP.DatagramSocket class-instance creation. + (line 10) +* new <13>: I18N.EncodedStringFactory-instance creation. + (line 16) +* new <14>: BLOX.BTextBindings class-instance creation. (line 6) * new <15>: BLOX.BWindow class-instance creation. (line 6) -* new: TCP.IPAddress class-instance creation. - (line 71) -* new_ <1>: BLOX.BTransientWindow class-instance creation. +* new: I18N.LocaleData class-accessing. + (line 30) +* new_ <1>: BLOX.BWindow class-instance creation. (line 9) -* new_ <2>: BLOX.Blox class-instance creation. +* new_ <2>: BLOX.BTransientWindow class-instance creation. (line 9) -* new_ <3>: I18N.EncodedString class-instance creation. - (line 15) -* new_ <4>: BLOX.BDialog class-instance creation. - (line 6) -* new_ <5>: BLOX.BCheckMenuItem class-instance creation. - (line 6) -* new_ <6>: BLOX.BWindow class-instance creation. +* new_ <3>: TCP.AbstractSocket class-instance creation. (line 9) -* new_ <7>: BLOX.BEventSet class-initializing. +* new_ <4>: BLOX.BEventSet class-initializing. (line 9) -* new_ <8>: I18N.EncodedStringFactory-instance creation. - (line 20) -* new_ <9>: BLOX.BCanvasObject class-instance creation. +* new_ <5>: BLOX.BCanvasObject class-instance creation. (line 9) -* new_ <10>: TCP.AbstractSocket class-instance creation. +* new_ <6>: I18N.EncodedStringFactory-instance creation. + (line 20) +* new_ <7>: I18N.EncodedString class-instance creation. + (line 15) +* new_ <8>: BLOX.BDialog class-instance creation. + (line 6) +* new_ <9>: BLOX.Blox class-instance creation. (line 9) +* new_ <10>: BLOX.BCheckMenuItem class-instance creation. + (line 6) * new_: BLOX.BMenuItem class-instance creation. (line 6) * new_contents_: BLOX.BEdit class-instance creation. @@ -4411,12 +4440,12 @@ (line 6) * new_label_ <2>: BLOX.BMenuItem class-instance creation. (line 9) -* new_label_ <3>: BLOX.BLabel class-instance creation. +* new_label_ <3>: BLOX.BMenu class-instance creation. (line 6) -* new_label_ <4>: BLOX.BMenu class-instance creation. - (line 6) -* new_label_: BLOX.BDialog class-instance creation. +* new_label_ <4>: BLOX.BDialog class-instance creation. (line 11) +* new_label_: BLOX.BLabel class-instance creation. + (line 6) * new_label_prompt_: BLOX.BDialog class-instance creation. (line 16) * new_size_: BLOX.BImage class-instance creation. @@ -4427,52 +4456,52 @@ (line 23) * newReadOnly_: BLOX.BText class-instance creation. (line 6) -* next <1>: TCP.AbstractSocket-stream protocol. - (line 9) +* next <1>: DBI.ResultSet-cursor access. + (line 13) * next <2>: I18N.Encoder-stream operations. (line 17) * next <3>: TCP.DatagramSocket-accessing. (line 15) -* next <4>: Debugger-stepping commands. - (line 16) +* next <4>: ZLib.ZlibReadStream-streaming. + (line 9) * next <5>: TCP.DatagramSocketImpl-socket operations. (line 6) -* next <6>: ZLib.ZlibReadStream-streaming. +* next <6>: TCP.AbstractSocket-stream protocol. (line 9) -* next <7>: TCP.Socket-stream protocol. - (line 29) -* next: DBI.ResultSet-cursor access. - (line 13) +* next <7>: Debugger-stepping commands. + (line 16) +* next: TCP.Socket-stream protocol. + (line 37) * next_: TCP.Socket-stream protocol. - (line 33) -* next_putAll_startingAt_ <1>: ZLib.ZlibWriteStream-streaming. + (line 41) +* next_putAll_startingAt_ <1>: TCP.Socket-stream protocol. + (line 45) +* next_putAll_startingAt_ <2>: ZLib.ZlibWriteStream-streaming. (line 31) -* next_putAll_startingAt_ <2>: TCP.Socket-stream protocol. - (line 37) * next_putAll_startingAt_: TCP.AbstractSocket-stream protocol. (line 13) * nextFrom_port_: TCP.DatagramSocket-direct operations. (line 6) -* nextHunk <1>: ZLib.ZlibReadStream-streaming. +* nextHunk <1>: TCP.Socket-stream protocol. + (line 50) +* nextHunk: ZLib.ZlibReadStream-streaming. (line 12) -* nextHunk: TCP.Socket-stream protocol. - (line 42) * nextInput: I18N.Encoder-stream operations. (line 21) -* nextPut_ <1>: TCP.Socket-stream protocol. - (line 46) -* nextPut_ <2>: TCP.AbstractSocket-stream protocol. - (line 17) -* nextPut_ <3>: BLOX.BEdit-widget protocol. - (line 23) -* nextPut_ <4>: BLOX.BText-inserting text. +* nextPut_ <1>: BLOX.BText-inserting text. (line 31) +* nextPut_ <2>: TCP.Socket-stream protocol. + (line 54) +* nextPut_ <3>: TCP.DatagramSocket-accessing. + (line 18) +* nextPut_ <4>: BLOX.BEdit-widget protocol. + (line 23) * nextPut_ <5>: TCP.DatagramSocketImpl-socket operations. (line 9) -* nextPut_ <6>: ZLib.ZlibWriteStream-streaming. +* nextPut_ <6>: TCP.AbstractSocket-stream protocol. + (line 17) +* nextPut_: ZLib.ZlibWriteStream-streaming. (line 35) -* nextPut_: TCP.DatagramSocket-accessing. - (line 18) * nextPut_timeToLive_: TCP.MulticastSocket-instance creation. (line 20) * nextPutAll_ <1>: BLOX.BText-inserting text. @@ -4487,40 +4516,40 @@ (line 27) * numberOfLines: BLOX.BText-position & lines. (line 43) -* numberOfStrings <1>: BLOX.BList-accessing. - (line 279) -* numberOfStrings: BLOX.BDropDown-list box accessing. +* numberOfStrings <1>: BLOX.BDropDown-list box accessing. (line 74) +* numberOfStrings: BLOX.BList-accessing. + (line 279) * numeric: I18N.Locale-subobjects. (line 18) * object_address_port_: TCP.Datagram class-instance creation. (line 13) * object_objectDumper_address_port_: TCP.Datagram class-instance creation. (line 21) -* on_ <1>: ZLib.ZlibStream class-instance creation. - (line 9) -* on_ <2>: ZLib.RawDeflateStream class-instance creation. - (line 14) -* on_ <3>: TCP.ReadBuffer class-instance creation. +* on_ <1>: TCP.ReadBuffer class-instance creation. (line 6) -* on_ <4>: ZLib.RawDeflateWriteStream class-instance creation. +* on_ <2>: ZLib.ZlibStream class-instance creation. + (line 9) +* on_ <3>: I18N.RunTimeExpression class-instance creation. (line 6) +* on_ <4>: ZLib.RawDeflateStream class-instance creation. + (line 14) * on_ <5>: Debugger class-instance creation. (line 6) * on_ <6>: DBI.Statement class-instance creation. (line 6) -* on_: I18N.RunTimeExpression class-instance creation. +* on_: ZLib.RawDeflateWriteStream class-instance creation. (line 6) * on_from_: I18N.EncodedStream class-instance creation. (line 16) -* on_from_to_ <1>: I18N.Encoder class-instance creation. - (line 6) -* on_from_to_: I18N.EncodedStream class-instance creation. +* on_from_to_ <1>: I18N.EncodedStream class-instance creation. (line 21) -* on_level_ <1>: ZLib.RawDeflateWriteStream class-instance creation. - (line 10) -* on_level_: ZLib.RawDeflateStream class-instance creation. +* on_from_to_: I18N.Encoder class-instance creation. + (line 6) +* on_level_ <1>: ZLib.RawDeflateStream class-instance creation. (line 18) +* on_level_: ZLib.RawDeflateWriteStream class-instance creation. + (line 10) * on_to_: I18N.EncodedStream class-instance creation. (line 26) * onAsciiKeyEventSend_to_: BLOX.BEventTarget-intercepting events. @@ -4567,9 +4596,9 @@ (line 127) * op: I18N.RTEBinaryNode-compiling. (line 9) -* option_level_at_get_size_ <1>: TCP.AbstractSocketImpl-C call-outs. +* option_level_at_get_size_ <1>: TCP.AbstractSocketImpl class-C call-outs. (line 27) -* option_level_at_get_size_: TCP.AbstractSocketImpl class-C call-outs. +* option_level_at_get_size_: TCP.AbstractSocketImpl-C call-outs. (line 27) * option_level_at_put_size_ <1>: TCP.AbstractSocketImpl class-C call-outs. (line 30) @@ -4587,10 +4616,10 @@ (line 51) * origin_extent_: BLOX.BBoundingBox-accessing. (line 59) -* outlineColor <1>: BLOX.BPolyline-accessing. - (line 44) -* outlineColor: BLOX.BRectangle-accessing. +* outlineColor <1>: BLOX.BRectangle-accessing. (line 6) +* outlineColor: BLOX.BPolyline-accessing. + (line 44) * outlineColor_ <1>: BLOX.BPolyline-accessing. (line 48) * outlineColor_: BLOX.BRectangle-accessing. @@ -4621,20 +4650,20 @@ (line 39) * pastEnd: TCP.ReadBuffer-buffer handling. (line 31) -* peek <1>: TCP.Socket-stream protocol. - (line 51) -* peek <2>: ZLib.ZlibReadStream-streaming. +* peek <1>: ZLib.ZlibReadStream-streaming. (line 17) -* peek <3>: TCP.DatagramSocket-accessing. +* peek <2>: TCP.DatagramSocket-accessing. (line 21) -* peek: TCP.DatagramSocketImpl-socket operations. +* peek <3>: TCP.DatagramSocketImpl-socket operations. (line 12) -* peek_ <1>: TCP.DatagramSocket-accessing. - (line 24) -* peek_: TCP.DatagramSocketImpl-socket operations. +* peek: TCP.Socket-stream protocol. + (line 59) +* peek_ <1>: TCP.DatagramSocketImpl-socket operations. (line 15) +* peek_: TCP.DatagramSocket-accessing. + (line 24) * peekFor_ <1>: TCP.Socket-stream protocol. - (line 56) + (line 64) * peekFor_: ZLib.ZlibReadStream-streaming. (line 21) * peekInput: I18N.Encoder-stream operations. @@ -4653,22 +4682,22 @@ (line 13) * popup_: BLOX.BWidget class-popups. (line 15) -* port <1>: TCP.Datagram-accessing. +* port <1>: TCP.AbstractSocket-accessing. + (line 41) +* port <2>: TCP.Datagram-accessing. (line 30) -* port <2>: TCP.Socket-accessing. - (line 9) -* port <3>: TCP.AbstractSocket-accessing. - (line 34) +* port <3>: TCP.ServerSocket-accessing. + (line 18) * port <4>: TCP.DatagramSocket-accessing. (line 28) -* port: TCP.ServerSocket-accessing. - (line 18) +* port: TCP.Socket-accessing. + (line 9) * port_ <1>: TCP.DatagramSocket class-instance creation. (line 14) -* port_ <2>: TCP.Datagram-accessing. - (line 33) -* port_: TCP.ServerSocket class-instance creation. +* port_ <2>: TCP.ServerSocket class-instance creation. (line 11) +* port_: TCP.Datagram-accessing. + (line 33) * port_bindTo_: TCP.ServerSocket class-instance creation. (line 15) * port_queueSize_: TCP.ServerSocket class-instance creation. @@ -4723,12 +4752,12 @@ (line 166) * posHoriz_: BLOX.BWidget-geometry management. (line 170) -* position <1>: ZLib.ZlibWriteStream-streaming. - (line 43) +* position <1>: DBI.ResultSet-stream protocol. + (line 6) * position <2>: ZLib.ZlibReadStream-streaming. (line 26) -* position: DBI.ResultSet-stream protocol. - (line 6) +* position: ZLib.ZlibWriteStream-streaming. + (line 43) * position_ <1>: DBI.ResultSet-stream protocol. (line 10) * position_: ZLib.RawInflateStream-positioning. @@ -4743,10 +4772,10 @@ (line 173) * prepare_: DBI.Connection-querying. (line 11) -* pressed <1>: BLOX.BColorButton-accessing. - (line 12) -* pressed: BLOX.BButtonLike-accessing. +* pressed <1>: BLOX.BButtonLike-accessing. (line 18) +* pressed: BLOX.BColorButton-accessing. + (line 12) * primAccept_: TCP.ServerSocket-accessing. (line 22) * primAnyLocalAddress_in_: TCP.IPAddress class-C call-outs. @@ -4775,29 +4804,29 @@ (line 11) * print_time_format_on_: I18N.LcTime-printing. (line 18) -* printOn_ <1>: I18N.RTEBinaryNode-computing. - (line 10) -* printOn_ <2>: I18N.RTELiteralNode-computing. - (line 9) -* printOn_ <3>: Complex-printing. (line 6) -* printOn_ <4>: DBI.ResultSet-printing. +* printOn_ <1>: TCP.IPAddress-printing. (line 6) -* printOn_ <5>: I18N.RTEAlternativeNode-computing. - (line 10) +* printOn_ <2>: DBI.ResultSet-printing. + (line 6) +* printOn_ <3>: DBI.Row-printing. (line 6) +* printOn_ <4>: DBI.ColumnInfo-printing. + (line 6) +* printOn_ <5>: Complex-printing. (line 6) * printOn_ <6>: I18N.EncodedString-printing. (line 11) -* printOn_ <7>: DBI.Row-printing. (line 6) -* printOn_ <8>: TCP.Socket-printing. (line 6) -* printOn_ <9>: DBI.ColumnInfo-printing. - (line 6) +* printOn_ <7>: I18N.RTEAlternativeNode-computing. + (line 10) +* printOn_ <8>: I18N.RTEBinaryNode-computing. + (line 10) +* printOn_ <9>: I18N.RTELiteralNode-computing. + (line 9) * printOn_ <10>: I18N.RTENegationNode-computing. (line 9) * printOn_ <11>: I18N.RTEParameterNode-computing. (line 6) -* printOn_ <12>: TCP.IPAddress-printing. - (line 6) -* printOn_: TCP.AbstractSocket-printing. +* printOn_ <12>: TCP.AbstractSocket-printing. (line 6) +* printOn_: TCP.Socket-printing. (line 6) * printString_: I18N.LcPrintFormats-printing. (line 14) * process: Debugger-inferior process properties. @@ -4824,10 +4853,10 @@ (line 20) * readBufferSize: TCP.Socket class-accessing. (line 12) -* readBufferSize_ <1>: TCP.Socket-stream protocol. - (line 61) -* readBufferSize_: TCP.Socket class-accessing. +* readBufferSize_ <1>: TCP.Socket class-accessing. (line 15) +* readBufferSize_: TCP.Socket-stream protocol. + (line 69) * readStream: ZLib.ZlibWriteStream-streaming. (line 46) * real: Complex-creation/coercion. @@ -4836,13 +4865,13 @@ (line 15) * realResult_imaginary_: Complex class-instance creation. (line 18) -* receive_ <1>: TCP.DatagramSocketImpl-socket operations. - (line 19) -* receive_: TCP.DatagramSocket-accessing. +* receive_ <1>: TCP.DatagramSocket-accessing. (line 31) -* receive_buffer_size_flags_from_size_ <1>: TCP.AbstractSocketImpl class-C call-outs. +* receive_: TCP.DatagramSocketImpl-socket operations. + (line 19) +* receive_buffer_size_flags_from_size_ <1>: TCP.AbstractSocketImpl-C call-outs. (line 33) -* receive_buffer_size_flags_from_size_: TCP.AbstractSocketImpl-C call-outs. +* receive_buffer_size_flags_from_size_: TCP.AbstractSocketImpl class-C call-outs. (line 33) * receive_datagram_: TCP.DatagramSocketImpl-socket operations. (line 23) @@ -4853,10 +4882,10 @@ (line 30) * redraw <1>: BLOX.BCanvasObject-widget protocol. (line 26) -* redraw <2>: BLOX.BEmbeddedText-accessing. - (line 59) -* redraw: BLOX.BEmbeddedImage-accessing. +* redraw <2>: BLOX.BEmbeddedImage-accessing. (line 21) +* redraw: BLOX.BEmbeddedText-accessing. + (line 59) * refuseTabs: BLOX.BText-inserting text. (line 41) * registerEncoderFor_toUTF32_fromUTF32_: I18N.EncodedStream class-initializing. @@ -4869,32 +4898,32 @@ (line 18) * remote_port_local_port_: TCP.Socket class-instance creation. (line 11) -* remoteAddress <1>: TCP.AbstractSocket-accessing. - (line 39) -* remoteAddress: TCP.AbstractSocketImpl-accessing. +* remoteAddress <1>: TCP.AbstractSocketImpl-accessing. (line 20) +* remoteAddress: TCP.AbstractSocket-accessing. + (line 46) * remotePort <1>: TCP.AbstractSocketImpl-accessing. (line 25) * remotePort: TCP.AbstractSocket-accessing. - (line 42) + (line 49) * remove: BLOX.BCanvasObject-widget protocol. (line 31) * remove_: BLOX.BMenuBar-accessing. (line 9) -* removeAtIndex_ <1>: BLOX.BDropDown-list box accessing. - (line 77) -* removeAtIndex_: BLOX.BList-accessing. +* removeAtIndex_ <1>: BLOX.BList-accessing. (line 282) +* removeAtIndex_: BLOX.BDropDown-list box accessing. + (line 77) * removeAttributes: BLOX.BText-attributes. (line 15) * removeAttributesFrom_to_: BLOX.BText-attributes. (line 18) -* replaceSelection_ <1>: BLOX.BEdit-widget protocol. +* replaceSelection_ <1>: BLOX.BDropDownEdit-text accessing. + (line 10) +* replaceSelection_ <2>: BLOX.BEdit-widget protocol. (line 33) -* replaceSelection_ <2>: BLOX.BText-inserting text. +* replaceSelection_: BLOX.BText-inserting text. (line 45) -* replaceSelection_: BLOX.BDropDownEdit-text accessing. - (line 10) * reset: ZLib.RawInflateStream-positioning. (line 23) * resizable: BLOX.BWindow-accessing. @@ -4933,14 +4962,14 @@ (line 83) * searchString_: BLOX.BText-inserting text. (line 50) -* select_ <1>: BLOX.BList-widget protocol. +* select_ <1>: DBI.Connection-querying. + (line 15) +* select_: BLOX.BList-widget protocol. (line 24) -* select_: DBI.Connection-querying. +* selectAll <1>: BLOX.BDropDownEdit-text accessing. (line 15) -* selectAll <1>: BLOX.BEdit-widget protocol. +* selectAll: BLOX.BEdit-widget protocol. (line 38) -* selectAll: BLOX.BDropDownEdit-text accessing. - (line 15) * selectBackground <1>: BLOX.BText-accessing. (line 95) * selectBackground: BLOX.BEdit-accessing. @@ -4957,44 +4986,44 @@ (line 113) * selectForeground_: BLOX.BEdit-accessing. (line 109) -* selectFrom_to_ <1>: BLOX.BText-position & lines. - (line 46) +* selectFrom_to_ <1>: BLOX.BDropDownEdit-text accessing. + (line 18) * selectFrom_to_ <2>: BLOX.BEdit-widget protocol. (line 41) -* selectFrom_to_: BLOX.BDropDownEdit-text accessing. - (line 18) +* selectFrom_to_: BLOX.BText-position & lines. + (line 46) * selection <1>: BLOX.BDropDownEdit-text accessing. (line 25) * selection: BLOX.BEdit-widget protocol. (line 48) -* selectionRange <1>: BLOX.BDropDownEdit-text accessing. - (line 29) -* selectionRange: BLOX.BEdit-widget protocol. +* selectionRange <1>: BLOX.BEdit-widget protocol. (line 52) +* selectionRange: BLOX.BDropDownEdit-text accessing. + (line 29) * selector <1>: I18N.LcMonetaryISO class-accessing. (line 6) -* selector <2>: I18N.LocaleConventions class-accessing. - (line 20) -* selector <3>: I18N.LcMessages class-accessing. +* selector <2>: I18N.LcMonetary class-accessing. (line 10) -* selector <4>: I18N.LcMonetary class-accessing. +* selector <3>: I18N.LcTime class-accessing. (line 10) -* selector <5>: I18N.LcTime class-accessing. +* selector <4>: I18N.LocaleConventions class-accessing. + (line 20) +* selector <5>: I18N.LcMessages class-accessing. (line 10) * selector: I18N.LcNumeric class-accessing. (line 10) -* send_ <1>: I18N.RTEParameterNode-computing. - (line 9) -* send_ <2>: I18N.RunTimeExpression-computing. - (line 6) -* send_ <3>: I18N.RTENegationNode-computing. +* send_ <1>: I18N.RTENegationNode-computing. (line 12) -* send_ <4>: I18N.RTELiteralNode-computing. - (line 12) -* send_ <5>: I18N.RTEBinaryNode-computing. +* send_ <2>: I18N.RTEAlternativeNode-computing. (line 13) -* send_: I18N.RTEAlternativeNode-computing. +* send_ <3>: I18N.RTEBinaryNode-computing. (line 13) +* send_ <4>: I18N.RTELiteralNode-computing. + (line 12) +* send_ <5>: I18N.RTEParameterNode-computing. + (line 9) +* send_: I18N.RunTimeExpression-computing. + (line 6) * send_buffer_size_flags_to_size_ <1>: TCP.AbstractSocketImpl-C call-outs. (line 36) * send_buffer_size_flags_to_size_: TCP.AbstractSocketImpl class-C call-outs. @@ -5030,24 +5059,24 @@ (line 34) * show_: BLOX.BList-widget protocol. (line 30) -* shown <1>: BLOX.BBalloon class-accessing. - (line 13) -* shown: BLOX.BBalloon-accessing. +* shown <1>: BLOX.BBalloon-accessing. (line 6) +* shown: BLOX.BBalloon class-accessing. + (line 13) * sin: Complex-transcendental functions. (line 30) * sinh: Complex-transcendental functions. (line 33) -* size <1>: I18N.EncodedString-accessing. - (line 27) -* size <2>: BLOX.BDropDown-list box accessing. - (line 84) -* size <3>: DBI.ResultSet-stream protocol. +* size <1>: DBI.ResultSet-stream protocol. (line 13) +* size <2>: BLOX.BList-accessing. + (line 289) +* size <3>: I18N.EncodedString-accessing. + (line 27) * size <4>: DBI.ColumnInfo-accessing. (line 13) -* size: BLOX.BList-accessing. - (line 289) +* size: BLOX.BDropDown-list box accessing. + (line 84) * skip_: ZLib.RawInflateStream-positioning. (line 26) * slowFinish: Debugger-stepping commands. @@ -5060,14 +5089,14 @@ (line 10) * sockDgram: TCP.AbstractSocketImpl class-C constants. (line 15) -* socketType <1>: TCP.SocketImpl class-parameters. - (line 6) -* socketType <2>: TCP.DatagramSocketImpl class-parameters. +* socketType <1>: TCP.DatagramSocketImpl class-parameters. (line 6) -* socketType <3>: TCP.RawSocketImpl class-parameters. +* socketType <2>: TCP.RawSocketImpl class-parameters. (line 6) -* socketType: TCP.AbstractSocketImpl class-abstract. +* socketType <3>: TCP.AbstractSocketImpl class-abstract. (line 13) +* socketType: TCP.SocketImpl class-parameters. + (line 6) * sockRaw: TCP.AbstractSocketImpl class-C constants. (line 21) * sockRDM: TCP.AbstractSocketImpl class-C constants. @@ -5078,16 +5107,16 @@ (line 6) * soError: TCP.AbstractSocketImpl-socket options. (line 19) -* soLinger <1>: TCP.AbstractSocketImpl-socket options. - (line 22) -* soLinger <2>: TCP.AbstractSocket-socket options. +* soLinger <1>: TCP.AbstractSocket-socket options. (line 6) -* soLinger: TCP.AbstractSocketImpl class-C constants. +* soLinger <2>: TCP.AbstractSocketImpl class-C constants. (line 9) -* soLinger_ <1>: TCP.AbstractSocket-socket options. - (line 12) -* soLinger_: TCP.AbstractSocketImpl-socket options. +* soLinger: TCP.AbstractSocketImpl-socket options. + (line 22) +* soLinger_ <1>: TCP.AbstractSocketImpl-socket options. (line 27) +* soLinger_: TCP.AbstractSocket-socket options. + (line 12) * soLingerOff: TCP.AbstractSocket-socket options. (line 17) * solSocket: TCP.AbstractSocketImpl class-C constants. @@ -5114,9 +5143,9 @@ (line 36) * startAngle: BLOX.BArc-accessing. (line 32) * startAngle_: BLOX.BArc-accessing. (line 36) -* state <1>: BLOX.Blox-accessing. (line 6) -* state: BLOX.BWindow-widget protocol. +* state <1>: BLOX.BWindow-widget protocol. (line 64) +* state: BLOX.Blox-accessing. (line 6) * state_ <1>: BLOX.Blox-accessing. (line 18) * state_: BLOX.BWindow-widget protocol. (line 70) @@ -5133,10 +5162,10 @@ * stopInferior_: Debugger-stepping commands. (line 37) * storeOn_: Complex-printing. (line 9) -* stream <1>: ZLib.ZlibStream-streaming. - (line 15) -* stream: ZLib.ZlibError-accessing. +* stream <1>: ZLib.ZlibError-accessing. (line 6) +* stream: ZLib.ZlibStream-streaming. + (line 15) * stream_: ZLib.ZlibError-accessing. (line 9) * stretch_: BLOX.BWidget-geometry management. @@ -5171,32 +5200,32 @@ (line 22) * territory: I18N.LocaleData-accessing. (line 27) -* territoryDirectory <1>: I18N.LcMessages-accessing. - (line 13) -* territoryDirectory: I18N.LocaleData-accessing. +* territoryDirectory <1>: I18N.LocaleData-accessing. (line 30) +* territoryDirectory: I18N.LcMessages-accessing. + (line 13) * territoryDirectory_ <1>: I18N.LcMessages-accessing. (line 17) * territoryDirectory_: I18N.LocaleData-accessing. (line 34) -* text <1>: BLOX.BDropDownEdit-accessing-overrides. - (line 6) -* text <2>: BLOX.BBalloon-accessing. +* text <1>: BLOX.BBalloon-accessing. (line 9) +* text <2>: BLOX.BDropDownEdit-accessing-overrides. + (line 6) * text <3>: BLOX.BDropDownList-accessing. (line 59) -* text <4>: BLOX.BEmbeddedText-accessing. - (line 64) -* text: BLOX.BDropDown-flexibility. +* text <4>: BLOX.BDropDown-flexibility. (line 34) -* text_ <1>: BLOX.BDropDown-flexibility. - (line 39) -* text_ <2>: BLOX.BDropDownEdit-text accessing. - (line 35) -* text_ <3>: BLOX.BEmbeddedText-accessing. +* text: BLOX.BEmbeddedText-accessing. + (line 64) +* text_ <1>: BLOX.BEmbeddedText-accessing. (line 67) -* text_: BLOX.BBalloon-accessing. +* text_ <2>: BLOX.BBalloon-accessing. (line 12) +* text_ <3>: BLOX.BDropDownEdit-text accessing. + (line 35) +* text_: BLOX.BDropDown-flexibility. + (line 39) * time: I18N.Locale-subobjects. (line 22) * timeout: TCP.AbstractSocket class-timed-out operations. @@ -5209,12 +5238,12 @@ (line 20) * timeToLive: TCP.UDPSocketImpl-multicasting. (line 23) -* timeToLive_ <1>: TCP.UDPSocketImpl-multicasting. +* timeToLive_ <1>: TCP.MulticastSocket-instance creation. + (line 26) +* timeToLive_ <2>: TCP.UDPSocketImpl-multicasting. (line 27) -* timeToLive_ <2>: TCP.MulticastSocketImpl-multicasting. +* timeToLive_: TCP.MulticastSocketImpl-multicasting. (line 24) -* timeToLive_: TCP.MulticastSocket-instance creation. - (line 26) * to: BLOX.BArc-accessing. (line 48) * to_: BLOX.BArc-accessing. (line 51) * toggle: BLOX.BDropDown-widget protocol. @@ -5234,10 +5263,10 @@ (line 16) * udpLoopbackTest: TCP.Socket class-tests. (line 37) -* underline <1>: BLOX.BTextAttributes class-instance-creation shortcuts. - (line 73) -* underline: BLOX.BTextAttributes-setting attributes. +* underline <1>: BLOX.BTextAttributes-setting attributes. (line 102) +* underline: BLOX.BTextAttributes class-instance-creation shortcuts. + (line 73) * unhighlight: BLOX.BList-widget protocol. (line 34) * unicodeOn_: I18N.EncodedStream class-instance creation. @@ -5254,10 +5283,10 @@ (line 37) * upArrow: BLOX.BImage class-arrows. (line 15) -* update_ <1>: BLOX.Blox class-event dispatching. - (line 25) -* update_ <2>: TCP.SocketAddress class-initialization. +* update_ <1>: TCP.SocketAddress class-initialization. (line 30) +* update_ <2>: BLOX.Blox class-event dispatching. + (line 25) * update_: I18N.LocaleData class-accessing. (line 37) * updateDriverList: DBI.Connection class-initialization. @@ -5266,36 +5295,36 @@ (line 33) * utf32Encoding: I18N.EncodedString-accessing. (line 36) -* value <1>: BLOX.BRadioGroup-accessing. - (line 6) -* value <2>: BLOX.BProgress-accessing. - (line 32) -* value <3>: BLOX.BRadioButton-accessing. - (line 14) -* value <4>: BLOX.BToggle-accessing. +* value <1>: BLOX.BToggle-accessing. (line 17) -* value: BLOX.BCheckMenuItem-accessing. +* value <2>: BLOX.BCheckMenuItem-accessing. (line 9) -* value_ <1>: BLOX.BRadioGroup-accessing. - (line 11) -* value_ <2>: I18N.RunTimeExpression-computing. - (line 10) -* value_ <3>: BLOX.BProgress-accessing. +* value <3>: BLOX.BRadioButton-accessing. + (line 14) +* value <4>: BLOX.BRadioGroup-accessing. + (line 6) +* value: BLOX.BProgress-accessing. + (line 32) +* value_ <1>: BLOX.BRadioButton-accessing. + (line 18) +* value_ <2>: BLOX.BProgress-accessing. (line 35) -* value_ <4>: BLOX.BCheckMenuItem-accessing. +* value_ <3>: BLOX.BCheckMenuItem-accessing. (line 12) -* value_ <5>: BLOX.BRadioButton-accessing. - (line 18) +* value_ <4>: BLOX.BRadioGroup-accessing. + (line 11) +* value_ <5>: I18N.RunTimeExpression-computing. + (line 10) * value_: BLOX.BToggle-accessing. (line 20) * valueAt_: I18N.EncodedString-accessing. (line 39) * valueAt_put_: I18N.EncodedString-accessing. (line 42) -* valueWithoutBuffering_ <1>: TCP.AbstractSocketImpl-socket options. - (line 46) -* valueWithoutBuffering_: TCP.TCPSocketImpl-socket options. +* valueWithoutBuffering_ <1>: TCP.TCPSocketImpl-socket options. (line 6) +* valueWithoutBuffering_: TCP.AbstractSocketImpl-socket options. + (line 46) * variable_: BLOX.BToggle-accessing. (line 24) * version: TCP.IPAddress class-constants. @@ -5312,36 +5341,36 @@ (line 26) * waitForException: TCP.AbstractSocketImpl-asynchronous operations. (line 14) -* white <1>: BLOX.BTextAttributes-colors. - (line 33) -* white: BLOX.BTextAttributes class-instance-creation shortcuts. +* white <1>: BLOX.BTextAttributes class-instance-creation shortcuts. (line 76) +* white: BLOX.BTextAttributes-colors. + (line 33) * widget: BLOX.BEventSet-accessing. (line 6) -* width <1>: BLOX.BWidget-geometry management. - (line 182) -* width <2>: BLOX.BLine-accessing. - (line 15) -* width <3>: BLOX.BPolyline-accessing. +* width <1>: BLOX.BPolyline-accessing. (line 64) -* width <4>: BLOX.BRectangle-accessing. - (line 12) -* width: BLOX.BWindow-widget protocol. +* width <2>: BLOX.BWindow-widget protocol. (line 77) -* width_ <1>: BLOX.BWindow-widget protocol. - (line 81) -* width_ <2>: BLOX.BPolyline-accessing. - (line 68) -* width_ <3>: BLOX.BWidget-geometry management. - (line 194) -* width_ <4>: BLOX.BRectangle-accessing. +* width <3>: BLOX.BRectangle-accessing. + (line 12) +* width <4>: BLOX.BWidget-geometry management. + (line 182) +* width: BLOX.BLine-accessing. (line 15) -* width_: BLOX.BLine-accessing. +* width_ <1>: BLOX.BRectangle-accessing. + (line 15) +* width_ <2>: BLOX.BLine-accessing. (line 18) -* width_height_ <1>: BLOX.BWindow-widget protocol. - (line 84) -* width_height_: BLOX.BWidget-geometry management. +* width_ <3>: BLOX.BPolyline-accessing. + (line 68) +* width_ <4>: BLOX.BWindow-widget protocol. + (line 81) +* width_: BLOX.BWidget-geometry management. + (line 194) +* width_height_ <1>: BLOX.BWidget-geometry management. (line 201) +* width_height_: BLOX.BWindow-widget protocol. + (line 84) * widthAbsolute <1>: BLOX.BWindow-widget protocol. (line 88) * widthAbsolute: BLOX.BWidget-geometry management. @@ -5356,16 +5385,16 @@ (line 37) * widthOffset: BLOX.BWidget-geometry management. (line 219) -* widthOffset_ <1>: BLOX.BWidget-geometry management. - (line 224) -* widthOffset_: BLOX.BWindow-widget protocol. +* widthOffset_ <1>: BLOX.BWindow-widget protocol. (line 92) +* widthOffset_: BLOX.BWidget-geometry management. + (line 224) * widthPixels_: BLOX.BWidget-geometry management. (line 232) -* window <1>: BLOX.BWindow-widget protocol. - (line 95) -* window: BLOX.Blox-widget protocol. +* window <1>: BLOX.Blox-widget protocol. (line 60) +* window: BLOX.BWindow-widget protocol. + (line 95) * with_with_with_with_: TCP.IPAddress class-instance creation. (line 74) * withChildrenDo_: BLOX.Blox-widget protocol. @@ -5381,69 +5410,69 @@ * writeBufferSize_ <1>: TCP.Socket class-accessing. (line 21) * writeBufferSize_: TCP.Socket-stream protocol. - (line 65) + (line 73) * x <1>: BLOX.BWindow-widget protocol. (line 98) * x: BLOX.BWidget-geometry management. (line 238) -* x_ <1>: BLOX.BWidget-geometry management. - (line 249) -* x_: BLOX.BWindow-widget protocol. +* x_ <1>: BLOX.BWindow-widget protocol. (line 103) +* x_: BLOX.BWidget-geometry management. + (line 249) * x_y_ <1>: BLOX.BWindow-widget protocol. (line 107) * x_y_: BLOX.BWidget-geometry management. (line 256) -* x_y_width_height_ <1>: BLOX.BWidget-geometry management. - (line 260) -* x_y_width_height_: BLOX.BWindow-widget protocol. +* x_y_width_height_ <1>: BLOX.BWindow-widget protocol. (line 111) -* xAbsolute <1>: BLOX.BWindow-widget protocol. - (line 115) -* xAbsolute: BLOX.BWidget-geometry management. +* x_y_width_height_: BLOX.BWidget-geometry management. + (line 260) +* xAbsolute <1>: BLOX.BWidget-geometry management. (line 263) -* xChild_ <1>: BLOX.BPopupWindow-geometry management. - (line 50) -* xChild_ <2>: BLOX.BCanvas-geometry management. +* xAbsolute: BLOX.BWindow-widget protocol. + (line 115) +* xChild_ <1>: BLOX.BCanvas-geometry management. (line 45) +* xChild_ <2>: BLOX.BPopupWindow-geometry management. + (line 50) * xChild_ <3>: BLOX.BWidget-geometry management. (line 267) * xChild_: BLOX.BText-geometry management. (line 40) * xOffset: BLOX.BWidget-geometry management. (line 277) -* xOffset_ <1>: BLOX.BWindow-widget protocol. - (line 120) -* xOffset_: BLOX.BWidget-geometry management. +* xOffset_ <1>: BLOX.BWidget-geometry management. (line 282) +* xOffset_: BLOX.BWindow-widget protocol. + (line 120) * xPixels_: BLOX.BWidget-geometry management. (line 290) * xRoot: BLOX.BWidget-geometry management. (line 296) -* y <1>: BLOX.BWindow-widget protocol. - (line 123) -* y: BLOX.BWidget-geometry management. +* y <1>: BLOX.BWidget-geometry management. (line 301) -* y_ <1>: BLOX.BWindow-widget protocol. - (line 128) -* y_: BLOX.BWidget-geometry management. +* y: BLOX.BWindow-widget protocol. + (line 123) +* y_ <1>: BLOX.BWidget-geometry management. (line 312) -* yAbsolute <1>: BLOX.BWidget-geometry management. - (line 319) -* yAbsolute: BLOX.BWindow-widget protocol. +* y_: BLOX.BWindow-widget protocol. + (line 128) +* yAbsolute <1>: BLOX.BWindow-widget protocol. (line 132) -* yChild_ <1>: BLOX.BPopupWindow-geometry management. - (line 54) -* yChild_ <2>: BLOX.BCanvas-geometry management. - (line 49) -* yChild_ <3>: BLOX.BWidget-geometry management. - (line 323) -* yChild_: BLOX.BText-geometry management. +* yAbsolute: BLOX.BWidget-geometry management. + (line 319) +* yChild_ <1>: BLOX.BText-geometry management. (line 45) -* yellow <1>: BLOX.BTextAttributes-colors. - (line 36) -* yellow: BLOX.BTextAttributes class-instance-creation shortcuts. +* yChild_ <2>: BLOX.BWidget-geometry management. + (line 323) +* yChild_ <3>: BLOX.BCanvas-geometry management. + (line 49) +* yChild_: BLOX.BPopupWindow-geometry management. + (line 54) +* yellow <1>: BLOX.BTextAttributes class-instance-creation shortcuts. (line 79) +* yellow: BLOX.BTextAttributes-colors. + (line 36) * yOffset: BLOX.BWidget-geometry management. (line 333) * yOffset_ <1>: BLOX.BWidget-geometry management. Binary files smalltalk-3.0.2/doc/gst-libs.info-3 and smalltalk-3.0.3/doc/gst-libs.info-3 differ diff -rNu smalltalk-3.0.2/doc/gst-load.1 smalltalk-3.0.3/doc/gst-load.1 --- smalltalk-3.0.2/doc/gst-load.1 2008-03-07 12:04:23.000000000 +0100 +++ smalltalk-3.0.3/doc/gst-load.1 2008-05-14 12:18:12.000000000 +0200 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.28. -.TH GST-LOAD "1" "March 2008" "gst-load version 3.0.2" "User Commands" +.TH GST-LOAD "1" "May 2008" "gst-load version 3.0.3" "User Commands" .SH NAME gst-load \- test and load packages into a GNU Smalltalk image .SH DESCRIPTION @@ -23,6 +23,9 @@ \fB\-t\fR \fB\-\-test\fR run SUnit tests if available .TP +\fB\-i\fR \fB\-\-rebuild\-image\fR +load into a newly-created image +.TP \fB\-I\fR \fB\-\-image\-file\fR=\fIFILE\fR load into the specified image .TP diff -rNu smalltalk-3.0.2/doc/gst-package.1 smalltalk-3.0.3/doc/gst-package.1 --- smalltalk-3.0.2/doc/gst-package.1 2008-03-07 12:04:24.000000000 +0100 +++ smalltalk-3.0.3/doc/gst-package.1 2008-05-14 12:18:12.000000000 +0200 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.28. -.TH GST-PACKAGE "1" "March 2008" "gst-package version 3.0.2" "User Commands" +.TH GST-PACKAGE "1" "May 2008" "gst-package version 3.0.3" "User Commands" .SH NAME gst-package \- create and install GNU Smalltalk .star package files .SH DESCRIPTION diff -rNu smalltalk-3.0.2/doc/gst-sunit.1 smalltalk-3.0.3/doc/gst-sunit.1 --- smalltalk-3.0.2/doc/gst-sunit.1 2008-03-07 12:04:24.000000000 +0100 +++ smalltalk-3.0.3/doc/gst-sunit.1 2008-05-14 12:18:13.000000000 +0200 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.28. -.TH GST-SUNIT "1" "March 2008" "gst-sunit version 3.0.2" "User Commands" +.TH GST-SUNIT "1" "May 2008" "gst-sunit version 3.0.3" "User Commands" .SH NAME gst-sunit \- unit testing tool for GNU Smalltalk .SH DESCRIPTION diff -rNu smalltalk-3.0.2/doc/gst.1 smalltalk-3.0.3/doc/gst.1 --- smalltalk-3.0.2/doc/gst.1 2008-03-07 12:04:23.000000000 +0100 +++ smalltalk-3.0.3/doc/gst.1 2008-05-14 12:18:11.000000000 +0200 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.28. -.TH SMALLTALK "1" "March 2008" "Smalltalk version 3.0.2" "User Commands" +.TH SMALLTALK "1" "May 2008" "Smalltalk version 3.0.3" "User Commands" .SH NAME Smalltalk \- the GNU Smalltalk virtual machine .SH DESCRIPTION diff -rNu smalltalk-3.0.2/doc/gst.info smalltalk-3.0.3/doc/gst.info --- smalltalk-3.0.2/doc/gst.info 2008-03-07 12:03:51.000000000 +0100 +++ smalltalk-3.0.3/doc/gst.info 2008-05-14 12:17:48.000000000 +0200 @@ -16,7 +16,7 @@  Indirect: gst.info-1: 673 -gst.info-2: 299490 +gst.info-2: 299644  Tag Table: (Indirect) @@ -58,127 +58,127 @@ Node: Security72997 Node: Special objects73145 Node: Packages78288 -Node: Blox84762 -Ref: Blox-Footnote-187883 -Node: Smalltalk-in-Smalltalk88041 -Node: Database90510 -Node: Locales92721 -Ref: Locales-Footnote-1100411 -Ref: Locales-Footnote-2100497 -Ref: Locales-Footnote-3100565 -Node: SUnit100740 -Ref: SUnit-Footnote-1108819 -Node: Network support109061 -Ref: Network support-Footnote-1111403 -Node: XML111504 -Node: Other packages112163 -Node: Emacs113065 -Node: Autoloading113562 -Node: Editing114225 -Node: Interactor115211 -Node: C and Smalltalk119679 -Node: External modules120490 -Ref: External modules-Footnote-1124872 -Ref: External modules-Footnote-2124918 -Node: C callout125102 -Node: C data types135049 -Ref: C data types-Footnote-1143861 -Node: Smalltalk types143927 -Node: Smalltalk callin154761 -Node: Other C functions163897 -Ref: Other C functions-Footnote-1172075 -Node: Object representation172382 -Node: Using Smalltalk179453 -Node: Incubator182935 -Node: Tutorial188152 -Node: Getting started189979 -Node: Starting Smalltalk190395 -Node: Saying hello190914 -Ref: Saying hello-Footnote-1191470 -Node: What happened191694 -Ref: What happened-Footnote-1193300 -Ref: What happened-Footnote-2193599 -Node: Doing math193884 -Node: Math in Smalltalk195566 -Node: Some classes196646 -Node: Arrays197350 -Ref: Arrays-Footnote-1199764 -Ref: Arrays-Footnote-2200149 -Node: Sets200252 -Node: Dictionaries204087 -Node: Closing thoughts205710 -Node: The hierarchy206718 -Node: Class Object207501 -Node: Animals208398 -Node: But why211267 -Node: Creating classes212284 -Node: A new class214231 -Node: Documenting the class215159 -Node: Defining methods216505 -Ref: Defining methods-Footnote-1220747 -Node: Instance methods221040 -Ref: Instance methods-Footnote-1222441 -Node: A look at our object222662 -Node: Moving money around224854 -Node: Next coming225673 -Node: Creating subclasses226120 -Node: The Savings class226879 -Ref: The Savings class-Footnote-1230544 -Ref: The Savings class-Footnote-2230862 -Node: The Checking class231122 -Node: Writing checks232297 -Node: Code blocks (I)234255 -Node: Conditions234871 -Ref: Conditions-Footnote-1238025 -Node: Iteration238246 -Ref: Iteration-Footnote-1245723 -Node: Code blocks (II)246246 -Ref: Code blocks (II)-Footnote-1247101 -Node: Integer loops247370 -Node: Intervals247928 -Node: Invoking code blocks248547 -Ref: Invoking code blocks-Footnote-1251478 -Node: Debugging251600 -Node: Simple errors252538 -Node: Nested calls253817 -Node: Looking at objects256307 -Ref: Looking at objects-Footnote-1257564 -Node: More subclassing257649 -Node: The existing hierarchy258977 -Ref: The existing hierarchy-Footnote-1264625 -Node: Playing with Arrays264772 -Ref: Playing with Arrays-Footnote-1268761 -Node: New kinds of Numbers269304 -Ref: New kinds of Numbers-Footnote-1274488 -Node: Inheritance and Polymorphism274590 -Node: Streams276835 -Node: The output stream277953 -Ref: The output stream-Footnote-1278864 -Node: Your own stream278957 -Node: Files282363 -Node: Dynamic Strings283006 -Node: Exception handling284640 -Node: Creating exceptions288158 -Node: Raising exceptions289607 -Node: Handling exceptions291084 -Node: When an exception isn't handled295223 -Node: Creating new exception classes296333 -Node: Hooking into the stack unwinding297747 -Node: Handler stack unwinding caveat299490 -Node: Behind the scenes301031 -Node: Inside Arrays301636 -Ref: Inside Arrays-Footnote-1310442 -Ref: Inside Arrays-Footnote-2310519 -Ref: Inside Arrays-Footnote-3310580 -Ref: Inside Arrays-Footnote-4310738 -Ref: Inside Arrays-Footnote-5310818 -Node: Two flavors of equality310977 -Node: Why is #new there?!?313654 -Ref: Why is #new there?!?-Footnote-1318596 -Node: Performance318666 -Ref: Performance-Footnote-1323286 -Ref: Performance-Footnote-2323367 -Node: And now323476 -Node: The syntax326091 +Node: Blox84916 +Ref: Blox-Footnote-188037 +Node: Smalltalk-in-Smalltalk88195 +Node: Database90664 +Node: Locales92875 +Ref: Locales-Footnote-1100565 +Ref: Locales-Footnote-2100651 +Ref: Locales-Footnote-3100719 +Node: SUnit100894 +Ref: SUnit-Footnote-1108973 +Node: Network support109215 +Ref: Network support-Footnote-1111557 +Node: XML111658 +Node: Other packages112317 +Node: Emacs113219 +Node: Autoloading113716 +Node: Editing114379 +Node: Interactor115365 +Node: C and Smalltalk119833 +Node: External modules120644 +Ref: External modules-Footnote-1125026 +Ref: External modules-Footnote-2125072 +Node: C callout125256 +Node: C data types135203 +Ref: C data types-Footnote-1144015 +Node: Smalltalk types144081 +Node: Smalltalk callin154915 +Node: Other C functions164051 +Ref: Other C functions-Footnote-1172229 +Node: Object representation172536 +Node: Using Smalltalk179607 +Node: Incubator183089 +Node: Tutorial188306 +Node: Getting started190133 +Node: Starting Smalltalk190549 +Node: Saying hello191068 +Ref: Saying hello-Footnote-1191624 +Node: What happened191848 +Ref: What happened-Footnote-1193454 +Ref: What happened-Footnote-2193753 +Node: Doing math194038 +Node: Math in Smalltalk195720 +Node: Some classes196800 +Node: Arrays197504 +Ref: Arrays-Footnote-1199918 +Ref: Arrays-Footnote-2200303 +Node: Sets200406 +Node: Dictionaries204241 +Node: Closing thoughts205864 +Node: The hierarchy206872 +Node: Class Object207655 +Node: Animals208552 +Node: But why211421 +Node: Creating classes212438 +Node: A new class214385 +Node: Documenting the class215313 +Node: Defining methods216659 +Ref: Defining methods-Footnote-1220901 +Node: Instance methods221194 +Ref: Instance methods-Footnote-1222595 +Node: A look at our object222816 +Node: Moving money around225008 +Node: Next coming225827 +Node: Creating subclasses226274 +Node: The Savings class227033 +Ref: The Savings class-Footnote-1230698 +Ref: The Savings class-Footnote-2231016 +Node: The Checking class231276 +Node: Writing checks232451 +Node: Code blocks (I)234409 +Node: Conditions235025 +Ref: Conditions-Footnote-1238179 +Node: Iteration238400 +Ref: Iteration-Footnote-1245877 +Node: Code blocks (II)246400 +Ref: Code blocks (II)-Footnote-1247255 +Node: Integer loops247524 +Node: Intervals248082 +Node: Invoking code blocks248701 +Ref: Invoking code blocks-Footnote-1251632 +Node: Debugging251754 +Node: Simple errors252692 +Node: Nested calls253971 +Node: Looking at objects256461 +Ref: Looking at objects-Footnote-1257718 +Node: More subclassing257803 +Node: The existing hierarchy259131 +Ref: The existing hierarchy-Footnote-1264779 +Node: Playing with Arrays264926 +Ref: Playing with Arrays-Footnote-1268915 +Node: New kinds of Numbers269458 +Ref: New kinds of Numbers-Footnote-1274642 +Node: Inheritance and Polymorphism274744 +Node: Streams276989 +Node: The output stream278107 +Ref: The output stream-Footnote-1279018 +Node: Your own stream279111 +Node: Files282517 +Node: Dynamic Strings283160 +Node: Exception handling284794 +Node: Creating exceptions288312 +Node: Raising exceptions289761 +Node: Handling exceptions291238 +Node: When an exception isn't handled295377 +Node: Creating new exception classes296487 +Node: Hooking into the stack unwinding297901 +Node: Handler stack unwinding caveat299644 +Node: Behind the scenes301185 +Node: Inside Arrays301790 +Ref: Inside Arrays-Footnote-1310596 +Ref: Inside Arrays-Footnote-2310673 +Ref: Inside Arrays-Footnote-3310734 +Ref: Inside Arrays-Footnote-4310892 +Ref: Inside Arrays-Footnote-5310972 +Node: Two flavors of equality311131 +Node: Why is #new there?!?313808 +Ref: Why is #new there?!?-Footnote-1318750 +Node: Performance318820 +Ref: Performance-Footnote-1323440 +Ref: Performance-Footnote-2323521 +Node: And now323630 +Node: The syntax326245  End Tag Table diff -rNu smalltalk-3.0.2/doc/gst.info-1 smalltalk-3.0.3/doc/gst.info-1 --- smalltalk-3.0.2/doc/gst.info-1 2008-03-07 12:03:51.000000000 +0100 +++ smalltalk-3.0.3/doc/gst.info-1 2008-05-14 12:17:48.000000000 +0200 @@ -1803,6 +1803,11 @@ `--image-file' Load the packages inside the given image. +`-i' +`--rebuild-image' + Build an image from scratch and load the package into it. Useful + when the image specified with `-I' does not exist yet. + `-q' `--quiet' Hide the script's output. @@ -1902,7 +1907,7 @@ archive in the current image directory, with the files specified in the `file' tags. By default the package is placed in the system-wide package directory; you can use the option `--target-directory' to -create the `.star' file elsewhere). +create the `.star' file elsewhere. Alternatively, `gst-package' can be used to create a skeleton GNU style source tree. This includes a `configure.ac' that will find the diff -rNu smalltalk-3.0.2/doc/gst.texi smalltalk-3.0.3/doc/gst.texi --- smalltalk-3.0.2/doc/gst.texi 2008-03-07 11:53:43.000000000 +0100 +++ smalltalk-3.0.3/doc/gst.texi 2008-05-14 12:02:32.000000000 +0200 @@ -1910,6 +1910,11 @@ @itemx --image-file Load the packages inside the given image. +@item -i +@itemx --rebuild-image +Build an image from scratch and load the package into it. Useful +when the image specified with @option{-I} does not exist yet. + @item -q @itemx --quiet Hide the script's output. @@ -2014,7 +2019,7 @@ a @file{.star} archive in the current image directory, with the files specified in the @code{file} tags. By default the package is placed in the system-wide package directory; you can use the option -@option{--target-directory} to create the @file{.star} file elsewhere). +@option{--target-directory} to create the @file{.star} file elsewhere. Alternatively, @code{gst-package} can be used to create a skeleton GNU style source tree. This includes a @file{configure.ac} that will diff -rNu smalltalk-3.0.2/doc/stamp-1 smalltalk-3.0.3/doc/stamp-1 --- smalltalk-3.0.2/doc/stamp-1 2008-03-07 12:12:15.000000000 +0100 +++ smalltalk-3.0.3/doc/stamp-1 2008-05-14 12:35:51.000000000 +0200 @@ -1,4 +1,4 @@ -@set UPDATED 7 March 2008 -@set UPDATED-MONTH March 2008 -@set EDITION 3.0.2 -@set VERSION 3.0.2 +@set UPDATED 14 May 2008 +@set UPDATED-MONTH May 2008 +@set EDITION 3.0.3 +@set VERSION 3.0.3 diff -rNu smalltalk-3.0.2/doc/stamp-2 smalltalk-3.0.3/doc/stamp-2 --- smalltalk-3.0.2/doc/stamp-2 2008-03-07 12:12:16.000000000 +0100 +++ smalltalk-3.0.3/doc/stamp-2 2008-05-14 12:25:12.000000000 +0200 @@ -1,4 +1,4 @@ -@set UPDATED 7 March 2008 -@set UPDATED-MONTH March 2008 -@set EDITION 3.0.2 -@set VERSION 3.0.2 +@set UPDATED 14 May 2008 +@set UPDATED-MONTH May 2008 +@set EDITION 3.0.3 +@set VERSION 3.0.3 diff -rNu smalltalk-3.0.2/doc/stamp-vti smalltalk-3.0.3/doc/stamp-vti --- smalltalk-3.0.2/doc/stamp-vti 2008-03-07 12:03:50.000000000 +0100 +++ smalltalk-3.0.3/doc/stamp-vti 2008-05-14 12:17:47.000000000 +0200 @@ -1,4 +1,4 @@ -@set UPDATED 7 March 2008 -@set UPDATED-MONTH March 2008 -@set EDITION 3.0.2 -@set VERSION 3.0.2 +@set UPDATED 14 May 2008 +@set UPDATED-MONTH May 2008 +@set EDITION 3.0.3 +@set VERSION 3.0.3 diff -rNu smalltalk-3.0.2/doc/tcp.texi smalltalk-3.0.3/doc/tcp.texi --- smalltalk-3.0.2/doc/tcp.texi 2008-03-07 12:04:14.000000000 +0100 +++ smalltalk-3.0.3/doc/tcp.texi 2008-05-14 12:18:04.000000000 +0200 @@ -253,10 +253,22 @@ @meindex available +@slindex canRead @item available +Answer whether there is data available on the socket. Same as +@-#canRead, present for backwards compatibility. + + +@meindex canRead +@item canRead Answer whether there is data available on the socket. +@meindex canWrite +@item canWrite +Answer whether there is free space in the socket's write buffer. + + @meindex close @item close Close the socket represented by the receiver. @@ -2257,15 +2269,21 @@ Answer whether more data is available on the socket -@meindex available -@item available +@meindex bufferContents +@item bufferContents +Answer the current contents of the read buffer + + +@meindex canRead +@item canRead Answer whether more data is available in the socket's read buffer or from the operating system. -@meindex bufferContents -@item bufferContents -Answer the current contents of the read buffer +@meindex canWrite +@item canWrite +Answer whether more data is available in the socket's read buffer +or from the operating system. @meindex close @@ -2273,6 +2291,12 @@ Flush and close the socket. +@meindex ensureWriteable +@item ensureWriteable +Answer whether more data is available in the socket's read buffer +or from the operating system. + + @meindex fill @item fill Fill the read buffer with data read from the socket @@ -2854,6 +2878,7 @@ @menu * TCP.WriteBuffer-buffer handling:: (instance) +* TCP.WriteBuffer-testing:: (instance) @end menu @@ -2877,3 +2902,15 @@ @end table + + +@node TCP.WriteBuffer-testing +@subsection TCP.WriteBuffer:@- testing + +@table @b +@meindex isFull +@item isFull +Not commented. + +@end table + diff -rNu smalltalk-3.0.2/doc/vers-base.texi smalltalk-3.0.3/doc/vers-base.texi --- smalltalk-3.0.2/doc/vers-base.texi 2008-03-07 12:12:15.000000000 +0100 +++ smalltalk-3.0.3/doc/vers-base.texi 2008-05-14 12:17:48.000000000 +0200 @@ -1,4 +1,4 @@ -@set UPDATED 7 March 2008 -@set UPDATED-MONTH March 2008 -@set EDITION 3.0.2 -@set VERSION 3.0.2 +@set UPDATED 14 May 2008 +@set UPDATED-MONTH May 2008 +@set EDITION 3.0.3 +@set VERSION 3.0.3 diff -rNu smalltalk-3.0.2/doc/vers-gst.texi smalltalk-3.0.3/doc/vers-gst.texi --- smalltalk-3.0.2/doc/vers-gst.texi 2008-03-07 12:03:50.000000000 +0100 +++ smalltalk-3.0.3/doc/vers-gst.texi 2008-05-14 12:17:47.000000000 +0200 @@ -1,4 +1,4 @@ -@set UPDATED 7 March 2008 -@set UPDATED-MONTH March 2008 -@set EDITION 3.0.2 -@set VERSION 3.0.2 +@set UPDATED 14 May 2008 +@set UPDATED-MONTH May 2008 +@set EDITION 3.0.3 +@set VERSION 3.0.3 diff -rNu smalltalk-3.0.2/doc/vers-libs.texi smalltalk-3.0.3/doc/vers-libs.texi --- smalltalk-3.0.2/doc/vers-libs.texi 2008-03-07 12:04:10.000000000 +0100 +++ smalltalk-3.0.3/doc/vers-libs.texi 2008-05-14 12:18:01.000000000 +0200 @@ -1,4 +1,4 @@ -@set UPDATED 7 March 2008 -@set UPDATED-MONTH March 2008 -@set EDITION 3.0.2 -@set VERSION 3.0.2 +@set UPDATED 14 May 2008 +@set UPDATED-MONTH May 2008 +@set EDITION 3.0.3 +@set VERSION 3.0.3 diff -rNu smalltalk-3.0.2/examples/README smalltalk-3.0.3/examples/README --- smalltalk-3.0.2/examples/README 2008-01-22 11:14:31.000000000 +0100 +++ smalltalk-3.0.3/examples/README 2008-05-14 12:02:32.000000000 +0200 @@ -131,7 +131,7 @@ script can be slow. - `xml.sed', that converts from an XML DTD designed for Smalltalk source. This script does not convert `statics' (that's how the DTD calls class variables) - yet. + yet. Requires GNU sed. The `unsupported/misc' directory contains some other small example GNU Smalltalk programs which test more advanced aspects of Smalltalk, either diff -rNu smalltalk-3.0.2/examples/xml.sed smalltalk-3.0.3/examples/xml.sed --- smalltalk-3.0.2/examples/xml.sed 2008-01-09 18:20:46.000000000 +0100 +++ smalltalk-3.0.3/examples/xml.sed 2008-05-12 14:37:55.000000000 +0200 @@ -69,7 +69,7 @@ d } -1,//d +0,//d /<\/st-source>/,$ d # Turn copyright into a Smalltalk comment; "..." becomes `...' diff -rNu smalltalk-3.0.2/gst-tool.c smalltalk-3.0.3/gst-tool.c --- smalltalk-3.0.2/gst-tool.c 2008-03-07 11:53:43.000000000 +0100 +++ smalltalk-3.0.3/gst-tool.c 2008-05-14 12:02:32.000000000 +0200 @@ -86,13 +86,13 @@ { "gst-load", "scripts/Load.st", "-h|--help --version -q|--quiet -v|-V|--verbose -n|--dry-run -f|--force \ - -t|--test -I|--image-file: --kernel-directory:", + -t|--test -I|--image-file: --kernel-directory: -i|--rebuild-image", NULL }, { "gst-reload", "scripts/Load.st", "-h|--help --version -q|--quiet -v|-V|--verbose -n|--dry-run -f|--force \ - -t|--test -I|--image-file: --kernel-directory:", + -t|--test -I|--image-file: --kernel-directory: -i|--rebuild-image", "--force" }, { @@ -243,6 +243,10 @@ option_error ("duplicate --kernel-directory option"); kernel_dir = arg; } + + if (short_opt == 'i' + || (long_opt && !strcmp (long_opt, "rebuild-image"))) + flags |= GST_REBUILD_IMAGE; } int diff -rNu smalltalk-3.0.2/kernel/Class.st smalltalk-3.0.3/kernel/Class.st --- smalltalk-3.0.2/kernel/Class.st 2008-01-28 07:45:16.000000000 +0100 +++ smalltalk-3.0.3/kernel/Class.st 2008-05-14 12:02:32.000000000 +0200 @@ -191,6 +191,7 @@ "Add the given shared pool to the list of the class' pool dictionaries" + sharedPools ifNil: [sharedPools := #()]. (sharedPools includes: aDictionary) ifFalse: [sharedPools := sharedPools copyWith: aDictionary] ] @@ -199,6 +200,7 @@ "Remove the given dictionary to the list of the class' pool dictionaries" + sharedPools ifNil: [sharedPools := #()]. sharedPools := sharedPools copyWithout: aDictionary ] @@ -208,7 +210,7 @@ | s | s := Set new. - sharedPools notNil + (sharedPools notNil and: [sharedPools notEmpty]) ifTrue: [self environment associationsDo: [:each | @@ -541,12 +543,12 @@ aStream nextPutAll: (self nameIn: Smalltalk) ] - policy [ + securityPolicy [ ^securityPolicy ] - policy: aSecurityPolicy [ + securityPolicy: aSecurityPolicy [ securityPolicy := aSecurityPolicy withOwner: self ] @@ -604,14 +606,14 @@ "Private - Set the receiver's shared pools to be those in anArray" - sharedPools := anArray + sharedPools := anArray ifNil: [#()] ] sharedPoolDictionaries [ "Return the shared pools (not the names!) defined by the class" - ^sharedPools + ^sharedPools ifNil: [#()] ] metaclassFor: classNameString [ diff -rNu smalltalk-3.0.2/kernel/DLD.st smalltalk-3.0.3/kernel/DLD.st --- smalltalk-3.0.2/kernel/DLD.st 2008-01-28 07:45:16.000000000 +0100 +++ smalltalk-3.0.3/kernel/DLD.st 2008-04-25 07:21:26.000000000 +0200 @@ -227,7 +227,6 @@ libraryList := OrderedCollection new. libraryStream := Kernel.RoundRobinStream on: libraryList readStream. moduleList := OrderedCollection new. - ObjectMemory addDependent: DLD ] DLD class >> update: aspect [ diff -rNu smalltalk-3.0.2/kernel/DeferBinding.st smalltalk-3.0.3/kernel/DeferBinding.st --- smalltalk-3.0.2/kernel/DeferBinding.st 2008-01-28 07:45:16.000000000 +0100 +++ smalltalk-3.0.3/kernel/DeferBinding.st 2008-05-14 12:02:32.000000000 +0200 @@ -138,12 +138,9 @@ assoc := env environment associationAt: self key ifAbsent: [nil]. assoc isNil ifFalse: [^assoc]. pools := env sharedPoolDictionaries. - pools isNil - ifFalse: - [pools do: - [:each | - assoc := each associationAt: self key ifAbsent: [nil]. - assoc isNil ifFalse: [^assoc]]]]. + pools do: [:each | + assoc := each associationAt: self key ifAbsent: [nil]. + assoc isNil ifFalse: [^assoc]]]. "Create it as a temporary." defaultDictionary at: self key ifAbsentPut: [nil]. diff -rNu smalltalk-3.0.2/kernel/File.st smalltalk-3.0.3/kernel/File.st --- smalltalk-3.0.2/kernel/File.st 2008-02-14 14:26:15.000000000 +0100 +++ smalltalk-3.0.3/kernel/File.st 2008-05-14 12:02:32.000000000 +0200 @@ -192,13 +192,14 @@ File class >> computePathFrom: srcName to: destName [ - | src dest srcCanon destCanon path | + | src dest srcCanon destCanon path isUnix | "A Windows path may contain both / and \ separators. Clean it up to allow easy parsing" - srcCanon := Directory pathSeparator = $/ + isUnix := Directory pathSeparator = $/. + srcCanon := isUnix ifTrue: [srcName] ifFalse: [srcName copyReplacing: $/ withObject: Directory pathSeparator]. - destCanon := Directory pathSeparator = $/ + destCanon := isUnix ifTrue: [destName] ifFalse: [destName copyReplacing: $/ withObject: Directory pathSeparator]. @@ -208,14 +209,19 @@ src removeLast. dest := dest asOrderedCollection. dest isEmpty ifTrue: [dest addLast: '']. - path := (src notEmpty and: [src first ~= dest first]) + path := (src notEmpty and: [src first ~= dest first]) + ifTrue: [ + "Don't prepend a \ if the destination path has a disk letter." + (isUnix or: [ (dest first at: 2 ifAbsent: [ nil ]) ~= $: ]) ifTrue: [OrderedCollection with: ''] - ifFalse: - [[src isEmpty or: [dest size = 1 or: [src first ~= dest first]]] - whileFalse: - [src removeFirst. - dest removeFirst]. - src collect: [:each | '..']]. + ifFalse: [OrderedCollection new]] + ifFalse: + [[src isEmpty or: [dest size = 1 or: [src first ~= dest first]]] + whileFalse: + [src removeFirst. + dest removeFirst]. + src collect: [:each | '..']]. + path addAllLast: dest. ^path fold: [:a :b | a , Directory pathSeparatorString , b] ] @@ -646,7 +652,7 @@ | stream | stream := self readStream. - [aBlock value: stream] ensure: [stream close] + ^[aBlock value: stream] ensure: [stream close] ] readStream [ @@ -662,7 +668,7 @@ | stream | stream := self writeStream. - [aBlock value: stream] ensure: [stream close] + ^[aBlock value: stream] ensure: [stream close] ] writeStream [ diff -rNu smalltalk-3.0.2/kernel/FileDescr.st smalltalk-3.0.3/kernel/FileDescr.st --- smalltalk-3.0.2/kernel/FileDescr.st 2008-01-28 07:45:16.000000000 +0100 +++ smalltalk-3.0.3/kernel/FileDescr.st 2008-05-14 12:02:32.000000000 +0200 @@ -106,12 +106,8 @@ finished with it anyway, using #close. To keep a file open even when no references exist anymore, send it #removeToBeFinalized" - - ((fileName indexOfSubCollection: '://') > 0 - and: [fileMode = FileStream read]) - ifTrue: [^NetClients.URIResolver openStreamOn: fileName]. - ^(VFS.VFSHandler for: fileName) - open: self + ^self + open: fileName mode: fileMode ifFail: [SystemExceptions.FileError signal: 'could not open ' , fileName] ] @@ -132,6 +128,9 @@ no references exist anymore, send it #removeToBeFinalized" + ((fileName indexOfSubCollection: '://') > 0 + and: [fileMode = FileStream read]) + ifTrue: [^NetClients.URIResolver openStreamOn: fileName ifFail: aBlock ]. ^(VFS.VFSHandler for: fileName) open: self mode: fileMode @@ -283,6 +282,7 @@ File class>>#checkError." + self isOpen ifFalse: [SystemExceptions.FileError signal: 'file closed']. File checkError. ^0 ] @@ -299,7 +299,7 @@ on read-write pipes." - file isNil ifTrue: [^self]. + self isOpen ifFalse: [^self]. self flush. self fileOp: 19. self checkError. @@ -310,7 +310,7 @@ "Close the file" - file isNil ifTrue: [^self]. + self isOpen ifFalse: [^self]. self flush. self changed: #beforeClosing. self fileOp: 1. @@ -325,7 +325,7 @@ AllOpenFiles remove: self ifAbsent: []. - file isNil ifFalse: [self close] + self isOpen ifFalse: [self close] ] next [ @@ -545,15 +545,6 @@ "If the file is open, wait until we can write to it. The wait allows other Processes to run." - "2002-02-07 commented out the code below because not all devices - support sending SIGIO's when they become writeable -- notably, - tty's under Linux :-(" - - "self isPipe ifFalse: [ ^self ]. - self isOpen ifFalse: [ ^self ]. - - self fileOp: 14 with: 1 with: Semaphore new" - self fileOp: 13 @@ -815,16 +806,17 @@ | count available | self ensureReadable. available := peek isNil ifTrue: [0] ifFalse: [1]. + peek isNil + ifFalse: + [byteArray byteAt: 1 put: peek value. + peek := nil]. + self isOpen ifFalse: [^available]. count := self fileOp: 3 with: byteArray with: available + 1 with: byteArray size ifFail: [self checkError]. - peek isNil - ifFalse: - [byteArray byteAt: 1 put: peek value. - peek := nil]. count := count + available. count = 0 ifTrue: [atEnd := true]. ^count @@ -838,16 +830,17 @@ | count available | self ensureReadable. available := peek isNil ifTrue: [0] ifFalse: [1]. + peek isNil + ifFalse: + [byteArray byteAt: 1 put: peek value. + peek := nil]. + self isOpen ifFalse: [^available]. count := self fileOp: 3 with: byteArray with: 1 + available with: (anInteger min: byteArray size) ifFail: [self checkError]. - peek isNil - ifFalse: - [byteArray byteAt: 1 put: peek value. - peek := nil]. count := count + available. count = 0 ifTrue: [atEnd := true]. ^count @@ -861,16 +854,17 @@ | count available | self ensureReadable. available := peek isNil ifTrue: [0] ifFalse: [1]. + peek isNil + ifFalse: + [byteArray byteAt: position put: peek value. + peek := nil]. + self isOpen ifFalse: [^available]. count := self fileOp: 3 with: byteArray with: position + available with: (end min: byteArray size) ifFail: [self checkError]. - peek isNil - ifFalse: - [byteArray byteAt: 1 put: peek value. - peek := nil]. count := count + available. count = 0 ifTrue: [atEnd := true]. ^count @@ -909,6 +903,7 @@ last := end min: byteArray size. [cur <= last] whileTrue: [self ensureWriteable. + self isOpen ifFalse: [^cur - position]. result := self fileOp: 2 with: byteArray @@ -925,7 +920,6 @@ - file isNil ifTrue: [SystemExceptions.FileError signal: 'file closed']. self checkError. ^nil ] @@ -943,7 +937,6 @@ - file isNil ifTrue: [SystemExceptions.FileError signal: 'file closed']. self checkError. ^nil ] @@ -961,7 +954,6 @@ - file isNil ifTrue: [SystemExceptions.FileError signal: 'file closed']. self checkError. ^nil ] @@ -979,7 +971,6 @@ - file isNil ifTrue: [SystemExceptions.FileError signal: 'file closed']. self checkError. ^nil ] @@ -997,7 +988,6 @@ - file isNil ifTrue: [SystemExceptions.FileError signal: 'file closed']. self checkError. ^nil ] diff -rNu smalltalk-3.0.2/kernel/Float.st smalltalk-3.0.3/kernel/Float.st --- smalltalk-3.0.2/kernel/Float.st 2008-02-25 15:18:41.000000000 +0100 +++ smalltalk-3.0.3/kernel/Float.st 2008-04-25 07:21:26.000000000 +0200 @@ -254,6 +254,13 @@ ^bytes ] + asCNumber [ + "Convert the receiver to a kind of number that is understood by + the C call-out mechanism." + + ^self + ] + asExactFraction [ "Convert the receiver into a fraction with optimal approximation, but with usually huge terms." diff -rNu smalltalk-3.0.2/kernel/Fraction.st smalltalk-3.0.3/kernel/Fraction.st --- smalltalk-3.0.2/kernel/Fraction.st 2008-01-22 11:14:31.000000000 +0100 +++ smalltalk-3.0.3/kernel/Fraction.st 2008-04-25 07:21:26.000000000 +0200 @@ -336,6 +336,13 @@ ^Fraction numerator: self truncated denominator: 1 ] + asCNumber [ + "Convert the receiver to a kind of number that is understood by + the C call-out mechanism." + + ^self asFloat: FloatD + ] + asFloatD [ "Answer the receiver converted to a FloatD" diff -rNu smalltalk-3.0.2/kernel/LargeInt.st smalltalk-3.0.3/kernel/LargeInt.st --- smalltalk-3.0.2/kernel/LargeInt.st 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/kernel/LargeInt.st 2008-04-25 07:21:26.000000000 +0200 @@ -228,6 +228,13 @@ self checkIndexableBounds: anIndex put: aNumber ] + asCNumber [ + "Convert the receiver to a kind of number that is understood by + the C call-out mechanism." + + ^self + ] + asObject [ "This method always fails. The number of OOPs is far less than the minimum number represented with a LargeInteger." diff -rNu smalltalk-3.0.2/kernel/Metaclass.st smalltalk-3.0.3/kernel/Metaclass.st --- smalltalk-3.0.2/kernel/Metaclass.st 2008-02-20 12:48:03.000000000 +0100 +++ smalltalk-3.0.3/kernel/Metaclass.st 2008-05-14 12:02:32.000000000 +0200 @@ -285,7 +285,7 @@ "Now add/remove pool dictionaries. FIXME: They may affect name binding, so we should probably recompile everything if they change." - aClass sharedPoolDictionaries isNil + aClass sharedPoolDictionaries isEmpty ifTrue: [aClass setSharedPools: sharedPoolNames] ifFalse: [sharedPoolNames do: diff -rNu smalltalk-3.0.2/kernel/Number.st smalltalk-3.0.3/kernel/Number.st --- smalltalk-3.0.2/kernel/Number.st 2008-02-14 14:26:15.000000000 +0100 +++ smalltalk-3.0.3/kernel/Number.st 2008-04-25 07:21:26.000000000 +0200 @@ -164,6 +164,13 @@ scale: n ] + asCNumber [ + "Convert the receiver to a kind of number that is understood by + the C call-out mechanism." + + self subclassResponsibility + ] + asFloat [ "Convert the receiver to an arbitrary subclass of Float" diff -rNu smalltalk-3.0.2/kernel/ObjMemory.st smalltalk-3.0.3/kernel/ObjMemory.st --- smalltalk-3.0.2/kernel/ObjMemory.st 2008-03-07 11:53:44.000000000 +0100 +++ smalltalk-3.0.3/kernel/ObjMemory.st 2008-05-14 12:02:32.000000000 +0200 @@ -54,14 +54,29 @@ ] ObjectMemory class >> changed: aSymbol [ - "Before quitting, wait until all processes are done." - aSymbol == #aboutToQuit - ifTrue: - [ - Processor activeProcess priority: Processor rockBottomPriority. - [super changed: aSymbol] forkAt: Processor userSchedulingPriority] - ifFalse: [super changed: aSymbol] + | sema prio | + prio := aSymbol == #returnFromSnapshot + ifTrue: [Processor highIOPriority] + ifFalse: [Processor userSchedulingPriority]. + + Processor activePriority < prio + ifTrue: [ + sema := Semaphore new. + + "Ensure that modules and libraries are initialized before + anything else happens." + [DLD update: aSymbol. super changed: aSymbol. + sema signal] + forkAt: prio. + sema wait] + ifFalse: [ + DLD update: aSymbol. super changed: aSymbol]. + + "Before quitting, wait until all processes are done." + aSymbol == #aboutToQuit ifTrue: [ + Processor activeProcess priority: Processor rockBottomPriority. + Processor yield]. ] ObjectMemory class >> initialize [ diff -rNu smalltalk-3.0.2/kernel/Object.st smalltalk-3.0.3/kernel/Object.st --- smalltalk-3.0.2/kernel/Object.st 2008-01-24 13:21:21.000000000 +0100 +++ smalltalk-3.0.3/kernel/Object.st 2008-05-14 12:02:32.000000000 +0200 @@ -314,7 +314,8 @@ | dependencies | dependencies := Dependencies at: self ifAbsent: [^anObject]. dependencies remove: anObject ifAbsent: []. - dependencies size < 1 ifTrue: [self release]. + dependencies size < 1 ifTrue: [ + Dependencies removeKey: self ifAbsent: []]. ^anObject ] diff -rNu smalltalk-3.0.2/kernel/Regex.st smalltalk-3.0.3/kernel/Regex.st --- smalltalk-3.0.2/kernel/Regex.st 2008-02-14 14:26:15.000000000 +0100 +++ smalltalk-3.0.3/kernel/Regex.st 2008-05-14 12:02:32.000000000 +0200 @@ -727,10 +727,33 @@ which is then returned." - | idx regex regs result beg end emptyOk | + | result | + result := OrderedCollection new. + self allOccurrencesOfRegex: pattern from: from to: to + do: [ :each | result add: each match ]. + ^result + ] + + allOccurrencesOfRegex: pattern [ + "Find all the matches of pattern within the receiver and + collect them into an OrderedCollection." + + + ^self + allOccurrencesOfRegex: pattern + from: 1 + to: self size + ] + + allOccurrencesOfRegex: pattern from: from to: to do: aBlock [ + "Find all the matches of pattern within the receiver and within the + given range of indices. For each match, pass the RegexResults object + to aBlock." + + + | idx regex regs beg end emptyOk | regex := pattern asRegex. idx := from. - result := OrderedCollection new. emptyOk := true. [regs := self @@ -743,25 +766,25 @@ end := regs to. (beg <= end or: [ beg > idx or: [ emptyOk ]]) ifTrue: [ - result addLast: regs match. + aBlock value: regs. emptyOk := false. idx := end + 1] ifFalse: [ - beg <= to ifFalse: [^result]. + beg <= to ifFalse: [^self]. emptyOk := true. idx := beg + 1]]. - ^result ] - allOccurrencesOfRegex: pattern [ + allOccurrencesOfRegex: pattern do: aBlock [ "Find all the matches of pattern within the receiver and - collect them into an OrderedCollection." + pass the RegexResults objects to aBlock." ^self allOccurrencesOfRegex: pattern from: 1 to: self size + do: aBlock ] replacingRegex: pattern with: str [ diff -rNu smalltalk-3.0.2/kernel/ScaledDec.st smalltalk-3.0.3/kernel/ScaledDec.st --- smalltalk-3.0.2/kernel/ScaledDec.st 2008-02-25 14:31:28.000000000 +0100 +++ smalltalk-3.0.3/kernel/ScaledDec.st 2008-04-25 07:21:26.000000000 +0200 @@ -95,6 +95,13 @@ ^fraction ceiling ] + asCNumber [ + "Convert the receiver to a kind of number that is understood by + the C call-out mechanism." + + ^self asFloatD + ] + asFloatD [ "Answer the receiver, converted to a FloatD" diff -rNu smalltalk-3.0.2/kernel/SmallInt.st smalltalk-3.0.3/kernel/SmallInt.st --- smalltalk-3.0.2/kernel/SmallInt.st 2008-01-24 13:21:21.000000000 +0100 +++ smalltalk-3.0.3/kernel/SmallInt.st 2008-04-25 07:21:26.000000000 +0200 @@ -364,6 +364,13 @@ ifTrue: [(LargeInteger fromInteger: self) bitShift: arg] ] + asCNumber [ + "Convert the receiver to a kind of number that is understood by + the C call-out mechanism." + + ^self + ] + asFloatD [ "Convert the receiver to a FloatD, answer the result" diff -rNu smalltalk-3.0.2/lib-src/ChangeLog smalltalk-3.0.3/lib-src/ChangeLog --- smalltalk-3.0.2/lib-src/ChangeLog 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/lib-src/ChangeLog 2008-05-14 12:02:32.000000000 +0200 @@ -1,3 +1,9 @@ +2008-04-15 Paolo Bonzini + + * lib-src/tanl.c (kernel_tanl): Rename flag to invert, initialize it + to 0. + * lib-src/trigl.c (ieee754_rem_pio2l): Fix range checks. + 2007-12-31 Tony Garnock-Jones Paolo Bonzini diff -rNu smalltalk-3.0.2/lib-src/Makefile.in smalltalk-3.0.3/lib-src/Makefile.in --- smalltalk-3.0.2/lib-src/Makefile.in 2008-03-07 11:54:38.000000000 +0100 +++ smalltalk-3.0.3/lib-src/Makefile.in 2008-05-14 12:04:44.000000000 +0200 @@ -148,6 +148,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -160,10 +162,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -178,12 +180,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ diff -rNu smalltalk-3.0.2/lib-src/tanl.c smalltalk-3.0.3/lib-src/tanl.c --- smalltalk-3.0.2/lib-src/tanl.c 2008-01-09 18:20:46.000000000 +0100 +++ smalltalk-3.0.3/lib-src/tanl.c 2008-04-25 07:21:26.000000000 +0200 @@ -123,7 +123,7 @@ kernel_tanl (long double x, long double y, int iy) { long double z, r, v, w, s, u, u1; - int flag, sign; + int invert = 0, sign; sign = 1; if (x < 0) @@ -145,7 +145,7 @@ } if (x >= 0.6743316650390625) /* |x| >= 0.6743316650390625 */ { - flag = 1; + invert = 1; z = pio4hi - x; w = pio4lo - y; @@ -161,7 +161,7 @@ r = y + z * (s * r + y); r += TH * s; w = x + r; - if (flag) + if (invert) { v = (long double) iy; w = (v - 2.0 * (x - (w * w / (w + v) - r))); diff -rNu smalltalk-3.0.2/lib-src/trigl.c smalltalk-3.0.3/lib-src/trigl.c --- smalltalk-3.0.2/lib-src/trigl.c 2008-01-09 18:20:46.000000000 +0100 +++ smalltalk-3.0.3/lib-src/trigl.c 2008-04-25 07:21:26.000000000 +0200 @@ -205,7 +205,7 @@ int exp, n; if (x >= -0.78539816339744830961566084581987572104929234984377 - && x < 0.78539816339744830961566084581987572104929234984377) + && x <= 0.78539816339744830961566084581987572104929234984377) /* x in <-pi/4, pi/4> */ { y[0] = x; @@ -213,9 +213,7 @@ return 0; } - if (x >= 2.35619449019234492884698253745962716314787704953131 - && x < 2.35619449019234492884698253745962716314787704953131) - if (x > 0) + if (x > 0 && x < 2.35619449019234492884698253745962716314787704953131) { /* 113 + 93 bit PI is ok */ z = x - PI_2_1; @@ -223,7 +221,8 @@ y[1] = (z - y[0]) - PI_2_1t; return 1; } - else + + if (x < 0 && x > -2.35619449019234492884698253745962716314787704953131) { /* 113 + 93 bit PI is ok */ z = x + PI_2_1; diff -rNu smalltalk-3.0.2/libffi/ChangeLog smalltalk-3.0.3/libffi/ChangeLog --- smalltalk-3.0.2/libffi/ChangeLog 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/ChangeLog 2008-04-10 11:10:57.000000000 +0200 @@ -1,3 +1,645 @@ +2008-01-24 David Edelsohn + + * configure: Regenerate. + +2008-01-06 Andreas Tobler + + * src/x86/ffi.c (ffi_prep_cif_machdep): Fix thinko. + +2008-01-05 Andreas Tobler + + PR testsuite/32843 + * src/x86/ffi.c (ffi_prep_cif_machdep): Add code for + signed/unsigned int8/16 for X86_DARWIN. + Updated copyright info. + Handle one and two byte structs with special cif->flags. + * src/x86/ffitarget.h: Add special types for one and two byte structs. + Updated copyright info. + * src/x86/darwin.S (ffi_call_SYSV): Rewrite to use a jump table like + sysv.S + Remove code to pop args from the stack after call. + Special-case signed/unsigned for int8/16, one and two byte structs. + (ffi_closure_raw_SYSV): Handle FFI_TYPE_UINT8, + FFI_TYPE_SINT8, FFI_TYPE_UINT16, FFI_TYPE_SINT16, FFI_TYPE_UINT32, + FFI_TYPE_SINT32. + Updated copyright info. + +2007-12-08 David Daney + + * src/mips/n32.S (ffi_call_N32): Replace dadd with ADDU, dsub with + SUBU, add with ADDU and use smaller code sequences. + +2007-12-07 David Daney + + * src/mips/ffi.c (ffi_prep_cif_machdep): Handle long double return + type. + +2007-12-06 David Daney + + * include/ffi.h.in (FFI_SIZEOF_JAVA_RAW): Define if not already + defined. + (ffi_java_raw): New typedef. + (ffi_java_raw_call, ffi_java_ptrarray_to_raw, + ffi_java_raw_to_ptrarray): Change parameter types from ffi_raw to + ffi_java_raw. + (ffi_java_raw_closure) : Same. + (ffi_prep_java_raw_closure, ffi_prep_java_raw_closure_loc): Change + parameter types. + * src/java_raw_api.c (ffi_java_raw_size): Replace FFI_SIZEOF_ARG with + FFI_SIZEOF_JAVA_RAW. + (ffi_java_raw_to_ptrarray): Change type of raw to ffi_java_raw. + Replace FFI_SIZEOF_ARG with FFI_SIZEOF_JAVA_RAW. Use + sizeof(ffi_java_raw) for alignment calculations. + (ffi_java_ptrarray_to_raw): Same. + (ffi_java_rvalue_to_raw): Add special handling for FFI_TYPE_POINTER + if FFI_SIZEOF_JAVA_RAW == 4. + (ffi_java_raw_to_rvalue): Same. + (ffi_java_raw_call): Change type of raw to ffi_java_raw. + (ffi_java_translate_args): Same. + (ffi_prep_java_raw_closure_loc, ffi_prep_java_raw_closure): Change + parameter types. + * src/mips/ffitarget.h (FFI_SIZEOF_JAVA_RAW): Define for N32 ABI. + +2007-12-06 David Daney + + * src/mips/n32.S (ffi_closure_N32): Use 64-bit add instruction on + pointer values. + +2007-12-01 Andreas Tobler + + PR libffi/31937 + * src/powerpc/ffitarget.h: Introduce new ABI FFI_LINUX_SOFT_FLOAT. + Add local FFI_TYPE_UINT128 to handle soft-float long-double-128. + * src/powerpc/ffi.c: Distinguish between __NO_FPRS__ and not and + set the NUM_FPR_ARG_REGISTERS according to. + Add support for potential soft-float support under hard-float + architecture. + (ffi_prep_args_SYSV): Set NUM_FPR_ARG_REGISTERS to 0 in case of + FFI_LINUX_SOFT_FLOAT, handle float, doubles and long-doubles according + to the FFI_LINUX_SOFT_FLOAT ABI. + (ffi_prep_cif_machdep): Likewise. + (ffi_closure_helper_SYSV): Likewise. + * src/powerpc/ppc_closure.S: Make sure not to store float/double + on archs where __NO_FPRS__ is true. + Add FFI_TYPE_UINT128 support. + * src/powerpc/sysv.S: Add support for soft-float long-double-128. + Adjust copyright notice. + +2007-11-25 Andreas Tobler + + * src/closures.c: Move defintion of MAYBE_UNUSED from here to ... + * include/ffi_common.h: ... here. + Update copyright. + +2007-11-17 Andreas Tobler + + * src/powerpc/sysv.S: Load correct cr to compare if we have long double. + * src/powerpc/linux64.S: Likewise. + * src/powerpc/ffi.c: Add a comment to show which part goes into cr6. + * testsuite/libffi.call/return_ldl.c: New test. + +2007-09-04 + + * src/arm/sysv.S (UNWIND): New. + (Whole file): Conditionally compile unwinder directives. + * src/arm/sysv.S: Add unwinder directives. + + * src/arm/ffi.c (ffi_prep_args): Align structs by at least 4 bytes. + Only treat r0 as a struct address if we're actually returning a + struct by address. + Only copy the bytes that are actually within a struct. + (ffi_prep_cif_machdep): A Composite Type not larger than 4 bytes + is returned in r0, not passed by address. + (ffi_call): Allocate a word-sized temporary for the case where + a composite is returned in r0. + (ffi_prep_incoming_args_SYSV): Align as necessary. + +2007-08-05 Steven Newbury + + * src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Use __clear_cache instead of + directly using the sys_cacheflush syscall. + +2007-07-27 Andrew Haley + + * src/arm/sysv.S (ffi_closure_SYSV): Add soft-float. + +2007-09-03 Maciej W. Rozycki + + * Makefile.am: Unify MIPS_IRIX and MIPS_LINUX into MIPS. + * configure.ac: Likewise. + * Makefile.in: Regenerate. + * include/Makefile.in: Likewise. + * testsuite/Makefile.in: Likewise. + * configure: Likewise. + +2007-08-24 David Daney + + * testsuite/libffi.call/return_sl.c: New test. + +2007-08-10 David Daney + + * testsuite/libffi.call/cls_multi_ushort.c, + testsuite/libffi.call/cls_align_uint16.c, + testsuite/libffi.call/nested_struct1.c, + testsuite/libffi.call/nested_struct3.c, + testsuite/libffi.call/cls_7_1_byte.c, + testsuite/libffi.call/nested_struct5.c, + testsuite/libffi.call/cls_double.c, + testsuite/libffi.call/nested_struct7.c, + testsuite/libffi.call/cls_sint.c, + testsuite/libffi.call/nested_struct9.c, + testsuite/libffi.call/cls_20byte1.c, + testsuite/libffi.call/cls_multi_sshortchar.c, + testsuite/libffi.call/cls_align_sint64.c, + testsuite/libffi.call/cls_3byte2.c, + testsuite/libffi.call/cls_multi_schar.c, + testsuite/libffi.call/cls_multi_uchar.c, + testsuite/libffi.call/cls_19byte.c, + testsuite/libffi.call/cls_9byte1.c, + testsuite/libffi.call/cls_align_float.c, + testsuite/libffi.call/closure_fn1.c, + testsuite/libffi.call/problem1.c, + testsuite/libffi.call/closure_fn3.c, + testsuite/libffi.call/cls_sshort.c, + testsuite/libffi.call/closure_fn5.c, + testsuite/libffi.call/cls_align_double.c, + testsuite/libffi.call/nested_struct.c, + testsuite/libffi.call/cls_2byte.c, + testsuite/libffi.call/nested_struct10.c, + testsuite/libffi.call/cls_4byte.c, + testsuite/libffi.call/cls_6byte.c, + testsuite/libffi.call/cls_8byte.c, + testsuite/libffi.call/cls_multi_sshort.c, + testsuite/libffi.call/cls_align_sint16.c, + testsuite/libffi.call/cls_align_uint32.c, + testsuite/libffi.call/cls_20byte.c, + testsuite/libffi.call/cls_float.c, + testsuite/libffi.call/nested_struct2.c, + testsuite/libffi.call/cls_5_1_byte.c, + testsuite/libffi.call/nested_struct4.c, + testsuite/libffi.call/cls_24byte.c, + testsuite/libffi.call/nested_struct6.c, + testsuite/libffi.call/cls_64byte.c, + testsuite/libffi.call/nested_struct8.c, + testsuite/libffi.call/cls_uint.c, + testsuite/libffi.call/cls_multi_ushortchar.c, + testsuite/libffi.call/cls_schar.c, + testsuite/libffi.call/cls_uchar.c, + testsuite/libffi.call/cls_align_uint64.c, + testsuite/libffi.call/cls_ulonglong.c, + testsuite/libffi.call/cls_align_longdouble.c, + testsuite/libffi.call/cls_1_1byte.c, + testsuite/libffi.call/cls_12byte.c, + testsuite/libffi.call/cls_3_1byte.c, + testsuite/libffi.call/cls_3byte1.c, + testsuite/libffi.call/cls_4_1byte.c, + testsuite/libffi.call/cls_6_1_byte.c, + testsuite/libffi.call/cls_16byte.c, + testsuite/libffi.call/cls_18byte.c, + testsuite/libffi.call/closure_fn0.c, + testsuite/libffi.call/cls_9byte2.c, + testsuite/libffi.call/closure_fn2.c, + testsuite/libffi.call/closure_fn4.c, + testsuite/libffi.call/cls_ushort.c, + testsuite/libffi.call/closure_fn6.c, + testsuite/libffi.call/cls_5byte.c, + testsuite/libffi.call/cls_align_pointer.c, + testsuite/libffi.call/cls_7byte.c, + testsuite/libffi.call/cls_align_sint32.c, + testsuite/libffi.special/unwindtest_ffi_call.cc, + testsuite/libffi.special/unwindtest.cc: Remove xfail for mips64*-*-*. + +2007-08-10 David Daney + + PR libffi/28313 + * configure.ac: Don't treat mips64 as a special case. + * Makefile.am (nodist_libffi_la_SOURCES): Add n32.S. + * configure: Regenerate + * Makefile.in: Ditto. + * fficonfig.h.in: Ditto. + * src/mips/ffitarget.h (REG_L, REG_S, SUBU, ADDU, SRL, LI): Indent. + (LA, EH_FRAME_ALIGN, FDE_ADDR_BYTES): New preprocessor macros. + (FFI_DEFAULT_ABI): Set for n64 case. + (FFI_CLOSURES, FFI_TRAMPOLINE_SIZE): Define for n32 and n64 cases. + * src/mips/n32.S (ffi_call_N32): Add debug macros and labels for FDE. + (ffi_closure_N32): New function. + (.eh_frame): New section + * src/mips/o32.S: Clean up comments. + (ffi_closure_O32): Pass ffi_closure parameter in $12. + * src/mips/ffi.c: Use FFI_MIPS_N32 instead of + _MIPS_SIM == _ABIN32 throughout. + (FFI_MIPS_STOP_HERE): New, use in place of + ffi_stop_here. + (ffi_prep_args): Use unsigned long to hold pointer values. Rewrite + to support n32/n64 ABIs. + (calc_n32_struct_flags): Rewrite. + (calc_n32_return_struct_flags): Remove unused variable. Reverse + position of flag bits. + (ffi_prep_cif_machdep): Rewrite n32 portion. + (ffi_call): Enable for n64. Add special handling for small structure + return values. + (ffi_prep_closure_loc): Add n32 and n64 support. + (ffi_closure_mips_inner_O32): Add cast to silence warning. + (copy_struct_N32, ffi_closure_mips_inner_N32): New functions. + +2007-08-08 David Daney + + * testsuite/libffi.call/ffitest.h (ffi_type_mylong): Remove definition. + * testsuite/libffi.call/cls_align_uint16.c (main): Use correct type + specifiers. + * testsuite/libffi.call/nested_struct1.c (main): Ditto. + * testsuite/libffi.call/cls_sint.c (main): Ditto. + * testsuite/libffi.call/nested_struct9.c (main): Ditto. + * testsuite/libffi.call/cls_20byte1.c (main): Ditto. + * testsuite/libffi.call/cls_9byte1.c (main): Ditto. + * testsuite/libffi.call/closure_fn1.c (main): Ditto. + * testsuite/libffi.call/closure_fn3.c (main): Ditto. + * testsuite/libffi.call/return_dbl2.c (main): Ditto. + * testsuite/libffi.call/cls_sshort.c (main): Ditto. + * testsuite/libffi.call/return_fl3.c (main): Ditto. + * testsuite/libffi.call/closure_fn5.c (main): Ditto. + * testsuite/libffi.call/nested_struct.c (main): Ditto. + * testsuite/libffi.call/nested_struct10.c (main): Ditto. + * testsuite/libffi.call/return_ll1.c (main): Ditto. + * testsuite/libffi.call/cls_8byte.c (main): Ditto. + * testsuite/libffi.call/cls_align_uint32.c (main): Ditto. + * testsuite/libffi.call/cls_align_sint16.c (main): Ditto. + * testsuite/libffi.call/cls_20byte.c (main): Ditto. + * testsuite/libffi.call/nested_struct2.c (main): Ditto. + * testsuite/libffi.call/cls_24byte.c (main): Ditto. + * testsuite/libffi.call/nested_struct6.c (main): Ditto. + * testsuite/libffi.call/cls_uint.c (main): Ditto. + * testsuite/libffi.call/cls_12byte.c (main): Ditto. + * testsuite/libffi.call/cls_16byte.c (main): Ditto. + * testsuite/libffi.call/closure_fn0.c (main): Ditto. + * testsuite/libffi.call/cls_9byte2.c (main): Ditto. + * testsuite/libffi.call/closure_fn2.c (main): Ditto. + * testsuite/libffi.call/return_dbl1.c (main): Ditto. + * testsuite/libffi.call/closure_fn4.c (main): Ditto. + * testsuite/libffi.call/closure_fn6.c (main): Ditto. + * testsuite/libffi.call/cls_align_sint32.c (main): Ditto. + +2007-08-07 Andrew Haley + + * src/x86/sysv.S (ffi_closure_raw_SYSV): Fix typo in previous + checkin. + +2007-08-06 Andrew Haley + + PR testsuite/32843 + * src/x86/sysv.S (ffi_closure_raw_SYSV): Handle FFI_TYPE_UINT8, + FFI_TYPE_SINT8, FFI_TYPE_UINT16, FFI_TYPE_SINT16, FFI_TYPE_UINT32, + FFI_TYPE_SINT32. + +2007-08-02 David Daney + + * testsuite/libffi.call/return_ul.c (main): Define return type as + ffi_arg. Use proper printf conversion specifier. + +2007-07-30 Andrew Haley + + PR testsuite/32843 + * src/x86/ffi.c (ffi_prep_cif_machdep): in x86 case, add code for + signed/unsigned int8/16. + * src/x86/sysv.S (ffi_call_SYSV): Rewrite to: + Use a jump table. + Remove code to pop args from the stack after call. + Special-case signed/unsigned int8/16. + * testsuite/libffi.call/return_sc.c (main): Revert. + +2007-07-26 Richard Guenther + + PR testsuite/32843 + * testsuite/libffi.call/return_sc.c (main): Verify call + result as signed char, not ffi_arg. + +2007-07-16 Rainer Orth + + * configure.ac (i?86-*-solaris2.1[0-9]): Set TARGET to X86_64. + * configure: Regenerate. + +2007-07-11 David Daney + + * src/mips/ffi.c: Don't include sys/cachectl.h. + (ffi_prep_closure_loc): Use __builtin___clear_cache() instead of + cacheflush(). + +2007-05-18 Aurelien Jarno + + * src/arm/ffi.c (ffi_prep_closure_loc): Renamed and ajusted + from (ffi_prep_closure): ... this. + (FFI_INIT_TRAMPOLINE): Adjust. + +2005-12-31 Phil Blundell + + * src/arm/ffi.c (ffi_prep_incoming_args_SYSV, + ffi_closure_SYSV_inner, ffi_prep_closure): New, add closure support. + * src/arm/sysv.S(ffi_closure_SYSV): Likewise. + * src/arm/ffitarget.h (FFI_TRAMPOLINE_SIZE): Likewise. + (FFI_CLOSURES): Enable closure support. + +2007-07-03 Andrew Haley + + * testsuite/libffi.call/cls_multi_ushort.c, + testsuite/libffi.call/cls_align_uint16.c, + testsuite/libffi.call/nested_struct1.c, + testsuite/libffi.call/nested_struct3.c, + testsuite/libffi.call/cls_7_1_byte.c, + testsuite/libffi.call/cls_double.c, + testsuite/libffi.call/nested_struct5.c, + testsuite/libffi.call/nested_struct7.c, + testsuite/libffi.call/cls_sint.c, + testsuite/libffi.call/nested_struct9.c, + testsuite/libffi.call/cls_20byte1.c, + testsuite/libffi.call/cls_multi_sshortchar.c, + testsuite/libffi.call/cls_align_sint64.c, + testsuite/libffi.call/cls_3byte2.c, + testsuite/libffi.call/cls_multi_schar.c, + testsuite/libffi.call/cls_multi_uchar.c, + testsuite/libffi.call/cls_19byte.c, + testsuite/libffi.call/cls_9byte1.c, + testsuite/libffi.call/cls_align_float.c, + testsuite/libffi.call/closure_fn1.c, + testsuite/libffi.call/problem1.c, + testsuite/libffi.call/closure_fn3.c, + testsuite/libffi.call/cls_sshort.c, + testsuite/libffi.call/closure_fn5.c, + testsuite/libffi.call/cls_align_double.c, + testsuite/libffi.call/cls_2byte.c, + testsuite/libffi.call/nested_struct.c, + testsuite/libffi.call/nested_struct10.c, + testsuite/libffi.call/cls_4byte.c, + testsuite/libffi.call/cls_6byte.c, + testsuite/libffi.call/cls_8byte.c, + testsuite/libffi.call/cls_multi_sshort.c, + testsuite/libffi.call/cls_align_uint32.c, + testsuite/libffi.call/cls_align_sint16.c, + testsuite/libffi.call/cls_float.c, + testsuite/libffi.call/cls_20byte.c, + testsuite/libffi.call/cls_5_1_byte.c, + testsuite/libffi.call/nested_struct2.c, + testsuite/libffi.call/cls_24byte.c, + testsuite/libffi.call/nested_struct4.c, + testsuite/libffi.call/nested_struct6.c, + testsuite/libffi.call/cls_64byte.c, + testsuite/libffi.call/nested_struct8.c, + testsuite/libffi.call/cls_uint.c, + testsuite/libffi.call/cls_multi_ushortchar.c, + testsuite/libffi.call/cls_schar.c, + testsuite/libffi.call/cls_uchar.c, + testsuite/libffi.call/cls_align_uint64.c, + testsuite/libffi.call/cls_ulonglong.c, + testsuite/libffi.call/cls_align_longdouble.c, + testsuite/libffi.call/cls_1_1byte.c, + testsuite/libffi.call/cls_12byte.c, + testsuite/libffi.call/cls_3_1byte.c, + testsuite/libffi.call/cls_3byte1.c, + testsuite/libffi.call/cls_4_1byte.c, + testsuite/libffi.call/cls_6_1_byte.c, + testsuite/libffi.call/cls_16byte.c, + testsuite/libffi.call/cls_18byte.c, + testsuite/libffi.call/closure_fn0.c, + testsuite/libffi.call/cls_9byte2.c, + testsuite/libffi.call/closure_fn2.c, + testsuite/libffi.call/closure_fn4.c, + testsuite/libffi.call/cls_ushort.c, + testsuite/libffi.call/closure_fn6.c, + testsuite/libffi.call/cls_5byte.c, + testsuite/libffi.call/cls_align_pointer.c, + testsuite/libffi.call/cls_7byte.c, + testsuite/libffi.call/cls_align_sint32.c, + testsuite/libffi.special/unwindtest_ffi_call.cc, + testsuite/libffi.special/unwindtest.cc: Enable for ARM. + +2007-07-05 H.J. Lu + + * aclocal.m4: Regenerated. + +2007-06-02 Paolo Bonzini + + * configure: Regenerate. + +2007-05-23 Steve Ellcey + + * Makefile.in: Regenerate. + * configure: Regenerate. + * aclocal.m4: Regenerate. + * include/Makefile.in: Regenerate. + * testsuite/Makefile.in: Regenerate. + +2007-05-10 Roman Zippel + + * src/m68k/ffi.c (ffi_prep_incoming_args_SYSV, + ffi_closure_SYSV_inner,ffi_prep_closure): New, add closure support. + * src/m68k/sysv.S(ffi_closure_SYSV,ffi_closure_struct_SYSV): Likewise. + * src/m68k/ffitarget.h (FFI_TRAMPOLINE_SIZE): Likewise. + (FFI_CLOSURES): Enable closure support. + +2007-05-10 Roman Zippel + + * configure.ac (HAVE_AS_CFI_PSEUDO_OP): New test. + * configure: Regenerate. + * fficonfig.h.in: Regenerate. + * src/m68k/sysv.S (CFI_STARTPROC,CFI_ENDPROC, + CFI_OFFSET,CFI_DEF_CFA): New macros. + (ffi_call_SYSV): Add callframe annotation. + +2007-05-10 Roman Zippel + + * src/m68k/ffi.c (ffi_prep_args,ffi_prep_cif_machdep): Fix + numerous test suite failures. + * src/m68k/sysv.S (ffi_call_SYSV): Likewise. + +2007-04-11 Paolo Bonzini + + * Makefile.am (EXTRA_DIST): Bring up to date. + * Makefile.in: Regenerate. + * src/frv/eabi.S: Remove RCS keyword. + +2007-04-06 Richard Henderson + + * configure.ac: Tidy target case. + (HAVE_LONG_DOUBLE): Allow the target to override. + * configure: Regenerate. + * include/ffi.h.in: Don't define ffi_type_foo if + LIBFFI_HIDE_BASIC_TYPES is defined. + (ffi_type_longdouble): If not HAVE_LONG_DOUBLE, define + to ffi_type_double. + * types.c (LIBFFI_HIDE_BASIC_TYPES): Define. + (FFI_TYPEDEF, ffi_type_void): Mark the data const. + (ffi_type_longdouble): Special case for Alpha. Don't define + if long double == double. + + * src/alpha/ffi.c (FFI_TYPE_LONGDOUBLE): Assert unique value. + (ffi_prep_cif_machdep): Handle it as the 128-bit type. + (ffi_call, ffi_closure_osf_inner): Likewise. + (ffi_closure_osf_inner): Likewise. Mark hidden. + (ffi_call_osf, ffi_closure_osf): Mark hidden. + * src/alpha/ffitarget.h (FFI_LAST_ABI): Tidy definition. + * src/alpha/osf.S (ffi_call_osf, ffi_closure_osf): Mark hidden. + (load_table): Handle 128-bit long double. + + * testsuite/libffi.call/float4.c: Add -mieee for alpha. + +2007-04-06 Tom Tromey + + PR libffi/31491: + * README: Fixed bug in example. + +2007-04-03 Jakub Jelinek + + * src/closures.c: Include sys/statfs.h. + (_GNU_SOURCE): Define on Linux. + (FFI_MMAP_EXEC_SELINUX): Define. + (selinux_enabled): New variable. + (selinux_enabled_check): New function. + (is_selinux_enabled): Define. + (dlmmap): Use it. + +2007-03-24 Uros Bizjak + + * testsuite/libffi.call/return_fl2.c (return_fl): Mark as static. + Use 'volatile float sum' to create sum of floats to avoid false + negative due to excess precision on ix86 targets. + (main): Ditto. + +2007-03-08 Alexandre Oliva + + * src/powerpc/ffi.c (flush_icache): Fix left-over from previous + patch. + (ffi_prep_closure_loc): Remove unneeded casts. Add needed ones. + +2007-03-07 Alexandre Oliva + + * include/ffi.h.in (ffi_closure_alloc, ffi_closure_free): New. + (ffi_prep_closure_loc): New. + (ffi_prep_raw_closure_loc): New. + (ffi_prep_java_raw_closure_loc): New. + * src/closures.c: New file. + * src/dlmalloc.c [FFI_MMAP_EXEC_WRIT] (struct malloc_segment): + Replace sflags with exec_offset. + [FFI_MMAP_EXEC_WRIT] (mmap_exec_offset, add_segment_exec_offset, + sub_segment_exec_offset): New macros. + (get_segment_flags, set_segment_flags, check_segment_merge): New + macros. + (is_mmapped_segment, is_extern_segment): Use get_segment_flags. + (add_segment, sys_alloc, create_mspace, create_mspace_with_base, + destroy_mspace): Use new macros. + (sys_alloc): Silence warning. + * Makefile.am (libffi_la_SOURCES): Add src/closures.c. + * Makefile.in: Rebuilt. + * src/prep_cif [FFI_CLOSURES] (ffi_prep_closure): Implement in + terms of ffi_prep_closure_loc. + * src/raw_api.c (ffi_prep_raw_closure_loc): Renamed and adjusted + from... + (ffi_prep_raw_closure): ... this. Re-implement in terms of the + renamed version. + * src/java_raw_api (ffi_prep_java_raw_closure_loc): Renamed and + adjusted from... + (ffi_prep_java_raw_closure): ... this. Re-implement in terms of + the renamed version. + * src/alpha/ffi.c (ffi_prep_closure_loc): Renamed from + (ffi_prep_closure): ... this. + * src/pa/ffi.c: Likewise. + * src/cris/ffi.c: Likewise. Adjust. + * src/frv/ffi.c: Likewise. + * src/ia64/ffi.c: Likewise. + * src/mips/ffi.c: Likewise. + * src/powerpc/ffi_darwin.c: Likewise. + * src/s390/ffi.c: Likewise. + * src/sh/ffi.c: Likewise. + * src/sh64/ffi.c: Likewise. + * src/sparc/ffi.c: Likewise. + * src/x86/ffi64.c: Likewise. + * src/x86/ffi.c: Likewise. + (FFI_INIT_TRAMPOLINE): Adjust. + (ffi_prep_raw_closure_loc): Renamed and adjusted from... + (ffi_prep_raw_closure): ... this. + * src/powerpc/ffi.c (ffi_prep_closure_loc): Renamed from + (ffi_prep_closure): ... this. + (flush_icache): Adjust. + +2007-03-07 Alexandre Oliva + + * src/dlmalloc.c: New file, imported version 2.8.3 of Doug + Lea's malloc. + +2007-03-01 Brooks Moses + + * Makefile.am: Add dummy install-pdf target. + * Makefile.in: Regenerate + +2007-02-13 Andreas Krebbel + + * src/s390/ffi.c (ffi_prep_args, ffi_prep_cif_machdep, + ffi_closure_helper_SYSV): Add long double handling. + +2007-02-02 Jakub Jelinek + + * src/powerpc/linux64.S (ffi_call_LINUX64): Move restore of r2 + immediately after bctrl instruction. + +2007-01-18 Alexandre Oliva + + * Makefile.am (all-recursive, install-recursive, + mostlyclean-recursive, clean-recursive, distclean-recursive, + maintainer-clean-recursive): Add missing targets. + * Makefile.in: Rebuilt. + +2006-12-14 Andreas Tobler + + * configure.ac: Add TARGET for x86_64-*-darwin*. + * Makefile.am (nodist_libffi_la_SOURCES): Add rules for 64-bit sources + for X86_DARWIN. + * src/x86/ffitarget.h: Set trampoline size for x86_64-*-darwin*. + * src/x86/darwin64.S: New file for x86_64-*-darwin* support. + * configure: Regenerate. + * Makefile.in: Regenerate. + * include/Makefile.in: Regenerate. + * testsuite/Makefile.in: Regenerate. + * testsuite/libffi.special/unwindtest_ffi_call.cc: New test case for + ffi_call only. + +2006-12-13 Andreas Tobler + + * aclocal.m4: Regenerate with aclocal -I .. as written in the + Makefile.am. + +2006-10-31 Geoffrey Keating + + * src/powerpc/ffi_darwin.c (darwin_adjust_aggregate_sizes): New. + (ffi_prep_cif_machdep): Call darwin_adjust_aggregate_sizes for + Darwin. + * testsuite/libffi.call/nested_struct4.c: Remove Darwin XFAIL. + * testsuite/libffi.call/nested_struct6.c: Remove Darwin XFAIL. + +2006-10-10 Paolo Bonzini + Sandro Tolaini + + * configure.ac [i*86-*-darwin*]: Set X86_DARWIN symbol and + conditional. + * configure: Regenerated. + * Makefile.am (nodist_libffi_la_SOURCES) [X86_DARWIN]: New case. + (EXTRA_DIST): Add src/x86/darwin.S. + * Makefile.in: Regenerated. + * include/Makefile.in: Regenerated. + * testsuite/Makefile.in: Regenerated. + + * src/x86/ffi.c (ffi_prep_cif_machdep) [X86_DARWIN]: Treat like + X86_WIN32, and additionally align stack to 16 bytes. + * src/x86/darwin.S: New, based on sysv.S. + * src/prep_cif.c (ffi_prep_cif) [X86_DARWIN]: Align > 8-byte structs. + +2006-09-12 David Daney + + PR libffi/23935 + * include/Makefile.am: Install both ffi.h and ffitarget.h in + $(libdir)/gcc/$(target_alias)/$(gcc_version)/include. + * aclocal.m4: Regenerated for automake 1.9.6. + * Makefile.in: Regenerated. + * include/Makefile.in: Regenerated. + * testsuite/Makefile.in: Regenerated. + 2006-08-17 Andreas Tobler * include/ffi_common.h (struct): Revert accidental commit. diff -rNu smalltalk-3.0.2/libffi/ChangeLog.libffi smalltalk-3.0.3/libffi/ChangeLog.libffi --- smalltalk-3.0.2/libffi/ChangeLog.libffi 1970-01-01 01:00:00.000000000 +0100 +++ smalltalk-3.0.3/libffi/ChangeLog.libffi 2008-04-10 11:10:57.000000000 +0200 @@ -0,0 +1,249 @@ +2008-02-24 Anthony Green + + * configure.ac: Accept openbsd*, not just openbsd. + Bump version to 3.0.4. + * configure, doc/stamp-vti, doc/version.texi: Rebuilt. + * libtool-version: Increment revision. + * README: Update for new release. + +2008-02-22 Anthony Green + + * README: Clean up list of tested platforms. + +2008-02-22 Anthony Green + + * configure.ac: Bump version to 3.0.3. + * configure, doc/stamp-vti, doc/version.texi: Rebuilt. + * libtool-version: Increment revision. + * README: Update for new release. Clean up test docs. + +2008-02-22 Bjoern Koenig + Andreas Tobler + + * configure.ac: Add amd64-*-freebsd* target. + * configure: Regenerate. + +2008-02-22 Thomas Heller + + * configure.ac: Add x86 OpenBSD support. + * configure: Rebuilt. + +2008-02-21 Thomas Heller + + * README: Change "make test" to "make check". + +2008-02-21 Anthony Green + + * configure.ac: Bump version to 3.0.2. + * configure, doc/stamp-vti, doc/version.texi: Rebuilt. + * libtool-version: Increment revision. + * README: Update for new release. + +2008-02-21 Björn König + + * src/x86/freebsd.S: New file. + * configure.ac: Add x86 FreeBSD support. + * Makefile.am: Ditto. + +2008-02-15 Anthony Green + + * configure.ac: Bump version to 3.0.1. + * configure, doc/stamp-vti, doc/version.texi: Rebuilt. + * libtool-version: Increment revision. + * README: Update for new release. + +2008-02-15 David Daney + + * src/mips/ffi.c: Remove extra '>' from include directive. + (ffi_prep_closure_loc): Use clear_location instead of tramp. + +2008-02-15 Anthony Green + + * configure.ac: Bump version to 3.0.0. + * configure, doc/stamp-vti, doc/version.texi: Rebuilt. + +2008-02-15 David Daney + + * src/mips/ffi.c (USE__BUILTIN___CLEAR_CACHE): + Define (conditionally), and use it to include cachectl.h. + (ffi_prep_closure_loc): Fix cache flushing. + * src/mips/ffitarget.h (_ABIN32, _ABI64, _ABIO32): Define. + +2008-02-15 Anthony Green + + * man/ffi_call.3, man/ffi_prep_cif.3, man/ffi.3: + Update dates and remove all references to ffi_prep_closure. + * configure.ac: Bump version to 2.99.9. + * configure, doc/stamp-vti, doc/version.texi: Rebuilt. + +2008-02-15 Anthony Green + + * man/ffi_prep_closure.3: Delete. + * man/Makefile.am (EXTRA_DIST): Remove ffi_prep_closure.3. + (man_MANS): Ditto. + * man/Makefile.in: Rebuilt. + * configure.ac: Bump version to 2.99.8. + * configure, doc/stamp-vti, doc/version.texi: Rebuilt. + +2008-02-14 Anthony Green + + * configure.ac: Bump version to 2.99.7. + * configure, doc/stamp-vti, doc/version.texi: Rebuilt. + * include/ffi.h.in LICENSE src/debug.c src/closures.c + src/ffitest.c src/s390/sysv.S src/s390/ffitarget.h + src/types.c src/m68k/ffitarget.h src/raw_api.c src/frv/ffi.c + src/frv/ffitarget.h src/sh/ffi.c src/sh/sysv.S + src/sh/ffitarget.h src/powerpc/ffitarget.h src/pa/ffi.c + src/pa/ffitarget.h src/pa/linux.S src/java_raw_api.c + src/cris/ffitarget.h src/x86/ffi.c src/x86/sysv.S + src/x86/unix64.S src/x86/win32.S src/x86/ffitarget.h + src/x86/ffi64.c src/x86/darwin.S src/ia64/ffi.c + src/ia64/ffitarget.h src/ia64/ia64_flags.h src/ia64/unix.S + src/sparc/ffi.c src/sparc/v9.S src/sparc/ffitarget.h + src/sparc/v8.S src/alpha/ffi.c src/alpha/ffitarget.h + src/alpha/osf.S src/sh64/ffi.c src/sh64/sysv.S + src/sh64/ffitarget.h src/mips/ffi.c src/mips/ffitarget.h + src/mips/n32.S src/mips/o32.S src/arm/ffi.c src/arm/sysv.S + src/arm/ffitarget.h src/prep_cif.c: Update license text. + +2008-02-14 Anthony Green + + * README: Update tested platforms. + * configure.ac: Bump version to 2.99.6. + * configure: Rebuilt. + +2008-02-14 Anthony Green + + * configure.ac: Bump version to 2.99.5. + * configure: Rebuilt. + * Makefile.am (EXTRA_DIST): Add darwin64.S + * Makefile.in: Rebuilt. + * testsuite/lib/libffi-dg.exp: Remove libstdc++ bits from GCC tree. + * LICENSE: Update WARRANTY. + +2008-02-14 Anthony Green + + * libffi.pc.in (libdir): Fix libdir definition. + * configure.ac: Bump version to 2.99.4. + * configure: Rebuilt. + +2008-02-14 Anthony Green + + * README: Update. + * libffi.info: New file. + * doc/stamp-vti: New file. + * configure.ac: Bump version to 2.99.3. + * configure: Rebuilt. + +2008-02-14 Anthony Green + + * Makefile.am (SUBDIRS): Add man dir. + * Makefile.in: Rebuilt. + * configure.ac: Create Makefile. + * configure: Rebuilt. + * man/ffi_call.3 man/ffi_prep_cif.3 man/ffi_prep_closure.3 + man/Makefile.am man/Makefile.in: New files. + +2008-02-14 Tom Tromey + + * aclocal.m4, Makefile.in, configure, fficonfig.h.in: Rebuilt. + * mdate-sh, texinfo.tex: New files. + * Makefile.am (info_TEXINFOS): New variable. + * doc/libffi.texi: New file. + * doc/version.texi: Likewise. + +2008-02-14 Anthony Green + + * Makefile.am (AM_CFLAGS): Don't compile with -D$(TARGET). + (lib_LTLIBRARIES): Define. + (toolexeclib_LIBRARIES): Undefine. + * Makefile.in: Rebuilt. + * configure.ac: Reset version to 2.99.1. + * configure.in: Rebuilt. + +2008-02-14 Anthony Green + + * libffi.pc.in: Use @PACKAGE_NAME@ and @PACKAGE_VERSION@. + * configure.ac: Reset version to 2.99.1. + * configure.in: Rebuilt. + * Makefile.am (EXTRA_DIST): Add ChangeLog.libffi. + * Makefile.in: Rebuilt. + * LICENSE: Update copyright notice. + +2008-02-14 Anthony Green + + * include/Makefile.am (nodist_includes_HEADERS): Define. Don't + distribute ffitarget.h or ffi.h from the build include dir. + * Makefile.in: Rebuilt. + +2008-02-14 Anthony Green + + * include/Makefile.am (includesdir): Install headers under libdir. + (pkgconfigdir): Define. Install libffi.pc. + * include/Makefile.in: Rebuilt. + * libffi.pc.in: Create. + * libtool-version: Increment CURRENT + * configure.ac: Add libffi.pc.in + * configure: Rebuilt. + +2008-02-03 Anthony Green + + * include/Makefile.am (includesdir): Fix header install with + DESTDIR. + * include/Makefile.in: Rebuilt. + +2008-02-03 Timothy Wall + + * src/x86/ffi.c (FFI_INIT_TRAMPOLINE_STDCALL): Calculate jump return + offset based on code pointer, not data pointer. + +2008-02-01 Anthony Green + + * include/Makefile.am: Fix header installs. + * Makefile.am: Ditto. + * include/Makefile.in: Rebuilt. + * Makefile.in: Ditto. + +2008-02-01 Anthony Green + + * src/x86/ffi.c (FFI_INIT_TRAMPOLINE_STDCALL, + FFI_INIT_TRAMPOLINE): Revert my broken changes to twall's last + patch. + +2008-01-31 Anthony Green + + * Makefile.am (EXTRA_DIST): Add missing files. + * testsuite/Makefile.am: Ditto. + * Makefile.in, testsuite/Makefile.in: Rebuilt. + +2008-01-31 Timothy Wall + + * testsuite/libffi.call/closure_stdcall.c: Add test for stdcall + closures. + * src/x86/ffitarget.h: Increase size of trampoline for stdcall + closures. + * src/x86/win32.S: Add assembly for stdcall closure. + * src/x86/ffi.c: Initialize stdcall closure trampoline. + +2008-01-30 H.J. Lu + + PR libffi/34612 + * src/x86/sysv.S (ffi_closure_SYSV): Pop 4 byte from stack when + returning struct. + + * testsuite/libffi.call/call.exp: Add "-O2 -fomit-frame-pointer" + tests. + +2008-01-30 Anthony Green + + * Makefile.am, include/Makefile.am: Move headers to + libffi_la_SOURCES for new automake. + * Makefile.in, include/Makefile.in: Rebuilt. + + * testsuite/lib/wrapper.exp: Copied from gcc tree to allow for + execution outside of gcc tree. + * testsuite/lib/target-libpath.exp: Ditto. + + * testsuite/lib/libffi-dg.exp: Many changes to allow for execution + outside of gcc tree. + diff -rNu smalltalk-3.0.2/libffi/LICENSE smalltalk-3.0.3/libffi/LICENSE --- smalltalk-3.0.2/libffi/LICENSE 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/LICENSE 2008-04-10 11:10:57.000000000 +0200 @@ -1,4 +1,5 @@ -libffi - Copyright (c) 1996-2003 Red Hat, Inc. +libffi - Copyright (c) 1996-2008 Red Hat, Inc and others. +See source files for details. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -11,10 +12,10 @@ 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 +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 CYGNUS SOLUTIONS 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. +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. diff -rNu smalltalk-3.0.2/libffi/Makefile.am smalltalk-3.0.3/libffi/Makefile.am --- smalltalk-3.0.2/libffi/Makefile.am 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/Makefile.am 2008-05-14 12:24:01.000000000 +0200 @@ -25,78 +25,37 @@ src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h \ src/sh64/ffi.c src/sh64/sysv.S src/sh64/ffitarget.h \ src/sparc/v8.S src/sparc/v9.S src/sparc/ffitarget.h \ - src/sparc/ffi.c \ + src/sparc/ffi.c src/x86/darwin64.S \ src/x86/ffi.c src/x86/sysv.S src/x86/win32.S src/x86/darwin.S \ + src/x86/freebsd.S \ src/x86/ffi64.c src/x86/unix64.S src/x86/ffitarget.h \ src/pa/ffitarget.h src/pa/ffi.c src/pa/linux.S src/pa/hpux32.S \ - src/frv/ffi.c src/frv/eabi.S src/frv/ffitarget.h + src/frv/ffi.c src/frv/eabi.S src/frv/ffitarget.h src/dlmalloc.c \ + ChangeLog.libffi ## ################################################################ -## -## This section is for make and multilib madness. -## - -# Work around what appears to be a GNU make bug handling MAKEFLAGS -# values defined in terms of make variables, as is the case for CC and -# friends when we are called from the top level Makefile. -AM_MAKEFLAGS = \ - "AR_FLAGS=$(AR_FLAGS)" \ - "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ - "CFLAGS=$(CFLAGS)" \ - "CXXFLAGS=$(CXXFLAGS)" \ - "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ - "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ - "INSTALL=$(INSTALL)" \ - "INSTALL_DATA=$(INSTALL_DATA)" \ - "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ - "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ - "JC1FLAGS=$(JC1FLAGS)" \ - "LDFLAGS=$(LDFLAGS)" \ - "LIBCFLAGS=$(LIBCFLAGS)" \ - "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ - "MAKE=$(MAKE)" \ - "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ - "PICFLAG=$(PICFLAG)" \ - "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ - "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ - "SHELL=$(SHELL)" \ - "exec_prefix=$(exec_prefix)" \ - "infodir=$(infodir)" \ - "libdir=$(libdir)" \ - "prefix=$(prefix)" \ - "AR=$(AR)" \ - "AS=$(AS)" \ - "CC=$(CC)" \ - "CXX=$(CXX)" \ - "LD=$(LD)" \ - "NM=$(NM)" \ - "RANLIB=$(RANLIB)" \ - "DESTDIR=$(DESTDIR)" - -MAKEOVERRIDES= - noinst_LTLIBRARIES = libffi.la libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c \ - src/raw_api.c src/java_raw_api.c + src/raw_api.c src/java_raw_api.c src/closures.c nodist_libffi_la_SOURCES = -if MIPS_IRIX +if MIPS nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S endif -if MIPS_LINUX -nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S -endif if X86 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S endif +if X86_FREEBSD +nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/freebsd.S +endif if X86_WIN32 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win32.S endif if X86_DARWIN -nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/darwin.S +nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S endif if SPARC nodist_libffi_la_SOURCES += src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S diff -rNu smalltalk-3.0.2/libffi/Makefile.in smalltalk-3.0.3/libffi/Makefile.in --- smalltalk-3.0.2/libffi/Makefile.in 2008-01-22 16:39:18.000000000 +0100 +++ smalltalk-3.0.3/libffi/Makefile.in 2008-05-14 12:24:10.000000000 +0200 @@ -37,11 +37,11 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@MIPS_IRIX_TRUE@am__append_1 = src/mips/ffi.c src/mips/o32.S src/mips/n32.S -@MIPS_LINUX_TRUE@am__append_2 = src/mips/ffi.c src/mips/o32.S -@X86_TRUE@am__append_3 = src/x86/ffi.c src/x86/sysv.S +@MIPS_TRUE@am__append_1 = src/mips/ffi.c src/mips/o32.S src/mips/n32.S +@X86_TRUE@am__append_2 = src/x86/ffi.c src/x86/sysv.S +@X86_FREEBSD_TRUE@am__append_3 = src/x86/ffi.c src/x86/freebsd.S @X86_WIN32_TRUE@am__append_4 = src/x86/ffi.c src/x86/win32.S -@X86_DARWIN_TRUE@am__append_5 = src/x86/ffi.c src/x86/darwin.S +@X86_DARWIN_TRUE@am__append_5 = src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S @SPARC_TRUE@am__append_6 = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S @ALPHA_TRUE@am__append_7 = src/alpha/ffi.c src/alpha/osf.S @IA64_TRUE@am__append_8 = src/ia64/ffi.c src/ia64/unix.S @@ -75,7 +75,7 @@ ../build-aux/elisp-comp ../build-aux/install-sh \ ../build-aux/ltmain.sh ../build-aux/mdate-sh \ ../build-aux/missing ../build-aux/texinfo.tex \ - ../build-aux/ylwrap ChangeLog + ../build-aux/ylwrap ChangeLog TODO subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../build-aux/libtool-tags.m4 \ @@ -92,13 +92,14 @@ libffi_la_LIBADD = am__dirstamp = $(am__leading_dot)dirstamp am_libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \ - src/raw_api.lo src/java_raw_api.lo -@MIPS_IRIX_TRUE@am__objects_1 = src/mips/ffi.lo src/mips/o32.lo \ -@MIPS_IRIX_TRUE@ src/mips/n32.lo -@MIPS_LINUX_TRUE@am__objects_2 = src/mips/ffi.lo src/mips/o32.lo -@X86_TRUE@am__objects_3 = src/x86/ffi.lo src/x86/sysv.lo + src/raw_api.lo src/java_raw_api.lo src/closures.lo +@MIPS_TRUE@am__objects_1 = src/mips/ffi.lo src/mips/o32.lo \ +@MIPS_TRUE@ src/mips/n32.lo +@X86_TRUE@am__objects_2 = src/x86/ffi.lo src/x86/sysv.lo +@X86_FREEBSD_TRUE@am__objects_3 = src/x86/ffi.lo src/x86/freebsd.lo @X86_WIN32_TRUE@am__objects_4 = src/x86/ffi.lo src/x86/win32.lo -@X86_DARWIN_TRUE@am__objects_5 = src/x86/ffi.lo src/x86/darwin.lo +@X86_DARWIN_TRUE@am__objects_5 = src/x86/ffi.lo src/x86/darwin.lo \ +@X86_DARWIN_TRUE@ src/x86/ffi64.lo src/x86/darwin64.lo @SPARC_TRUE@am__objects_6 = src/sparc/ffi.lo src/sparc/v8.lo \ @SPARC_TRUE@ src/sparc/v9.lo @ALPHA_TRUE@am__objects_7 = src/alpha/ffi.lo src/alpha/osf.lo @@ -181,6 +182,7 @@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@ AR = @AR@ ARM_FALSE = @ARM_FALSE@ ARM_TRUE = @ARM_TRUE@ @@ -227,10 +229,8 @@ M68K_FALSE = @M68K_FALSE@ M68K_TRUE = @M68K_TRUE@ MAKEINFO = @MAKEINFO@ -MIPS_IRIX_FALSE = @MIPS_IRIX_FALSE@ -MIPS_IRIX_TRUE = @MIPS_IRIX_TRUE@ -MIPS_LINUX_FALSE = @MIPS_LINUX_FALSE@ -MIPS_LINUX_TRUE = @MIPS_LINUX_TRUE@ +MIPS_FALSE = @MIPS_FALSE@ +MIPS_TRUE = @MIPS_TRUE@ OBJEXT = @OBJEXT@ PA64_HPUX_FALSE = @PA64_HPUX_FALSE@ PA64_HPUX_TRUE = @PA64_HPUX_TRUE@ @@ -275,6 +275,8 @@ X86_DARWIN_FALSE = @X86_DARWIN_FALSE@ X86_DARWIN_TRUE = @X86_DARWIN_TRUE@ X86_FALSE = @X86_FALSE@ +X86_FREEBSD_FALSE = @X86_FREEBSD_FALSE@ +X86_FREEBSD_TRUE = @X86_FREEBSD_TRUE@ X86_TRUE = @X86_TRUE@ X86_WIN32_FALSE = @X86_WIN32_FALSE@ X86_WIN32_TRUE = @X86_WIN32_TRUE@ @@ -348,54 +350,17 @@ src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h \ src/sh64/ffi.c src/sh64/sysv.S src/sh64/ffitarget.h \ src/sparc/v8.S src/sparc/v9.S src/sparc/ffitarget.h \ - src/sparc/ffi.c \ + src/sparc/ffi.c src/x86/darwin64.S \ src/x86/ffi.c src/x86/sysv.S src/x86/win32.S src/x86/darwin.S \ + src/x86/freebsd.S \ src/x86/ffi64.c src/x86/unix64.S src/x86/ffitarget.h \ src/pa/ffitarget.h src/pa/ffi.c src/pa/linux.S src/pa/hpux32.S \ - src/frv/ffi.c src/frv/eabi.S src/frv/ffitarget.h + src/frv/ffi.c src/frv/eabi.S src/frv/ffitarget.h src/dlmalloc.c \ + ChangeLog.libffi - -# Work around what appears to be a GNU make bug handling MAKEFLAGS -# values defined in terms of make variables, as is the case for CC and -# friends when we are called from the top level Makefile. -AM_MAKEFLAGS = \ - "AR_FLAGS=$(AR_FLAGS)" \ - "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ - "CFLAGS=$(CFLAGS)" \ - "CXXFLAGS=$(CXXFLAGS)" \ - "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ - "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ - "INSTALL=$(INSTALL)" \ - "INSTALL_DATA=$(INSTALL_DATA)" \ - "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ - "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ - "JC1FLAGS=$(JC1FLAGS)" \ - "LDFLAGS=$(LDFLAGS)" \ - "LIBCFLAGS=$(LIBCFLAGS)" \ - "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ - "MAKE=$(MAKE)" \ - "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ - "PICFLAG=$(PICFLAG)" \ - "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ - "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ - "SHELL=$(SHELL)" \ - "exec_prefix=$(exec_prefix)" \ - "infodir=$(infodir)" \ - "libdir=$(libdir)" \ - "prefix=$(prefix)" \ - "AR=$(AR)" \ - "AS=$(AS)" \ - "CC=$(CC)" \ - "CXX=$(CXX)" \ - "LD=$(LD)" \ - "NM=$(NM)" \ - "RANLIB=$(RANLIB)" \ - "DESTDIR=$(DESTDIR)" - -MAKEOVERRIDES = noinst_LTLIBRARIES = libffi.la libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c \ - src/raw_api.c src/java_raw_api.c + src/raw_api.c src/java_raw_api.c src/closures.c nodist_libffi_la_SOURCES = $(am__append_1) $(am__append_2) \ $(am__append_3) $(am__append_4) $(am__append_5) \ @@ -483,6 +448,7 @@ src/types.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/raw_api.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/java_raw_api.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) +src/closures.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/mips/$(am__dirstamp): @$(mkdir_p) src/mips @: > src/mips/$(am__dirstamp) @@ -505,10 +471,16 @@ src/x86/$(DEPDIR)/$(am__dirstamp) src/x86/sysv.lo: src/x86/$(am__dirstamp) \ src/x86/$(DEPDIR)/$(am__dirstamp) +src/x86/freebsd.lo: src/x86/$(am__dirstamp) \ + src/x86/$(DEPDIR)/$(am__dirstamp) src/x86/win32.lo: src/x86/$(am__dirstamp) \ src/x86/$(DEPDIR)/$(am__dirstamp) src/x86/darwin.lo: src/x86/$(am__dirstamp) \ src/x86/$(DEPDIR)/$(am__dirstamp) +src/x86/ffi64.lo: src/x86/$(am__dirstamp) \ + src/x86/$(DEPDIR)/$(am__dirstamp) +src/x86/darwin64.lo: src/x86/$(am__dirstamp) \ + src/x86/$(DEPDIR)/$(am__dirstamp) src/sparc/$(am__dirstamp): @$(mkdir_p) src/sparc @: > src/sparc/$(am__dirstamp) @@ -627,8 +599,6 @@ src/s390/$(DEPDIR)/$(am__dirstamp) src/s390/ffi.lo: src/s390/$(am__dirstamp) \ src/s390/$(DEPDIR)/$(am__dirstamp) -src/x86/ffi64.lo: src/x86/$(am__dirstamp) \ - src/x86/$(DEPDIR)/$(am__dirstamp) src/x86/unix64.lo: src/x86/$(am__dirstamp) \ src/x86/$(DEPDIR)/$(am__dirstamp) src/sh/$(am__dirstamp): @@ -674,6 +644,8 @@ -rm -f src/arm/ffi.lo -rm -f src/arm/sysv.$(OBJEXT) -rm -f src/arm/sysv.lo + -rm -f src/closures.$(OBJEXT) + -rm -f src/closures.lo -rm -f src/cris/ffi.$(OBJEXT) -rm -f src/cris/ffi.lo -rm -f src/cris/sysv.$(OBJEXT) @@ -756,10 +728,14 @@ -rm -f src/types.lo -rm -f src/x86/darwin.$(OBJEXT) -rm -f src/x86/darwin.lo + -rm -f src/x86/darwin64.$(OBJEXT) + -rm -f src/x86/darwin64.lo -rm -f src/x86/ffi.$(OBJEXT) -rm -f src/x86/ffi.lo -rm -f src/x86/ffi64.$(OBJEXT) -rm -f src/x86/ffi64.lo + -rm -f src/x86/freebsd.$(OBJEXT) + -rm -f src/x86/freebsd.lo -rm -f src/x86/sysv.$(OBJEXT) -rm -f src/x86/sysv.lo -rm -f src/x86/unix64.$(OBJEXT) @@ -770,6 +746,7 @@ distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/closures.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/java_raw_api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/prep_cif.Plo@am__quote@ @@ -987,7 +964,7 @@ distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkdir_p) $(distdir)/../build-aux $(distdir)/include $(distdir)/src/alpha $(distdir)/src/arm $(distdir)/src/cris $(distdir)/src/frv $(distdir)/src/ia64 $(distdir)/src/m32r $(distdir)/src/m68k $(distdir)/src/mips $(distdir)/src/pa $(distdir)/src/powerpc $(distdir)/src/s390 $(distdir)/src/sh $(distdir)/src/sh64 $(distdir)/src/sparc $(distdir)/src/x86 + $(mkdir_p) $(distdir)/../build-aux $(distdir)/include $(distdir)/src $(distdir)/src/alpha $(distdir)/src/arm $(distdir)/src/cris $(distdir)/src/frv $(distdir)/src/ia64 $(distdir)/src/m32r $(distdir)/src/m68k $(distdir)/src/mips $(distdir)/src/pa $(distdir)/src/powerpc $(distdir)/src/s390 $(distdir)/src/sh $(distdir)/src/sh64 $(distdir)/src/sparc $(distdir)/src/x86 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ diff -rNu smalltalk-3.0.2/libffi/README smalltalk-3.0.3/libffi/README --- smalltalk-3.0.2/libffi/README 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/README 2008-04-10 11:10:57.000000000 +0200 @@ -1,78 +1,67 @@ -This directory contains the libffi package, which is not part of GCC but -shipped with GCC as convenience. - Status ====== -libffi-2.00 has not been released yet! This is a development snapshot! - -libffi-1.20 was released on October 5, 1998. Check the libffi web -page for updates: . +libffi-3.0.4 was released on February 24, 2008. Check the libffi web +page for updates: . What is libffi? =============== Compilers for high level languages generate code that follow certain -conventions. These conventions are necessary, in part, for separate -compilation to work. One such convention is the "calling -convention". The "calling convention" is essentially a set of -assumptions made by the compiler about where function arguments will -be found on entry to a function. A "calling convention" also specifies -where the return value for a function is found. +conventions. These conventions are necessary, in part, for separate +compilation to work. One such convention is the "calling convention". +The "calling convention" is a set of assumptions made by the compiler +about where function arguments will be found on entry to a function. +A "calling convention" also specifies where the return value for a +function is found. Some programs may not know at the time of compilation what arguments -are to be passed to a function. For instance, an interpreter may be +are to be passed to a function. For instance, an interpreter may be told at run-time about the number and types of arguments used to call -a given function. Libffi can be used in such programs to provide a +a given function. Libffi can be used in such programs to provide a bridge from the interpreter program to compiled code. The libffi library provides a portable, high level programming -interface to various calling conventions. This allows a programmer to +interface to various calling conventions. This allows a programmer to call any function specified by a call interface description at run -time. +time. -Ffi stands for Foreign Function Interface. A foreign function +FFI stands for Foreign Function Interface. A foreign function interface is the popular name for the interface that allows code -written in one language to call code written in another language. The +written in one language to call code written in another language. The libffi library really only provides the lowest, machine dependent layer of a fully featured foreign function interface. A layer must exist above libffi that handles type conversions for values passed between the two languages. -Supported Platforms and Prerequisites -===================================== - -Libffi has been ported to: - - SunOS 4.1.3 & Solaris 2.x (SPARC-V8, SPARC-V9) - - Irix 5.3 & 6.2 (System V/o32 & n32) - - Intel x86 - Linux (System V ABI) - - Alpha - Linux and OSF/1 - - m68k - Linux (System V ABI) - - PowerPC - Linux (System V ABI, Darwin, AIX) +Supported Platforms +=================== - ARM - Linux (System V ABI) - -Libffi has been tested with the egcs 1.0.2 gcc compiler. Chances are -that other versions will work. Libffi has also been built and tested -with the SGI compiler tools. - -On PowerPC, the tests failed (see the note below). - -You must use GNU make to build libffi. SGI's make will not work. -Sun's probably won't either. - -If you port libffi to another platform, please let me know! I assume -that some will be easy (x86 NetBSD), and others will be more difficult -(HP). +Libffi has been ported to many different platforms, although this +release was only tested on: + arm oabi linux + arm eabi linux + hppa linux + mips o32 linux (little endian) + powerpc darwin + powerpc64 linux + sparc solaris + sparc64 solaris + x86 cygwin + x86 darwin + x86 freebsd + x86 linux + x86 openbsd + x86-64 darwin + x86-64 linux + x86-64 OS X + x86-64 freebsd + +Please send additional platform test results to +libffi-discuss@sourceware.org. Installing libffi ================= @@ -101,216 +90,17 @@ Configure has many other options. Use "configure --help" to see them all. Once configure has finished, type "make". Note that you must be using -GNU make. SGI's make will not work. Sun's probably won't either. -You can ftp GNU make from prep.ai.mit.edu:/pub/gnu. +GNU make. You can ftp GNU make from prep.ai.mit.edu:/pub/gnu. -To ensure that libffi is working as advertised, type "make test". +To ensure that libffi is working as advertised, type "make check". +This will require that you have DejaGNU installed. To install the library and header files, type "make install". -Using libffi -============ - - The Basics - ---------- - -Libffi assumes that you have a pointer to the function you wish to -call and that you know the number and types of arguments to pass it, -as well as the return type of the function. - -The first thing you must do is create an ffi_cif object that matches -the signature of the function you wish to call. The cif in ffi_cif -stands for Call InterFace. To prepare a call interface object, use the -following function: - -ffi_status ffi_prep_cif(ffi_cif *cif, ffi_abi abi, - unsigned int nargs, - ffi_type *rtype, ffi_type **atypes); - - CIF is a pointer to the call interface object you wish - to initialize. - - ABI is an enum that specifies the calling convention - to use for the call. FFI_DEFAULT_ABI defaults - to the system's native calling convention. Other - ABI's may be used with care. They are system - specific. - - NARGS is the number of arguments this function accepts. - libffi does not yet support vararg functions. - - RTYPE is a pointer to an ffi_type structure that represents - the return type of the function. Ffi_type objects - describe the types of values. libffi provides - ffi_type objects for many of the native C types: - signed int, unsigned int, signed char, unsigned char, - etc. There is also a pointer ffi_type object and - a void ffi_type. Use &ffi_type_void for functions that - don't return values. - - ATYPES is a vector of ffi_type pointers. ARGS must be NARGS long. - If NARGS is 0, this is ignored. - - -ffi_prep_cif will return a status code that you are responsible -for checking. It will be one of the following: - - FFI_OK - All is good. - - FFI_BAD_TYPEDEF - One of the ffi_type objects that ffi_prep_cif - came across is bad. - - -Before making the call, the VALUES vector should be initialized -with pointers to the appropriate argument values. - -To call the the function using the initialized ffi_cif, use the -ffi_call function: - -void ffi_call(ffi_cif *cif, void *fn, void *rvalue, void **avalues); - - CIF is a pointer to the ffi_cif initialized specifically - for this function. - - FN is a pointer to the function you want to call. - - RVALUE is a pointer to a chunk of memory that is to hold the - result of the function call. Currently, it must be - at least one word in size (except for the n32 version - under Irix 6.x, which must be a pointer to an 8 byte - aligned value (a long long). It must also be at least - word aligned (depending on the return type, and the - system's alignment requirements). If RTYPE is - &ffi_type_void, this is ignored. If RVALUE is NULL, - the return value is discarded. - - AVALUES is a vector of void* that point to the memory locations - holding the argument values for a call. - If NARGS is 0, this is ignored. - - -If you are expecting a return value from FN it will have been stored -at RVALUE. - - - - An Example - ---------- - -Here is a trivial example that calls puts() a few times. - - #include - #include - - int main() - { - ffi_cif cif; - ffi_type *args[1]; - void *values[1]; - char *s; - int rc; - - /* Initialize the argument info vectors */ - args[0] = &ffi_type_uint; - values[0] = &s; - - /* Initialize the cif */ - if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, - &ffi_type_uint, args) == FFI_OK) - { - s = "Hello World!"; - ffi_call(&cif, puts, &rc, values); - /* rc now holds the result of the call to puts */ - - /* values holds a pointer to the function's arg, so to - call puts() again all we need to do is change the - value of s */ - s = "This is cool!"; - ffi_call(&cif, puts, &rc, values); - } - - return 0; - } - - - - Aggregate Types - --------------- - -Although libffi has no special support for unions or bit-fields, it is -perfectly happy passing structures back and forth. You must first -describe the structure to libffi by creating a new ffi_type object -for it. Here is the definition of ffi_type: - - typedef struct _ffi_type - { - unsigned size; - short alignment; - short type; - struct _ffi_type **elements; - } ffi_type; - -All structures must have type set to FFI_TYPE_STRUCT. You may set -size and alignment to 0. These will be calculated and reset to the -appropriate values by ffi_prep_cif(). - -elements is a NULL terminated array of pointers to ffi_type objects -that describe the type of the structure elements. These may, in turn, -be structure elements. - -The following example initializes a ffi_type object representing the -tm struct from Linux's time.h: - - struct tm { - int tm_sec; - int tm_min; - int tm_hour; - int tm_mday; - int tm_mon; - int tm_year; - int tm_wday; - int tm_yday; - int tm_isdst; - /* Those are for future use. */ - long int __tm_gmtoff__; - __const char *__tm_zone__; - }; - - { - ffi_type tm_type; - ffi_type *tm_type_elements[12]; - int i; - - tm_type.size = tm_type.alignment = 0; - tm_type.elements = &tm_type_elements; - - for (i = 0; i < 9; i++) - tm_type_elements[i] = &ffi_type_sint; - - tm_type_elements[9] = &ffi_type_slong; - tm_type_elements[10] = &ffi_type_pointer; - tm_type_elements[11] = NULL; - - /* tm_type can now be used to represent tm argument types and - return types for ffi_prep_cif() */ - } - - - Platform Specific Notes ======================= - Intel x86 - --------- - -There are no known problems with the x86 port. - - Sun SPARC - SunOS 4.1.3 & Solaris 2.x - ------------------------------------- - -You must use GNU Make to build libffi on Sun platforms. - MIPS - Irix 5.3 & 6.x --------------------- @@ -339,13 +129,6 @@ You must use GNU Make to build libffi on SGI platforms. - ARM - System V ABI - ------------------ - -The ARM port was performed on a NetWinder running ARM Linux ELF -(2.0.31) and gcc 2.8.1. - - PowerPC System V ABI -------------------- @@ -375,6 +158,28 @@ History ======= +3.0.4 Feb-24-08 + Fix x86 OpenBSD configury. + +3.0.3 Feb-22-08 + Enable x86 OpenBSD thanks to Thomas Heller, and + x86-64 FreeBSD thanks to Björn König and Andreas Tobler. + Clean up test instruction in README. + +3.0.2 Feb-21-08 + Improved x86 FreeBSD support. + Thanks to Björn König. + +3.0.1 Feb-15-08 + Fix instruction cache flushing bug on MIPS. + Thanks to David Daney. + +3.0.0 Feb-15-08 + Many changes, mostly thanks to the GCC project. + Cygnus Solutions is now Red Hat. + + [10 years go by...] + 1.20 Oct-5-98 Raffaele Sena produces ARM port. @@ -458,34 +263,56 @@ Authors & Credits ================= -libffi was written by Anthony Green . +libffi was originally written by Anthony Green . + +The developers of the GNU Compiler Collection project have made +innumerable valuable contributions. See the ChangeLog file for +details. -Portions of libffi were derived from Gianni Mariani's free gencall -library for Silicon Graphics machines. +Some of the ideas behind libffi were inspired by Gianni Mariani's free +gencall library for Silicon Graphics machines. The closure mechanism was designed and implemented by Kresten Krab Thorup. -The Sparc port was derived from code contributed by the fine folks at -Visible Decisions Inc . Further enhancements were -made by Gordon Irlam at Cygnus Solutions . - -The Alpha port was written by Richard Henderson at Cygnus Solutions. - -Andreas Schwab ported libffi to m68k Linux and provided a number of -bug fixes. +Major processor architecture ports were contributed by the following +developers: -Geoffrey Keating ported libffi to the PowerPC. - -Raffaele Sena ported libffi to the ARM. +alpha Richard Henderson +arm Raffaele Sena +cris Simon Posnjak, Hans-Peter Nilsson +frv Anthony Green +ia64 Hans Boehm +m32r Kazuhiro Inaoka +m68k Andreas Schwab +mips Anthony Green, Casey Marshall +mips64 David Daney +pa Randolph Chung, Dave Anglin, Andreas Tobler +powerpc Geoffrey Keating, Andreas Tobler, + David Edelsohn, John Hornkvist +powerpc64 Jakub Jelinek +s390 Gerhard Tonn, Ulrich Weigand +sh Kaz Kojima +sh64 Kaz Kojima +sparc Anthony Green, Gordon Irlam +x86 Anthony Green, Jon Beniston +x86-64 Bo Thorsen Jesper Skov and Andrew Haley both did more than their fair share of stepping through the code and tracking down bugs. -Thanks also to Tom Tromey for bug fixes and configuration help. +Thanks also to Tom Tromey for bug fixes, documentation and +configuration help. Thanks to Jim Blandy, who provided some useful feedback on the libffi interface. +Andreas Tobler has done a tremendous amount of work on the testsuite. + +Alex Oliva solved the executable page problem for SElinux. + +The list above is almost certainly incomplete and inaccurate. I'm +happy to make corrections or additions upon request. + If you have a problem, or have found a bug, please send a note to -green@cygnus.com. +green@redhat.com. diff -rNu smalltalk-3.0.2/libffi/TODO smalltalk-3.0.3/libffi/TODO --- smalltalk-3.0.2/libffi/TODO 1970-01-01 01:00:00.000000000 +0100 +++ smalltalk-3.0.3/libffi/TODO 2008-04-10 11:10:57.000000000 +0200 @@ -0,0 +1,47 @@ +-- "TO DO" list for next release ------------------- + +1. Update README file with new release info. + +2. Add closure documentation. + +3. Review copyright headers. + +4. Rewrite web page. + +5. Test the following.... + + alpha-linux + arm-linux + cris-linux + frv-elf + frv-linux + hppa-linux + hppa64-linux + i386-cygwin + i386-mingw + i386-darwin + i386-solaris2.1* + i386-elf + ia64-linux + m32r-linux + m68k-linux + mips-sgi-irix5 + mips-sgi-irix6 + mips-linux + mips64-linux + powerpc-linux + powerpc-beos + powerpc-darwin + powerpc-aix + powerpc-freebsd + powerpc-rtems + s390-linux + s390x-linux + sh-elf + sh-linux + sh64-elf + sparc-linux + x86_64-darwin + x86_64-cygwin + x86_64-mingw + x86_64-linux diff -rNu smalltalk-3.0.2/libffi/configure smalltalk-3.0.3/libffi/configure --- smalltalk-3.0.2/libffi/configure 2008-01-22 16:39:23.000000000 +0100 +++ smalltalk-3.0.3/libffi/configure 2008-04-15 09:31:09.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for libffi 2.1. +# Generated by GNU Autoconf 2.61 for libffi 3.0.4. # # Report bugs to . # @@ -724,8 +724,8 @@ # Identity of this package. PACKAGE_NAME='libffi' PACKAGE_TARNAME='libffi' -PACKAGE_VERSION='2.1' -PACKAGE_STRING='libffi 2.1' +PACKAGE_VERSION='3.0.4' +PACKAGE_STRING='libffi 3.0.4' PACKAGE_BUGREPORT='http://gcc.gnu.org/bugs.html' # Factoring default headers for most tests. @@ -862,14 +862,15 @@ LIBTOOL TESTSUBDIR_TRUE TESTSUBDIR_FALSE -MIPS_IRIX_TRUE -MIPS_IRIX_FALSE -MIPS_LINUX_TRUE -MIPS_LINUX_FALSE +AM_RUNTESTFLAGS +MIPS_TRUE +MIPS_FALSE SPARC_TRUE SPARC_FALSE X86_TRUE X86_FALSE +X86_FREEBSD_TRUE +X86_FREEBSD_FALSE X86_WIN32_TRUE X86_WIN32_FALSE X86_DARWIN_TRUE @@ -1430,7 +1431,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libffi 2.1 to adapt to many kinds of systems. +\`configure' configures libffi 3.0.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1501,7 +1502,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libffi 2.1:";; + short | recursive ) echo "Configuration of libffi 3.0.4:";; esac cat <<\_ACEOF @@ -1603,7 +1604,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libffi configure 2.1 +libffi configure 3.0.4 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1617,7 +1618,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libffi $as_me 2.1, which was +It was created by libffi $as_me 3.0.4, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2422,7 +2423,7 @@ # Define the identity of the package. PACKAGE='libffi' - VERSION='2.1' + VERSION='3.0.4' cat >>confdefs.h <<_ACEOF @@ -4497,7 +4498,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4500 "configure"' > conftest.$ac_ext + echo '#line 4501 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6239,11 +6240,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6242: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6243: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6246: \$? = $ac_status" >&5 + echo "$as_me:6247: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6482,11 +6483,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6485: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6486: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6489: \$? = $ac_status" >&5 + echo "$as_me:6490: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6542,11 +6543,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6545: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6546: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6549: \$? = $ac_status" >&5 + echo "$as_me:6550: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8690,7 +8691,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 echo "$as_me: error: \"libffi has not been ported to $host.\"" >&2;} @@ -9518,22 +9585,12 @@ -if test x$TARGET = xMIPS_IRIX; then - MIPS_IRIX_TRUE= - MIPS_IRIX_FALSE='#' +if test x$TARGET = xMIPS; then + MIPS_TRUE= + MIPS_FALSE='#' else - MIPS_IRIX_TRUE='#' - MIPS_IRIX_FALSE= -fi - - - -if test x$TARGET = xMIPS_LINUX; then - MIPS_LINUX_TRUE= - MIPS_LINUX_FALSE='#' -else - MIPS_LINUX_TRUE='#' - MIPS_LINUX_FALSE= + MIPS_TRUE='#' + MIPS_FALSE= fi @@ -9558,6 +9615,16 @@ +if test x$TARGET = xX86_FREEBSD; then + X86_FREEBSD_TRUE= + X86_FREEBSD_FALSE='#' +else + X86_FREEBSD_TRUE='#' + X86_FREEBSD_FALSE= +fi + + + if test x$TARGET = xX86_WIN32; then X86_WIN32_TRUE= X86_WIN32_FALSE='#' @@ -9757,11 +9824,6 @@ fi -case x$TARGET in - xMIPS*) TARGET=MIPS ;; - *) ;; -esac - { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then @@ -9936,6 +9998,100 @@ fi + +for ac_func in memcpy +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { echo "$as_me:$LINENO: checking for working alloca.h" >&5 @@ -10295,6 +10451,7 @@ fi + { echo "$as_me:$LINENO: checking for double" >&5 echo $ECHO_N "checking for double... $ECHO_C" >&6; } if test "${ac_cv_type_double+set}" = set; then @@ -11107,15 +11264,17 @@ # Also AC_SUBST this variable for ffi.h. -HAVE_LONG_DOUBLE=0 -if test $ac_cv_sizeof_double != $ac_cv_sizeof_long_double; then - if test $ac_cv_sizeof_long_double != 0; then - HAVE_LONG_DOUBLE=1 +if test -z "$HAVE_LONG_DOUBLE"; then + HAVE_LONG_DOUBLE=0 + if test $ac_cv_sizeof_double != $ac_cv_sizeof_long_double; then + if test $ac_cv_sizeof_long_double != 0; then + HAVE_LONG_DOUBLE=1 cat >>confdefs.h <<\_ACEOF #define HAVE_LONG_DOUBLE 1 _ACEOF + fi fi fi @@ -11357,6 +11516,66 @@ esac +{ echo "$as_me:$LINENO: checking assembler .cfi pseudo-op support" >&5 +echo $ECHO_N "checking assembler .cfi pseudo-op support... $ECHO_C" >&6; } +if test "${libffi_cv_as_cfi_pseudo_op+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + libffi_cv_as_cfi_pseudo_op=unknown + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +asm (".cfi_startproc\n\t.cfi_endproc"); +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + libffi_cv_as_cfi_pseudo_op=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + libffi_cv_as_cfi_pseudo_op=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $libffi_cv_as_cfi_pseudo_op" >&5 +echo "${ECHO_T}$libffi_cv_as_cfi_pseudo_op" >&6; } +if test "x$libffi_cv_as_cfi_pseudo_op" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AS_CFI_PSEUDO_OP 1 +_ACEOF + +fi + if test x$TARGET = xSPARC; then { echo "$as_me:$LINENO: checking assembler and linker support unaligned pc related relocs" >&5 echo $ECHO_N "checking assembler and linker support unaligned pc related relocs... $ECHO_C" >&6; } @@ -11741,17 +11960,10 @@ Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${MIPS_IRIX_TRUE}" && test -z "${MIPS_IRIX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"MIPS_IRIX\" was never defined. +if test -z "${MIPS_TRUE}" && test -z "${MIPS_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MIPS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"MIPS_IRIX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${MIPS_LINUX_TRUE}" && test -z "${MIPS_LINUX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"MIPS_LINUX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"MIPS_LINUX\" was never defined. +echo "$as_me: error: conditional \"MIPS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi @@ -11769,6 +11981,13 @@ Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${X86_FREEBSD_TRUE}" && test -z "${X86_FREEBSD_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"X86_FREEBSD\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"X86_FREEBSD\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${X86_WIN32_TRUE}" && test -z "${X86_WIN32_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"X86_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -12209,7 +12428,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libffi $as_me 2.1, which was +This file was extended by libffi $as_me 3.0.4, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12266,7 +12485,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -libffi config.status 2.1 +libffi config.status 3.0.4 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -12590,14 +12809,15 @@ for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF TESTSUBDIR_FALSE!$TESTSUBDIR_FALSE$ac_delim -MIPS_IRIX_TRUE!$MIPS_IRIX_TRUE$ac_delim -MIPS_IRIX_FALSE!$MIPS_IRIX_FALSE$ac_delim -MIPS_LINUX_TRUE!$MIPS_LINUX_TRUE$ac_delim -MIPS_LINUX_FALSE!$MIPS_LINUX_FALSE$ac_delim +AM_RUNTESTFLAGS!$AM_RUNTESTFLAGS$ac_delim +MIPS_TRUE!$MIPS_TRUE$ac_delim +MIPS_FALSE!$MIPS_FALSE$ac_delim SPARC_TRUE!$SPARC_TRUE$ac_delim SPARC_FALSE!$SPARC_FALSE$ac_delim X86_TRUE!$X86_TRUE$ac_delim X86_FALSE!$X86_FALSE$ac_delim +X86_FREEBSD_TRUE!$X86_FREEBSD_TRUE$ac_delim +X86_FREEBSD_FALSE!$X86_FREEBSD_FALSE$ac_delim X86_WIN32_TRUE!$X86_WIN32_TRUE$ac_delim X86_WIN32_FALSE!$X86_WIN32_FALSE$ac_delim X86_DARWIN_TRUE!$X86_DARWIN_TRUE$ac_delim @@ -12646,7 +12866,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 55; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 56; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff -rNu smalltalk-3.0.2/libffi/configure.ac smalltalk-3.0.3/libffi/configure.ac --- smalltalk-3.0.2/libffi/configure.ac 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/configure.ac 2008-04-10 11:10:57.000000000 +0200 @@ -2,7 +2,7 @@ AC_PREREQ(2.59) -AC_INIT([libffi], [2.1], [http://gcc.gnu.org/bugs.html]) +AC_INIT([libffi], [3.0.4], [http://gcc.gnu.org/bugs.html]) AC_CONFIG_HEADERS([fficonfig.h]) AC_CONFIG_AUX_DIR(../build-aux) @@ -27,61 +27,127 @@ TARGETDIR="unknown" case "$host" in -i*86-*-linux*) TARGET=X86; TARGETDIR=x86;; -i*86-*-gnu*) TARGET=X86; TARGETDIR=x86;; -i*86-*-solaris2.1[[0-9]]*) TARGET=X86_64; TARGETDIR=x86;; -i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;; -i*86-*-beos*) TARGET=X86; TARGETDIR=x86;; -i*86-*-darwin*) TARGET=X86_DARWIN; TARGETDIR=x86;; -i*86-*-freebsd* | i*86-*-kfreebsd*-gnu) TARGET=X86; TARGETDIR=x86;; -i*86-*-netbsdelf* | i*86-*-knetbsd*-gnu) TARGET=X86; TARGETDIR=x86;; -i*86-*-rtems*) TARGET=X86; TARGETDIR=x86;; -i*86-*-win32*) TARGET=X86_WIN32; TARGETDIR=x86;; -i*86-*-cygwin*) TARGET=X86_WIN32; TARGETDIR=x86;; -i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;; -frv-*-*) TARGET=FRV; TARGETDIR=frv;; -sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;; -sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;; -sparc-*-linux* | sparc-*-netbsdelf* | sparc-*-knetbsd*-gnu) TARGET=SPARC; TARGETDIR=sparc;; -sparc*-*-rtems*) TARGET=SPARC; TARGETDIR=sparc;; -sparc64-*-linux* | sparc64-*-freebsd* | sparc64-*-netbsd* | sparc64-*-knetbsd*-gnu) TARGET=SPARC; TARGETDIR=sparc;; -alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu | alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu) TARGET=ALPHA; TARGETDIR=alpha;; -ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;; -m32r*-*-linux* ) TARGET=M32R; TARGETDIR=m32r;; -m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;; -mips64*-*);; -mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS_IRIX; TARGETDIR=mips;; -mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;; -powerpc*-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;; -powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;; -powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;; -powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; -powerpc-*-freebsd*) TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc;; -powerpc*-*-rtems*) TARGET=POWERPC; TARGETDIR=powerpc;; -rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; -arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;; -arm*-*-netbsdelf* | arm*-*-knetbsd*-gnu) TARGET=ARM; TARGETDIR=arm;; -arm*-*-rtems*) TARGET=ARM; TARGETDIR=arm;; -cris-*-*) TARGET=LIBFFI_CRIS; TARGETDIR=cris;; -s390-*-linux-*) TARGET=S390; TARGETDIR=s390;; -s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;; -x86_64-*-linux* | x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) TARGET=X86_64; TARGETDIR=x86;; -sh-*-linux* | sh[[34]]*-*-linux*) TARGET=SH; TARGETDIR=sh;; -sh-*-rtems*) TARGET=SH; TARGETDIR=sh;; -sh64-*-linux* | sh5*-*-linux*) TARGET=SH64; TARGETDIR=sh64;; -hppa*-*-linux* | parisc*-*-linux*) TARGET=PA_LINUX; TARGETDIR=pa;; -hppa*64-*-hpux*) TARGET=PA64_HPUX; TARGETDIR=pa;; -hppa*-*-hpux*) TARGET=PA_HPUX; TARGETDIR=pa;; + alpha*-*-*) + TARGET=ALPHA; TARGETDIR=alpha; + # Support 128-bit long double, changable via command-line switch. + HAVE_LONG_DOUBLE='defined(__LONG_DOUBLE_128__)' + ;; + + arm*-*-*) + TARGET=ARM; TARGETDIR=arm + ;; + + amd64-*-freebsd*) + TARGET=X86_64; TARGETDIR=x86 + ;; + + cris-*-*) + TARGET=LIBFFI_CRIS; TARGETDIR=cris + ;; + + frv-*-*) + TARGET=FRV; TARGETDIR=frv + ;; + + hppa*-*-linux* | parisc*-*-linux*) + TARGET=PA_LINUX; TARGETDIR=pa + ;; + hppa*64-*-hpux*) + TARGET=PA64_HPUX; TARGETDIR=pa + ;; + hppa*-*-hpux*) + TARGET=PA_HPUX; TARGETDIR=pa + ;; + + i386-*-freebsd* | i386-*-openbsd*) + TARGET=X86_FREEBSD; TARGETDIR=x86 + ;; + i?86-win32* | i?86-*-cygwin* | i?86-*-mingw*) + TARGET=X86_WIN32; TARGETDIR=x86 + ;; + i?86-*-darwin*) + TARGET=X86_DARWIN; TARGETDIR=x86 + ;; + i?86-*-solaris2.1[[0-9]]*) + TARGET=X86_64; TARGETDIR=x86 + ;; + i?86-*-*) + TARGET=X86; TARGETDIR=x86 + ;; + + ia64*-*-*) + TARGET=IA64; TARGETDIR=ia64 + ;; + + m32r*-*-*) + TARGET=M32R; TARGETDIR=m32r + ;; + + m68k-*-*) + TARGET=M68K; TARGETDIR=m68k + ;; + + mips-sgi-irix5.* | mips-sgi-irix6.*) + TARGET=MIPS; TARGETDIR=mips + ;; + mips*-*-linux*) + TARGET=MIPS; TARGETDIR=mips + ;; + + powerpc*-*-linux* | powerpc-*-sysv*) + TARGET=POWERPC; TARGETDIR=powerpc + ;; + powerpc-*-beos*) + TARGET=POWERPC; TARGETDIR=powerpc + ;; + powerpc-*-darwin*) + TARGET=POWERPC_DARWIN; TARGETDIR=powerpc + ;; + powerpc-*-aix* | rs6000-*-aix*) + TARGET=POWERPC_AIX; TARGETDIR=powerpc + ;; + powerpc-*-freebsd*) + TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc + ;; + powerpc*-*-rtems*) + TARGET=POWERPC; TARGETDIR=powerpc + ;; + + s390-*-* | s390x-*-*) + TARGET=S390; TARGETDIR=s390 + ;; + + sh-*-* | sh[[34]]*-*-*) + TARGET=SH; TARGETDIR=sh + ;; + sh64-*-* | sh5*-*-*) + TARGET=SH64; TARGETDIR=sh64 + ;; + + sparc*-*-*) + TARGET=SPARC; TARGETDIR=sparc + ;; + + x86_64-*-darwin*) + TARGET=X86_DARWIN; TARGETDIR=x86 + ;; + x86_64-*-cygwin* | x86_64-*-mingw*) + ;; + x86_64-*-*) + TARGET=X86_64; TARGETDIR=x86 + ;; esac +AC_SUBST(AM_RUNTESTFLAGS) + if test $TARGETDIR = unknown; then AC_MSG_ERROR(["libffi has not been ported to $host."]) fi -AM_CONDITIONAL(MIPS_IRIX, test x$TARGET = xMIPS_IRIX) -AM_CONDITIONAL(MIPS_LINUX, test x$TARGET = xMIPS_LINUX) +AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS) AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC) AM_CONDITIONAL(X86, test x$TARGET = xX86) +AM_CONDITIONAL(X86_FREEBSD, test x$TARGET = xX86_FREEBSD) AM_CONDITIONAL(X86_WIN32, test x$TARGET = xX86_WIN32) AM_CONDITIONAL(X86_DARWIN, test x$TARGET = xX86_DARWIN) AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA) @@ -103,28 +169,39 @@ AM_CONDITIONAL(PA_HPUX, test x$TARGET = xPA_HPUX) AM_CONDITIONAL(PA64_HPUX, test x$TARGET = xPA64_HPUX) -case x$TARGET in - xMIPS*) TARGET=MIPS ;; - *) ;; -esac - AC_HEADER_STDC +AC_CHECK_FUNCS(memcpy) AC_FUNC_ALLOCA + AC_CHECK_SIZEOF(double) AC_CHECK_SIZEOF(long double) # Also AC_SUBST this variable for ffi.h. -HAVE_LONG_DOUBLE=0 -if test $ac_cv_sizeof_double != $ac_cv_sizeof_long_double; then - if test $ac_cv_sizeof_long_double != 0; then - HAVE_LONG_DOUBLE=1 - AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the long double type and it is bigger than a double]) +if test -z "$HAVE_LONG_DOUBLE"; then + HAVE_LONG_DOUBLE=0 + if test $ac_cv_sizeof_double != $ac_cv_sizeof_long_double; then + if test $ac_cv_sizeof_long_double != 0; then + HAVE_LONG_DOUBLE=1 + AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the long double type and it is bigger than a double]) + fi fi fi AC_SUBST(HAVE_LONG_DOUBLE) AC_C_BIGENDIAN +AC_CACHE_CHECK([assembler .cfi pseudo-op support], + libffi_cv_as_cfi_pseudo_op, [ + libffi_cv_as_cfi_pseudo_op=unknown + AC_TRY_COMPILE([asm (".cfi_startproc\n\t.cfi_endproc");],, + [libffi_cv_as_cfi_pseudo_op=yes], + [libffi_cv_as_cfi_pseudo_op=no]) +]) +if test "x$libffi_cv_as_cfi_pseudo_op" = xyes; then + AC_DEFINE(HAVE_AS_CFI_PSEUDO_OP, 1, + [Define if your assembler supports .cfi_* directives.]) +fi + if test x$TARGET = xSPARC; then AC_CACHE_CHECK([assembler and linker support unaligned pc related relocs], libffi_cv_as_sparc_ua_pcrel, [ diff -rNu smalltalk-3.0.2/libffi/fficonfig.h.in smalltalk-3.0.3/libffi/fficonfig.h.in --- smalltalk-3.0.2/libffi/fficonfig.h.in 2008-01-22 16:40:08.000000000 +0100 +++ smalltalk-3.0.3/libffi/fficonfig.h.in 2008-04-15 09:31:41.000000000 +0200 @@ -27,6 +27,9 @@ */ #undef HAVE_ALLOCA_H +/* Define if your assembler supports .cfi_* directives. */ +#undef HAVE_AS_CFI_PSEUDO_OP + /* Define if your assembler supports .register. */ #undef HAVE_AS_REGISTER_PSEUDO_OP @@ -46,6 +49,9 @@ /* Define if you have the long double type and it is bigger than a double */ #undef HAVE_LONG_DOUBLE +/* Define to 1 if you have the `memcpy' function. */ +#undef HAVE_MEMCPY + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H diff -rNu smalltalk-3.0.2/libffi/include/Makefile.in smalltalk-3.0.3/libffi/include/Makefile.in --- smalltalk-3.0.2/libffi/include/Makefile.in 2008-01-22 16:39:17.000000000 +0100 +++ smalltalk-3.0.3/libffi/include/Makefile.in 2008-04-15 09:31:06.000000000 +0200 @@ -62,6 +62,7 @@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@ AR = @AR@ ARM_FALSE = @ARM_FALSE@ ARM_TRUE = @ARM_TRUE@ @@ -108,10 +109,8 @@ M68K_FALSE = @M68K_FALSE@ M68K_TRUE = @M68K_TRUE@ MAKEINFO = @MAKEINFO@ -MIPS_IRIX_FALSE = @MIPS_IRIX_FALSE@ -MIPS_IRIX_TRUE = @MIPS_IRIX_TRUE@ -MIPS_LINUX_FALSE = @MIPS_LINUX_FALSE@ -MIPS_LINUX_TRUE = @MIPS_LINUX_TRUE@ +MIPS_FALSE = @MIPS_FALSE@ +MIPS_TRUE = @MIPS_TRUE@ OBJEXT = @OBJEXT@ PA64_HPUX_FALSE = @PA64_HPUX_FALSE@ PA64_HPUX_TRUE = @PA64_HPUX_TRUE@ @@ -156,6 +155,8 @@ X86_DARWIN_FALSE = @X86_DARWIN_FALSE@ X86_DARWIN_TRUE = @X86_DARWIN_TRUE@ X86_FALSE = @X86_FALSE@ +X86_FREEBSD_FALSE = @X86_FREEBSD_FALSE@ +X86_FREEBSD_TRUE = @X86_FREEBSD_TRUE@ X86_TRUE = @X86_TRUE@ X86_WIN32_FALSE = @X86_WIN32_FALSE@ X86_WIN32_TRUE = @X86_WIN32_TRUE@ diff -rNu smalltalk-3.0.2/libffi/include/ffi.h.in smalltalk-3.0.3/libffi/include/ffi.h.in --- smalltalk-3.0.2/libffi/include/ffi.h.in 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/include/ffi.h.in 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,5 @@ /* -----------------------------------------------------------------*-C-*- - libffi @VERSION@ - Copyright (c) 1996-2003 Red Hat, Inc. + libffi @VERSION@ - Copyright (c) 1996-2003, 2007 Red Hat, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -12,13 +12,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ @@ -82,6 +83,18 @@ # endif #endif +/* The closure code assumes that this works on pointers, i.e. a size_t */ +/* can hold a pointer. */ + +typedef struct _ffi_type +{ + size_t size; + unsigned short alignment; + unsigned short type; + struct _ffi_type **elements; +} ffi_type; + +#ifndef LIBFFI_HIDE_BASIC_TYPES #if SCHAR_MAX == 127 # define ffi_type_uchar ffi_type_uint8 # define ffi_type_schar ffi_type_sint8 @@ -130,17 +143,6 @@ #error "long size not supported" #endif -/* The closure code assumes that this works on pointers, i.e. a size_t */ -/* can hold a pointer. */ - -typedef struct _ffi_type -{ - size_t size; - unsigned short alignment; - unsigned short type; - struct _ffi_type **elements; -} ffi_type; - /* These are defined in types.c */ extern ffi_type ffi_type_void; extern ffi_type ffi_type_uint8; @@ -153,9 +155,14 @@ extern ffi_type ffi_type_sint64; extern ffi_type ffi_type_float; extern ffi_type ffi_type_double; -extern ffi_type ffi_type_longdouble; extern ffi_type ffi_type_pointer; +#if @HAVE_LONG_DOUBLE@ +extern ffi_type ffi_type_longdouble; +#else +#define ffi_type_longdouble ffi_type_double +#endif +#endif /* LIBFFI_HIDE_BASIC_TYPES */ typedef enum { FFI_OK = 0, @@ -187,6 +194,10 @@ # endif #endif +#ifndef FFI_SIZEOF_JAVA_RAW +# define FFI_SIZEOF_JAVA_RAW FFI_SIZEOF_ARG +#endif + typedef union { ffi_sarg sint; ffi_arg uint; @@ -195,6 +206,21 @@ void* ptr; } ffi_raw; +#if FFI_SIZEOF_JAVA_RAW == 4 && FFI_SIZEOF_ARG == 8 +/* This is a special case for mips64/n32 ABI (and perhaps others) where + sizeof(void *) is 4 and FFI_SIZEOF_ARG is 8. */ +typedef union { + signed int sint; + unsigned int uint; + float flt; + char data[FFI_SIZEOF_JAVA_RAW]; + void* ptr; +} ffi_java_raw; +#else +typedef ffi_raw ffi_java_raw; +#endif + + void ffi_raw_call (ffi_cif *cif, void (*fn)(), void *rvalue, @@ -211,10 +237,10 @@ void ffi_java_raw_call (ffi_cif *cif, void (*fn)(), void *rvalue, - ffi_raw *avalue); + ffi_java_raw *avalue); -void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw); -void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args); +void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw); +void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args); size_t ffi_java_raw_size (ffi_cif *cif); /* ---- Definitions for closures ----------------------------------------- */ @@ -228,12 +254,22 @@ void *user_data; } ffi_closure __attribute__((aligned (8))); +void *ffi_closure_alloc (size_t size, void **code); +void ffi_closure_free (void *); + ffi_status ffi_prep_closure (ffi_closure*, ffi_cif *, void (*fun)(ffi_cif*,void*,void**,void*), void *user_data); +ffi_status +ffi_prep_closure_loc (ffi_closure*, + ffi_cif *, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data, + void*codeloc); + typedef struct { char tramp[FFI_TRAMPOLINE_SIZE]; @@ -255,6 +291,27 @@ } ffi_raw_closure; +typedef struct { + char tramp[FFI_TRAMPOLINE_SIZE]; + + ffi_cif *cif; + +#if !FFI_NATIVE_RAW_API + + /* if this is enabled, then a raw closure has the same layout + as a regular closure. We use this to install an intermediate + handler to do the transaltion, void** -> ffi_raw*. */ + + void (*translate_args)(ffi_cif*,void*,void**,void*); + void *this_closure; + +#endif + + void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*); + void *user_data; + +} ffi_java_raw_closure; + ffi_status ffi_prep_raw_closure (ffi_raw_closure*, ffi_cif *cif, @@ -262,11 +319,25 @@ void *user_data); ffi_status -ffi_prep_java_raw_closure (ffi_raw_closure*, +ffi_prep_raw_closure_loc (ffi_raw_closure*, + ffi_cif *cif, + void (*fun)(ffi_cif*,void*,ffi_raw*,void*), + void *user_data, + void *codeloc); + +ffi_status +ffi_prep_java_raw_closure (ffi_java_raw_closure*, ffi_cif *cif, - void (*fun)(ffi_cif*,void*,ffi_raw*,void*), + void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*), void *user_data); +ffi_status +ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*, + ffi_cif *cif, + void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*), + void *user_data, + void *codeloc); + #endif /* FFI_CLOSURES */ /* ---- Public interface definition -------------------------------------- */ @@ -318,4 +389,3 @@ #endif #endif - diff -rNu smalltalk-3.0.2/libffi/include/ffi_common.h smalltalk-3.0.3/libffi/include/ffi_common.h --- smalltalk-3.0.2/libffi/include/ffi_common.h 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/include/ffi_common.h 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,6 @@ /* ----------------------------------------------------------------------- ffi_common.h - Copyright (c) 1996 Red Hat, Inc. + Copyright (C) 2007 Free Software Foundation, Inc Common internal definitions and macros. Only necessary for building libffi. @@ -18,7 +19,9 @@ this is positioned. */ #ifdef __GNUC__ # define alloca __builtin_alloca +# define MAYBE_UNUSED __attribute__((__unused__)) #else +# define MAYBE_UNUSED # if HAVE_ALLOCA_H # include # else diff -rNu smalltalk-3.0.2/libffi/src/alpha/ffi.c smalltalk-3.0.3/libffi/src/alpha/ffi.c --- smalltalk-3.0.2/libffi/src/alpha/ffi.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/alpha/ffi.c 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- - ffi.c - Copyright (c) 1998, 2001 Red Hat, Inc. + ffi.c - Copyright (c) 1998, 2001, 2007 Red Hat, Inc. Alpha Foreign Function Interface @@ -14,22 +14,34 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ #include #include - #include -extern void ffi_call_osf(void *, unsigned long, unsigned, void *, void (*)()); -extern void ffi_closure_osf(void); +/* Force FFI_TYPE_LONGDOUBLE to be different than FFI_TYPE_DOUBLE; + all further uses in this file will refer to the 128-bit type. */ +#if defined(__LONG_DOUBLE_128__) +# if FFI_TYPE_LONGDOUBLE != 4 +# error FFI_TYPE_LONGDOUBLE out of date +# endif +#else +# undef FFI_TYPE_LONGDOUBLE +# define FFI_TYPE_LONGDOUBLE 4 +#endif + +extern void ffi_call_osf(void *, unsigned long, unsigned, void *, void (*)()) + FFI_HIDDEN; +extern void ffi_closure_osf(void) FFI_HIDDEN; ffi_status @@ -49,6 +61,11 @@ cif->flags = cif->rtype->type; break; + case FFI_TYPE_LONGDOUBLE: + /* 128-bit long double is returned in memory, like a struct. */ + cif->flags = FFI_TYPE_STRUCT; + break; + default: cif->flags = FFI_TYPE_INT; break; @@ -57,6 +74,7 @@ return FFI_OK; } + void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) { @@ -64,8 +82,6 @@ long i, avn; ffi_type **arg_types; - FFI_ASSERT (cif->abi == FFI_OSF); - /* If the return value is a struct and we don't have a return value address then we need to make one. */ if (rvalue == NULL && cif->flags == FFI_TYPE_STRUCT) @@ -84,6 +100,8 @@ while (i < avn) { + size_t size = (*arg_types)->size; + switch ((*arg_types)->type) { case FFI_TYPE_SINT8: @@ -129,6 +147,12 @@ *(double *) argp = *(double *)(* avalue); break; + case FFI_TYPE_LONGDOUBLE: + /* 128-bit long double is passed by reference. */ + *(long double **) argp = (long double *)(* avalue); + size = sizeof (long double *); + break; + case FFI_TYPE_STRUCT: memcpy(argp, *avalue, (*arg_types)->size); break; @@ -137,7 +161,7 @@ FFI_ASSERT(0); } - argp += ALIGN((*arg_types)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; + argp += ALIGN(size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; i++, arg_types++, avalue++; } @@ -146,15 +170,14 @@ ffi_status -ffi_prep_closure (ffi_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*, void*, void**, void*), - void *user_data) +ffi_prep_closure_loc (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*, void*, void**, void*), + void *user_data, + void *codeloc) { unsigned int *tramp; - FFI_ASSERT (cif->abi == FFI_OSF); - tramp = (unsigned int *) &closure->tramp[0]; tramp[0] = 0x47fb0401; /* mov $27,$1 */ tramp[1] = 0xa77b0010; /* ldq $27,16($27) */ @@ -177,7 +200,8 @@ return FFI_OK; } -int + +long FFI_HIDDEN ffi_closure_osf_inner(ffi_closure *closure, void *rvalue, unsigned long *argp) { ffi_cif *cif; @@ -205,6 +229,8 @@ /* Grab the addresses of the arguments from the stack frame. */ while (i < avn) { + size_t size = arg_types[i]->size; + switch (arg_types[i]->type) { case FFI_TYPE_SINT8: @@ -236,16 +262,22 @@ avalue[i] = &argp[argn - (argn < 6 ? 6 : 0)]; break; + case FFI_TYPE_LONGDOUBLE: + /* 128-bit long double is passed by reference. */ + avalue[i] = (long double *) argp[argn]; + size = sizeof (long double *); + break; + default: - FFI_ASSERT(0); + abort (); } - argn += ALIGN(arg_types[i]->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; + argn += ALIGN(size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; i++; } /* Invoke the closure. */ - (closure->fun) (cif, rvalue, avalue, closure->user_data); + closure->fun (cif, rvalue, avalue, closure->user_data); /* Tell ffi_closure_osf how to perform return type promotions. */ return cif->rtype->type; diff -rNu smalltalk-3.0.2/libffi/src/alpha/ffitarget.h smalltalk-3.0.3/libffi/src/alpha/ffitarget.h --- smalltalk-3.0.2/libffi/src/alpha/ffitarget.h 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/alpha/ffitarget.h 2008-04-10 11:10:57.000000000 +0200 @@ -13,13 +13,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ @@ -33,8 +34,8 @@ typedef enum ffi_abi { FFI_FIRST_ABI = 0, FFI_OSF, - FFI_DEFAULT_ABI = FFI_OSF, - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 + FFI_LAST_ABI, + FFI_DEFAULT_ABI = FFI_OSF } ffi_abi; #endif @@ -45,4 +46,3 @@ #define FFI_NATIVE_RAW_API 0 #endif - diff -rNu smalltalk-3.0.2/libffi/src/alpha/osf.S smalltalk-3.0.3/libffi/src/alpha/osf.S --- smalltalk-3.0.2/libffi/src/alpha/osf.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/alpha/osf.S 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- - osf.S - Copyright (c) 1998, 2001 Red Hat + osf.S - Copyright (c) 1998, 2001, 2007 Red Hat Alpha/OSF Foreign Function Interface @@ -17,7 +17,8 @@ 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 CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + 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. @@ -40,6 +41,8 @@ .align 3 .globl ffi_call_osf .ent ffi_call_osf + FFI_HIDDEN(ffi_call_osf) + ffi_call_osf: .frame $15, 32, $26, 0 .mask 0x4008000, -32 @@ -127,6 +130,8 @@ .align 3 .globl ffi_closure_osf .ent ffi_closure_osf + FFI_HIDDEN(ffi_closure_osf) + ffi_closure_osf: .frame $30, 16*8, $26, 0 .mask 0x4000000, -16*8 @@ -263,7 +268,7 @@ .gprel32 $load_32 # FFI_TYPE_INT .gprel32 $load_float # FFI_TYPE_FLOAT .gprel32 $load_double # FFI_TYPE_DOUBLE - .gprel32 $load_double # FFI_TYPE_LONGDOUBLE + .gprel32 $load_none # FFI_TYPE_LONGDOUBLE .gprel32 $load_u8 # FFI_TYPE_UINT8 .gprel32 $load_s8 # FFI_TYPE_SINT8 .gprel32 $load_u16 # FFI_TYPE_UINT16 diff -rNu smalltalk-3.0.2/libffi/src/arm/ffi.c smalltalk-3.0.3/libffi/src/arm/ffi.c --- smalltalk-3.0.2/libffi/src/arm/ffi.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/arm/ffi.c 2008-04-10 11:10:57.000000000 +0200 @@ -14,13 +14,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ #include @@ -40,7 +41,7 @@ argp = stack; - if ( ecif->cif->rtype->type == FFI_TYPE_STRUCT ) { + if ( ecif->cif->flags == FFI_TYPE_STRUCT ) { *(void **) argp = ecif->rvalue; argp += 4; } @@ -58,6 +59,9 @@ argp = (char *) ALIGN(argp, (*p_arg)->alignment); } + if ((*p_arg)->type == FFI_TYPE_STRUCT) + argp = (char *) ALIGN(argp, 4); + z = (*p_arg)->size; if (z < sizeof(int)) { @@ -81,7 +85,7 @@ break; case FFI_TYPE_STRUCT: - *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv); + memcpy(argp, *p_argv, (*p_arg)->size); break; default: @@ -115,7 +119,6 @@ switch (cif->rtype->type) { case FFI_TYPE_VOID: - case FFI_TYPE_STRUCT: case FFI_TYPE_FLOAT: case FFI_TYPE_DOUBLE: cif->flags = (unsigned) cif->rtype->type; @@ -126,6 +129,17 @@ cif->flags = (unsigned) FFI_TYPE_SINT64; break; + case FFI_TYPE_STRUCT: + if (cif->rtype->size <= 4) + /* A Composite Type not larger than 4 bytes is returned in r0. */ + cif->flags = (unsigned)FFI_TYPE_INT; + else + /* A Composite Type larger than 4 bytes, or whose size cannot + be determined statically ... is stored in memory at an + address passed [in r0]. */ + cif->flags = (unsigned)FFI_TYPE_STRUCT; + break; + default: cif->flags = FFI_TYPE_INT; break; @@ -141,21 +155,27 @@ { extended_cif ecif; + int small_struct = (cif->flags == FFI_TYPE_INT + && cif->rtype->type == FFI_TYPE_STRUCT); + ecif.cif = cif; ecif.avalue = avalue; + + unsigned int temp; /* If the return value is a struct and we don't have a return */ /* value address then we need to make one */ if ((rvalue == NULL) && - (cif->rtype->type == FFI_TYPE_STRUCT)) + (cif->flags == FFI_TYPE_STRUCT)) { ecif.rvalue = alloca(cif->rtype->size); } + else if (small_struct) + ecif.rvalue = &temp; else ecif.rvalue = rvalue; - - + switch (cif->abi) { case FFI_SYSV: @@ -167,4 +187,123 @@ FFI_ASSERT(0); break; } + if (small_struct) + memcpy (rvalue, &temp, cif->rtype->size); +} + +/** private members **/ + +static void ffi_prep_incoming_args_SYSV (char *stack, void **ret, + void** args, ffi_cif* cif); + +void ffi_closure_SYSV (ffi_closure *); + +/* This function is jumped to by the trampoline */ + +unsigned int +ffi_closure_SYSV_inner (closure, respp, args) + ffi_closure *closure; + void **respp; + void *args; +{ + // our various things... + ffi_cif *cif; + void **arg_area; + + cif = closure->cif; + arg_area = (void**) alloca (cif->nargs * sizeof (void*)); + + /* this call will initialize ARG_AREA, such that each + * element in that array points to the corresponding + * value on the stack; and if the function returns + * a structure, it will re-set RESP to point to the + * structure return address. */ + + ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif); + + (closure->fun) (cif, *respp, arg_area, closure->user_data); + + return cif->flags; +} + +/*@-exportheader@*/ +static void +ffi_prep_incoming_args_SYSV(char *stack, void **rvalue, + void **avalue, ffi_cif *cif) +/*@=exportheader@*/ +{ + register unsigned int i; + register void **p_argv; + register char *argp; + register ffi_type **p_arg; + + argp = stack; + + if ( cif->flags == FFI_TYPE_STRUCT ) { + *rvalue = *(void **) argp; + argp += 4; + } + + p_argv = avalue; + + for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++) + { + size_t z; + + size_t alignment = (*p_arg)->alignment; + if (alignment < 4) + alignment = 4; + /* Align if necessary */ + if ((alignment - 1) & (unsigned) argp) { + argp = (char *) ALIGN(argp, alignment); + } + + z = (*p_arg)->size; + + /* because we're little endian, this is what it turns into. */ + + *p_argv = (void*) argp; + + p_argv++; + argp += z; + } + + return; +} + +/* How to make a trampoline. */ + +#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \ +({ unsigned char *__tramp = (unsigned char*)(TRAMP); \ + unsigned int __fun = (unsigned int)(FUN); \ + unsigned int __ctx = (unsigned int)(CTX); \ + *(unsigned int*) &__tramp[0] = 0xe92d000f; /* stmfd sp!, {r0-r3} */ \ + *(unsigned int*) &__tramp[4] = 0xe59f0000; /* ldr r0, [pc] */ \ + *(unsigned int*) &__tramp[8] = 0xe59ff000; /* ldr pc, [pc] */ \ + *(unsigned int*) &__tramp[12] = __ctx; \ + *(unsigned int*) &__tramp[16] = __fun; \ + __clear_cache((&__tramp[0]), (&__tramp[19])); \ + }) + + +/* the cif must already be prep'ed */ + +ffi_status +ffi_prep_closure_loc (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data, + void *codeloc) +{ + FFI_ASSERT (cif->abi == FFI_SYSV); + + FFI_INIT_TRAMPOLINE (&closure->tramp[0], \ + &ffi_closure_SYSV, \ + codeloc); + + closure->cif = cif; + closure->user_data = user_data; + closure->fun = fun; + + return FFI_OK; } diff -rNu smalltalk-3.0.2/libffi/src/arm/ffitarget.h smalltalk-3.0.3/libffi/src/arm/ffitarget.h --- smalltalk-3.0.2/libffi/src/arm/ffitarget.h 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/arm/ffitarget.h 2008-04-10 11:10:57.000000000 +0200 @@ -13,13 +13,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ @@ -40,7 +41,8 @@ /* ---- Definitions for closures ----------------------------------------- */ -#define FFI_CLOSURES 0 +#define FFI_CLOSURES 1 +#define FFI_TRAMPOLINE_SIZE 20 #define FFI_NATIVE_RAW_API 0 #endif diff -rNu smalltalk-3.0.2/libffi/src/arm/sysv.S smalltalk-3.0.3/libffi/src/arm/sysv.S --- smalltalk-3.0.2/libffi/src/arm/sysv.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/arm/sysv.S 2008-04-10 11:10:57.000000000 +0200 @@ -17,7 +17,8 @@ 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 CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + 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. @@ -82,6 +83,14 @@ # define call_reg(x) mov lr, pc ; mov pc, x #endif +/* Conditionally compile unwinder directives. */ +#ifdef __ARM_EABI__ +#define UNWIND +#else +#define UNWIND @ +#endif + + #if defined(__thumb__) && !defined(__THUMB_INTERWORK__) .macro ARM_FUNC_START name .text @@ -92,6 +101,7 @@ bx pc nop .arm + UNWIND .fnstart /* A hook to tell gdb that we've switched to ARM mode. Also used to call directly from other local arm routines. */ _L__\name: @@ -102,6 +112,7 @@ .align 0 .arm ENTRY(\name) + UNWIND .fnstart .endm #endif @@ -134,8 +145,11 @@ ARM_FUNC_START ffi_call_SYSV @ Save registers stmfd sp!, {r0-r3, fp, lr} + UNWIND .save {r0-r3, fp, lr} mov fp, sp + UNWIND .setfp fp, sp + @ Make room for all of the new args. sub sp, fp, r2 @@ -205,5 +219,78 @@ RETLDM "r0-r3,fp" .ffi_call_SYSV_end: + UNWIND .fnend .size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV) +/* + unsigned int FFI_HIDDEN + ffi_closure_SYSV_inner (closure, respp, args) + ffi_closure *closure; + void **respp; + void *args; +*/ + +ARM_FUNC_START ffi_closure_SYSV + UNWIND .pad #16 + add ip, sp, #16 + stmfd sp!, {ip, lr} + UNWIND .save {r0, lr} + add r2, sp, #8 + .pad #16 + sub sp, sp, #16 + str sp, [sp, #8] + add r1, sp, #8 + bl ffi_closure_SYSV_inner + cmp r0, #FFI_TYPE_INT + beq .Lretint + + cmp r0, #FFI_TYPE_FLOAT +#ifdef __SOFTFP__ + beq .Lretint +#else + beq .Lretfloat +#endif + + cmp r0, #FFI_TYPE_DOUBLE +#ifdef __SOFTFP__ + beq .Lretlonglong +#else + beq .Lretdouble +#endif + + cmp r0, #FFI_TYPE_LONGDOUBLE +#ifdef __SOFTFP__ + beq .Lretlonglong +#else + beq .Lretlongdouble +#endif + + cmp r0, #FFI_TYPE_SINT64 + beq .Lretlonglong +.Lclosure_epilogue: + add sp, sp, #16 + ldmfd sp, {sp, pc} +.Lretint: + ldr r0, [sp] + b .Lclosure_epilogue +.Lretlonglong: + ldr r0, [sp] + ldr r1, [sp, #4] + b .Lclosure_epilogue + +#ifndef __SOFTFP__ +.Lretfloat: + ldfs f0, [sp] + b .Lclosure_epilogue +.Lretdouble: + ldfd f0, [sp] + b .Lclosure_epilogue +.Lretlongdouble: + ldfd f0, [sp] + b .Lclosure_epilogue +#endif + +.ffi_closure_SYSV_end: + UNWIND .fnend + .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV) + diff -rNu smalltalk-3.0.2/libffi/src/closures.c smalltalk-3.0.3/libffi/src/closures.c --- smalltalk-3.0.2/libffi/src/closures.c 1970-01-01 01:00:00.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/closures.c 2008-04-10 11:10:57.000000000 +0200 @@ -0,0 +1,575 @@ +/* ----------------------------------------------------------------------- + closures.c - Copyright (c) 2007 Red Hat, Inc. + Copyright (C) 2007 Free Software Foundation, Inc + + Code to allocate and deallocate memory for closures. + + 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. + ----------------------------------------------------------------------- */ + +#if defined __linux__ && !defined _GNU_SOURCE +#define _GNU_SOURCE 1 +#endif + +#include +#include + +#ifndef FFI_MMAP_EXEC_WRIT +# if __gnu_linux__ +/* This macro indicates it may be forbidden to map anonymous memory + with both write and execute permission. Code compiled when this + option is defined will attempt to map such pages once, but if it + fails, it falls back to creating a temporary file in a writable and + executable filesystem and mapping pages from it into separate + locations in the virtual memory space, one location writable and + another executable. */ +# define FFI_MMAP_EXEC_WRIT 1 +# endif +#endif + +#if FFI_MMAP_EXEC_WRIT && !defined FFI_MMAP_EXEC_SELINUX +# ifdef __linux__ +/* When defined to 1 check for SELinux and if SELinux is active, + don't attempt PROT_EXEC|PROT_WRITE mapping at all, as that + might cause audit messages. */ +# define FFI_MMAP_EXEC_SELINUX 1 +# endif +#endif + +#if FFI_CLOSURES + +# if FFI_MMAP_EXEC_WRIT + +#define USE_LOCKS 1 +#define USE_DL_PREFIX 1 +#define USE_BUILTIN_FFS 1 + +/* We need to use mmap, not sbrk. */ +#define HAVE_MORECORE 0 + +/* We could, in theory, support mremap, but it wouldn't buy us anything. */ +#define HAVE_MREMAP 0 + +/* We have no use for this, so save some code and data. */ +#define NO_MALLINFO 1 + +/* We need all allocations to be in regular segments, otherwise we + lose track of the corresponding code address. */ +#define DEFAULT_MMAP_THRESHOLD MAX_SIZE_T + +/* Don't allocate more than a page unless needed. */ +#define DEFAULT_GRANULARITY ((size_t)malloc_getpagesize) + +#if FFI_CLOSURE_TEST +/* Don't release single pages, to avoid a worst-case scenario of + continuously allocating and releasing single pages, but release + pairs of pages, which should do just as well given that allocations + are likely to be small. */ +#define DEFAULT_TRIM_THRESHOLD ((size_t)malloc_getpagesize) +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* We don't want sys/mman.h to be included after we redefine mmap and + dlmunmap. */ +#include +#define LACKS_SYS_MMAN_H 1 + +#if FFI_MMAP_EXEC_SELINUX +#include +#include + +static int selinux_enabled = -1; + +static int +selinux_enabled_check (void) +{ + struct statfs sfs; + FILE *f; + char *buf = NULL; + size_t len = 0; + + if (statfs ("/selinux", &sfs) >= 0 + && (unsigned int) sfs.f_type == 0xf97cff8cU) + return 1; + f = fopen ("/proc/mounts", "r"); + if (f == NULL) + return 0; + while (getline (&buf, &len, f) >= 0) + { + char *p = strchr (buf, ' '); + if (p == NULL) + break; + p = strchr (p + 1, ' '); + if (p == NULL) + break; + if (strncmp (p + 1, "selinuxfs ", 10) != 0) + { + free (buf); + fclose (f); + return 1; + } + } + free (buf); + fclose (f); + return 0; +} + +#define is_selinux_enabled() (selinux_enabled >= 0 ? selinux_enabled \ + : (selinux_enabled = selinux_enabled_check ())) + +#else + +#define is_selinux_enabled() 0 + +#endif + +/* Declare all functions defined in dlmalloc.c as static. */ +static void *dlmalloc(size_t); +static void dlfree(void*); +static void *dlcalloc(size_t, size_t) MAYBE_UNUSED; +static void *dlrealloc(void *, size_t) MAYBE_UNUSED; +static void *dlmemalign(size_t, size_t) MAYBE_UNUSED; +static void *dlvalloc(size_t) MAYBE_UNUSED; +static int dlmallopt(int, int) MAYBE_UNUSED; +static size_t dlmalloc_footprint(void) MAYBE_UNUSED; +static size_t dlmalloc_max_footprint(void) MAYBE_UNUSED; +static void** dlindependent_calloc(size_t, size_t, void**) MAYBE_UNUSED; +static void** dlindependent_comalloc(size_t, size_t*, void**) MAYBE_UNUSED; +static void *dlpvalloc(size_t) MAYBE_UNUSED; +static int dlmalloc_trim(size_t) MAYBE_UNUSED; +static size_t dlmalloc_usable_size(void*) MAYBE_UNUSED; +static void dlmalloc_stats(void) MAYBE_UNUSED; + +/* Use these for mmap and munmap within dlmalloc.c. */ +static void *dlmmap(void *, size_t, int, int, int, off_t); +static int dlmunmap(void *, size_t); + +#define mmap dlmmap +#define munmap dlmunmap + +#include "dlmalloc.c" + +#undef mmap +#undef munmap + +/* A mutex used to synchronize access to *exec* variables in this file. */ +static pthread_mutex_t open_temp_exec_file_mutex = PTHREAD_MUTEX_INITIALIZER; + +/* A file descriptor of a temporary file from which we'll map + executable pages. */ +static int execfd = -1; + +/* The amount of space already allocated from the temporary file. */ +static size_t execsize = 0; + +/* Open a temporary file name, and immediately unlink it. */ +static int +open_temp_exec_file_name (char *name) +{ + int fd = mkstemp (name); + + if (fd != -1) + unlink (name); + + return fd; +} + +/* Open a temporary file in the named directory. */ +static int +open_temp_exec_file_dir (const char *dir) +{ + static const char suffix[] = "/ffiXXXXXX"; + int lendir = strlen (dir); + char *tempname = __builtin_alloca (lendir + sizeof (suffix)); + + if (!tempname) + return -1; + + memcpy (tempname, dir, lendir); + memcpy (tempname + lendir, suffix, sizeof (suffix)); + + return open_temp_exec_file_name (tempname); +} + +/* Open a temporary file in the directory in the named environment + variable. */ +static int +open_temp_exec_file_env (const char *envvar) +{ + const char *value = getenv (envvar); + + if (!value) + return -1; + + return open_temp_exec_file_dir (value); +} + +/* Open a temporary file in an executable and writable mount point + listed in the mounts file. Subsequent calls with the same mounts + keep searching for mount points in the same file. Providing NULL + as the mounts file closes the file. */ +static int +open_temp_exec_file_mnt (const char *mounts) +{ + static const char *last_mounts; + static FILE *last_mntent; + + if (mounts != last_mounts) + { + if (last_mntent) + endmntent (last_mntent); + + last_mounts = mounts; + + if (mounts) + last_mntent = setmntent (mounts, "r"); + else + last_mntent = NULL; + } + + if (!last_mntent) + return -1; + + for (;;) + { + int fd; + struct mntent mnt; + char buf[MAXPATHLEN * 3]; + + if (getmntent_r (last_mntent, &mnt, buf, sizeof (buf))) + return -1; + + if (hasmntopt (&mnt, "ro") + || hasmntopt (&mnt, "noexec") + || access (mnt.mnt_dir, W_OK)) + continue; + + fd = open_temp_exec_file_dir (mnt.mnt_dir); + + if (fd != -1) + return fd; + } +} + +/* Instructions to look for a location to hold a temporary file that + can be mapped in for execution. */ +static struct +{ + int (*func)(const char *); + const char *arg; + int repeat; +} open_temp_exec_file_opts[] = { + { open_temp_exec_file_env, "TMPDIR", 0 }, + { open_temp_exec_file_dir, "/tmp", 0 }, + { open_temp_exec_file_dir, "/var/tmp", 0 }, + { open_temp_exec_file_dir, "/dev/shm", 0 }, + { open_temp_exec_file_env, "HOME", 0 }, + { open_temp_exec_file_mnt, "/etc/mtab", 1 }, + { open_temp_exec_file_mnt, "/proc/mounts", 1 }, +}; + +/* Current index into open_temp_exec_file_opts. */ +static int open_temp_exec_file_opts_idx = 0; + +/* Reset a current multi-call func, then advances to the next entry. + If we're at the last, go back to the first and return nonzero, + otherwise return zero. */ +static int +open_temp_exec_file_opts_next (void) +{ + if (open_temp_exec_file_opts[open_temp_exec_file_opts_idx].repeat) + open_temp_exec_file_opts[open_temp_exec_file_opts_idx].func (NULL); + + open_temp_exec_file_opts_idx++; + if (open_temp_exec_file_opts_idx + == (sizeof (open_temp_exec_file_opts) + / sizeof (*open_temp_exec_file_opts))) + { + open_temp_exec_file_opts_idx = 0; + return 1; + } + + return 0; +} + +/* Return a file descriptor of a temporary zero-sized file in a + writable and exexutable filesystem. */ +static int +open_temp_exec_file (void) +{ + int fd; + + do + { + fd = open_temp_exec_file_opts[open_temp_exec_file_opts_idx].func + (open_temp_exec_file_opts[open_temp_exec_file_opts_idx].arg); + + if (!open_temp_exec_file_opts[open_temp_exec_file_opts_idx].repeat + || fd == -1) + { + if (open_temp_exec_file_opts_next ()) + break; + } + } + while (fd == -1); + + return fd; +} + +/* Map in a chunk of memory from the temporary exec file into separate + locations in the virtual memory address space, one writable and one + executable. Returns the address of the writable portion, after + storing an offset to the corresponding executable portion at the + last word of the requested chunk. */ +static void * +dlmmap_locked (void *start, size_t length, int prot, int flags, off_t offset) +{ + void *ptr; + + if (execfd == -1) + { + open_temp_exec_file_opts_idx = 0; + retry_open: + execfd = open_temp_exec_file (); + if (execfd == -1) + return MFAIL; + } + + offset = execsize; + + if (ftruncate (execfd, offset + length)) + return MFAIL; + + flags &= ~(MAP_PRIVATE | MAP_ANONYMOUS); + flags |= MAP_SHARED; + + ptr = mmap (NULL, length, (prot & ~PROT_WRITE) | PROT_EXEC, + flags, execfd, offset); + if (ptr == MFAIL) + { + if (!offset) + { + close (execfd); + goto retry_open; + } + ftruncate (execfd, offset); + return MFAIL; + } + else if (!offset + && open_temp_exec_file_opts[open_temp_exec_file_opts_idx].repeat) + open_temp_exec_file_opts_next (); + + start = mmap (start, length, prot, flags, execfd, offset); + + if (start == MFAIL) + { + munmap (ptr, length); + ftruncate (execfd, offset); + return start; + } + + mmap_exec_offset ((char *)start, length) = (char*)ptr - (char*)start; + + execsize += length; + + return start; +} + +/* Map in a writable and executable chunk of memory if possible. + Failing that, fall back to dlmmap_locked. */ +static void * +dlmmap (void *start, size_t length, int prot, + int flags, int fd, off_t offset) +{ + void *ptr; + + assert (start == NULL && length % malloc_getpagesize == 0 + && prot == (PROT_READ | PROT_WRITE) + && flags == (MAP_PRIVATE | MAP_ANONYMOUS) + && fd == -1 && offset == 0); + +#if FFI_CLOSURE_TEST + printf ("mapping in %zi\n", length); +#endif + + if (execfd == -1 && !is_selinux_enabled ()) + { + ptr = mmap (start, length, prot | PROT_EXEC, flags, fd, offset); + + if (ptr != MFAIL || (errno != EPERM && errno != EACCES)) + /* Cool, no need to mess with separate segments. */ + return ptr; + + /* If MREMAP_DUP is ever introduced and implemented, try mmap + with ((prot & ~PROT_WRITE) | PROT_EXEC) and mremap with + MREMAP_DUP and prot at this point. */ + } + + if (execsize == 0 || execfd == -1) + { + pthread_mutex_lock (&open_temp_exec_file_mutex); + ptr = dlmmap_locked (start, length, prot, flags, offset); + pthread_mutex_unlock (&open_temp_exec_file_mutex); + + return ptr; + } + + return dlmmap_locked (start, length, prot, flags, offset); +} + +/* Release memory at the given address, as well as the corresponding + executable page if it's separate. */ +static int +dlmunmap (void *start, size_t length) +{ + /* We don't bother decreasing execsize or truncating the file, since + we can't quite tell whether we're unmapping the end of the file. + We don't expect frequent deallocation anyway. If we did, we + could locate pages in the file by writing to the pages being + deallocated and checking that the file contents change. + Yuck. */ + msegmentptr seg = segment_holding (gm, start); + void *code; + +#if FFI_CLOSURE_TEST + printf ("unmapping %zi\n", length); +#endif + + if (seg && (code = add_segment_exec_offset (start, seg)) != start) + { + int ret = munmap (code, length); + if (ret) + return ret; + } + + return munmap (start, length); +} + +#if FFI_CLOSURE_FREE_CODE +/* Return segment holding given code address. */ +static msegmentptr +segment_holding_code (mstate m, char* addr) +{ + msegmentptr sp = &m->seg; + for (;;) { + if (addr >= add_segment_exec_offset (sp->base, sp) + && addr < add_segment_exec_offset (sp->base, sp) + sp->size) + return sp; + if ((sp = sp->next) == 0) + return 0; + } +} +#endif + +/* Allocate a chunk of memory with the given size. Returns a pointer + to the writable address, and sets *CODE to the executable + corresponding virtual address. */ +void * +ffi_closure_alloc (size_t size, void **code) +{ + void *ptr; + + if (!code) + return NULL; + + ptr = dlmalloc (size); + + if (ptr) + { + msegmentptr seg = segment_holding (gm, ptr); + + *code = add_segment_exec_offset (ptr, seg); + } + + return ptr; +} + +/* Release a chunk of memory allocated with ffi_closure_alloc. If + FFI_CLOSURE_FREE_CODE is nonzero, the given address can be the + writable or the executable address given. Otherwise, only the + writable address can be provided here. */ +void +ffi_closure_free (void *ptr) +{ +#if FFI_CLOSURE_FREE_CODE + msegmentptr seg = segment_holding_code (gm, ptr); + + if (seg) + ptr = sub_segment_exec_offset (ptr, seg); +#endif + + dlfree (ptr); +} + + +#if FFI_CLOSURE_TEST +/* Do some internal sanity testing to make sure allocation and + deallocation of pages are working as intended. */ +int main () +{ + void *p[3]; +#define GET(idx, len) do { p[idx] = dlmalloc (len); printf ("allocated %zi for p[%i]\n", (len), (idx)); } while (0) +#define PUT(idx) do { printf ("freeing p[%i]\n", (idx)); dlfree (p[idx]); } while (0) + GET (0, malloc_getpagesize / 2); + GET (1, 2 * malloc_getpagesize - 64 * sizeof (void*)); + PUT (1); + GET (1, 2 * malloc_getpagesize); + GET (2, malloc_getpagesize / 2); + PUT (1); + PUT (0); + PUT (2); + return 0; +} +#endif /* FFI_CLOSURE_TEST */ +# else /* ! FFI_MMAP_EXEC_WRIT */ + +/* On many systems, memory returned by malloc is writable and + executable, so just use it. */ + +#include + +void * +ffi_closure_alloc (size_t size, void **code) +{ + if (!code) + return NULL; + + return *code = malloc (size); +} + +void +ffi_closure_free (void *ptr) +{ + free (ptr); +} + +# endif /* ! FFI_MMAP_EXEC_WRIT */ +#endif /* FFI_CLOSURES */ diff -rNu smalltalk-3.0.2/libffi/src/cris/ffi.c smalltalk-3.0.3/libffi/src/cris/ffi.c --- smalltalk-3.0.2/libffi/src/cris/ffi.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/cris/ffi.c 2008-04-10 11:10:57.000000000 +0200 @@ -2,6 +2,7 @@ ffi.c - Copyright (c) 1998 Cygnus Solutions Copyright (c) 2004 Simon Posnjak Copyright (c) 2005 Axis Communications AB + Copyright (C) 2007 Free Software Foundation, Inc. CRIS Foreign Function Interface @@ -360,10 +361,11 @@ /* API function: Prepare the trampoline. */ ffi_status -ffi_prep_closure (ffi_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif *, void *, void **, void*), - void *user_data) +ffi_prep_closure_loc (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif *, void *, void **, void*), + void *user_data, + void *codeloc) { void *innerfn = ffi_prep_closure_inner; FFI_ASSERT (cif->abi == FFI_SYSV); @@ -375,7 +377,7 @@ memcpy (closure->tramp + ffi_cris_trampoline_fn_offset, &innerfn, sizeof (void *)); memcpy (closure->tramp + ffi_cris_trampoline_closure_offset, - &closure, sizeof (void *)); + &codeloc, sizeof (void *)); return FFI_OK; } diff -rNu smalltalk-3.0.2/libffi/src/cris/ffitarget.h smalltalk-3.0.3/libffi/src/cris/ffitarget.h --- smalltalk-3.0.2/libffi/src/cris/ffitarget.h 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/cris/ffitarget.h 2008-04-10 11:10:57.000000000 +0200 @@ -13,13 +13,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ diff -rNu smalltalk-3.0.2/libffi/src/debug.c smalltalk-3.0.3/libffi/src/debug.c --- smalltalk-3.0.2/libffi/src/debug.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/debug.c 2008-04-10 11:10:57.000000000 +0200 @@ -12,13 +12,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ #include diff -rNu smalltalk-3.0.2/libffi/src/dlmalloc.c smalltalk-3.0.3/libffi/src/dlmalloc.c --- smalltalk-3.0.2/libffi/src/dlmalloc.c 1970-01-01 01:00:00.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/dlmalloc.c 2008-04-10 11:10:57.000000000 +0200 @@ -0,0 +1,5099 @@ +/* + This is a version (aka dlmalloc) of malloc/free/realloc written by + Doug Lea and released to the public domain, as explained at + http://creativecommons.org/licenses/publicdomain. Send questions, + comments, complaints, performance data, etc to dl@cs.oswego.edu + +* Version 2.8.3 Thu Sep 22 11:16:15 2005 Doug Lea (dl at gee) + + Note: There may be an updated version of this malloc obtainable at + ftp://gee.cs.oswego.edu/pub/misc/malloc.c + Check before installing! + +* Quickstart + + This library is all in one file to simplify the most common usage: + ftp it, compile it (-O3), and link it into another program. All of + the compile-time options default to reasonable values for use on + most platforms. You might later want to step through various + compile-time and dynamic tuning options. + + For convenience, an include file for code using this malloc is at: + ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.3.h + You don't really need this .h file unless you call functions not + defined in your system include files. The .h file contains only the + excerpts from this file needed for using this malloc on ANSI C/C++ + systems, so long as you haven't changed compile-time options about + naming and tuning parameters. If you do, then you can create your + own malloc.h that does include all settings by cutting at the point + indicated below. Note that you may already by default be using a C + library containing a malloc that is based on some version of this + malloc (for example in linux). You might still want to use the one + in this file to customize settings or to avoid overheads associated + with library versions. + +* Vital statistics: + + Supported pointer/size_t representation: 4 or 8 bytes + size_t MUST be an unsigned type of the same width as + pointers. (If you are using an ancient system that declares + size_t as a signed type, or need it to be a different width + than pointers, you can use a previous release of this malloc + (e.g. 2.7.2) supporting these.) + + Alignment: 8 bytes (default) + This suffices for nearly all current machines and C compilers. + However, you can define MALLOC_ALIGNMENT to be wider than this + if necessary (up to 128bytes), at the expense of using more space. + + Minimum overhead per allocated chunk: 4 or 8 bytes (if 4byte sizes) + 8 or 16 bytes (if 8byte sizes) + Each malloced chunk has a hidden word of overhead holding size + and status information, and additional cross-check word + if FOOTERS is defined. + + Minimum allocated size: 4-byte ptrs: 16 bytes (including overhead) + 8-byte ptrs: 32 bytes (including overhead) + + Even a request for zero bytes (i.e., malloc(0)) returns a + pointer to something of the minimum allocatable size. + The maximum overhead wastage (i.e., number of extra bytes + allocated than were requested in malloc) is less than or equal + to the minimum size, except for requests >= mmap_threshold that + are serviced via mmap(), where the worst case wastage is about + 32 bytes plus the remainder from a system page (the minimal + mmap unit); typically 4096 or 8192 bytes. + + Security: static-safe; optionally more or less + The "security" of malloc refers to the ability of malicious + code to accentuate the effects of errors (for example, freeing + space that is not currently malloc'ed or overwriting past the + ends of chunks) in code that calls malloc. This malloc + guarantees not to modify any memory locations below the base of + heap, i.e., static variables, even in the presence of usage + errors. The routines additionally detect most improper frees + and reallocs. All this holds as long as the static bookkeeping + for malloc itself is not corrupted by some other means. This + is only one aspect of security -- these checks do not, and + cannot, detect all possible programming errors. + + If FOOTERS is defined nonzero, then each allocated chunk + carries an additional check word to verify that it was malloced + from its space. These check words are the same within each + execution of a program using malloc, but differ across + executions, so externally crafted fake chunks cannot be + freed. This improves security by rejecting frees/reallocs that + could corrupt heap memory, in addition to the checks preventing + writes to statics that are always on. This may further improve + security at the expense of time and space overhead. (Note that + FOOTERS may also be worth using with MSPACES.) + + By default detected errors cause the program to abort (calling + "abort()"). You can override this to instead proceed past + errors by defining PROCEED_ON_ERROR. In this case, a bad free + has no effect, and a malloc that encounters a bad address + caused by user overwrites will ignore the bad address by + dropping pointers and indices to all known memory. This may + be appropriate for programs that should continue if at all + possible in the face of programming errors, although they may + run out of memory because dropped memory is never reclaimed. + + If you don't like either of these options, you can define + CORRUPTION_ERROR_ACTION and USAGE_ERROR_ACTION to do anything + else. And if if you are sure that your program using malloc has + no errors or vulnerabilities, you can define INSECURE to 1, + which might (or might not) provide a small performance improvement. + + Thread-safety: NOT thread-safe unless USE_LOCKS defined + When USE_LOCKS is defined, each public call to malloc, free, + etc is surrounded with either a pthread mutex or a win32 + spinlock (depending on WIN32). This is not especially fast, and + can be a major bottleneck. It is designed only to provide + minimal protection in concurrent environments, and to provide a + basis for extensions. If you are using malloc in a concurrent + program, consider instead using ptmalloc, which is derived from + a version of this malloc. (See http://www.malloc.de). + + System requirements: Any combination of MORECORE and/or MMAP/MUNMAP + This malloc can use unix sbrk or any emulation (invoked using + the CALL_MORECORE macro) and/or mmap/munmap or any emulation + (invoked using CALL_MMAP/CALL_MUNMAP) to get and release system + memory. On most unix systems, it tends to work best if both + MORECORE and MMAP are enabled. On Win32, it uses emulations + based on VirtualAlloc. It also uses common C library functions + like memset. + + Compliance: I believe it is compliant with the Single Unix Specification + (See http://www.unix.org). Also SVID/XPG, ANSI C, and probably + others as well. + +* Overview of algorithms + + This is not the fastest, most space-conserving, most portable, or + most tunable malloc ever written. However it is among the fastest + while also being among the most space-conserving, portable and + tunable. Consistent balance across these factors results in a good + general-purpose allocator for malloc-intensive programs. + + In most ways, this malloc is a best-fit allocator. Generally, it + chooses the best-fitting existing chunk for a request, with ties + broken in approximately least-recently-used order. (This strategy + normally maintains low fragmentation.) However, for requests less + than 256bytes, it deviates from best-fit when there is not an + exactly fitting available chunk by preferring to use space adjacent + to that used for the previous small request, as well as by breaking + ties in approximately most-recently-used order. (These enhance + locality of series of small allocations.) And for very large requests + (>= 256Kb by default), it relies on system memory mapping + facilities, if supported. (This helps avoid carrying around and + possibly fragmenting memory used only for large chunks.) + + All operations (except malloc_stats and mallinfo) have execution + times that are bounded by a constant factor of the number of bits in + a size_t, not counting any clearing in calloc or copying in realloc, + or actions surrounding MORECORE and MMAP that have times + proportional to the number of non-contiguous regions returned by + system allocation routines, which is often just 1. + + The implementation is not very modular and seriously overuses + macros. Perhaps someday all C compilers will do as good a job + inlining modular code as can now be done by brute-force expansion, + but now, enough of them seem not to. + + Some compilers issue a lot of warnings about code that is + dead/unreachable only on some platforms, and also about intentional + uses of negation on unsigned types. All known cases of each can be + ignored. + + For a longer but out of date high-level description, see + http://gee.cs.oswego.edu/dl/html/malloc.html + +* MSPACES + If MSPACES is defined, then in addition to malloc, free, etc., + this file also defines mspace_malloc, mspace_free, etc. These + are versions of malloc routines that take an "mspace" argument + obtained using create_mspace, to control all internal bookkeeping. + If ONLY_MSPACES is defined, only these versions are compiled. + So if you would like to use this allocator for only some allocations, + and your system malloc for others, you can compile with + ONLY_MSPACES and then do something like... + static mspace mymspace = create_mspace(0,0); // for example + #define mymalloc(bytes) mspace_malloc(mymspace, bytes) + + (Note: If you only need one instance of an mspace, you can instead + use "USE_DL_PREFIX" to relabel the global malloc.) + + You can similarly create thread-local allocators by storing + mspaces as thread-locals. For example: + static __thread mspace tlms = 0; + void* tlmalloc(size_t bytes) { + if (tlms == 0) tlms = create_mspace(0, 0); + return mspace_malloc(tlms, bytes); + } + void tlfree(void* mem) { mspace_free(tlms, mem); } + + Unless FOOTERS is defined, each mspace is completely independent. + You cannot allocate from one and free to another (although + conformance is only weakly checked, so usage errors are not always + caught). If FOOTERS is defined, then each chunk carries around a tag + indicating its originating mspace, and frees are directed to their + originating spaces. + + ------------------------- Compile-time options --------------------------- + +Be careful in setting #define values for numerical constants of type +size_t. On some systems, literal values are not automatically extended +to size_t precision unless they are explicitly casted. + +WIN32 default: defined if _WIN32 defined + Defining WIN32 sets up defaults for MS environment and compilers. + Otherwise defaults are for unix. + +MALLOC_ALIGNMENT default: (size_t)8 + Controls the minimum alignment for malloc'ed chunks. It must be a + power of two and at least 8, even on machines for which smaller + alignments would suffice. It may be defined as larger than this + though. Note however that code and data structures are optimized for + the case of 8-byte alignment. + +MSPACES default: 0 (false) + If true, compile in support for independent allocation spaces. + This is only supported if HAVE_MMAP is true. + +ONLY_MSPACES default: 0 (false) + If true, only compile in mspace versions, not regular versions. + +USE_LOCKS default: 0 (false) + Causes each call to each public routine to be surrounded with + pthread or WIN32 mutex lock/unlock. (If set true, this can be + overridden on a per-mspace basis for mspace versions.) + +FOOTERS default: 0 + If true, provide extra checking and dispatching by placing + information in the footers of allocated chunks. This adds + space and time overhead. + +INSECURE default: 0 + If true, omit checks for usage errors and heap space overwrites. + +USE_DL_PREFIX default: NOT defined + Causes compiler to prefix all public routines with the string 'dl'. + This can be useful when you only want to use this malloc in one part + of a program, using your regular system malloc elsewhere. + +ABORT default: defined as abort() + Defines how to abort on failed checks. On most systems, a failed + check cannot die with an "assert" or even print an informative + message, because the underlying print routines in turn call malloc, + which will fail again. Generally, the best policy is to simply call + abort(). It's not very useful to do more than this because many + errors due to overwriting will show up as address faults (null, odd + addresses etc) rather than malloc-triggered checks, so will also + abort. Also, most compilers know that abort() does not return, so + can better optimize code conditionally calling it. + +PROCEED_ON_ERROR default: defined as 0 (false) + Controls whether detected bad addresses cause them to bypassed + rather than aborting. If set, detected bad arguments to free and + realloc are ignored. And all bookkeeping information is zeroed out + upon a detected overwrite of freed heap space, thus losing the + ability to ever return it from malloc again, but enabling the + application to proceed. If PROCEED_ON_ERROR is defined, the + static variable malloc_corruption_error_count is compiled in + and can be examined to see if errors have occurred. This option + generates slower code than the default abort policy. + +DEBUG default: NOT defined + The DEBUG setting is mainly intended for people trying to modify + this code or diagnose problems when porting to new platforms. + However, it may also be able to better isolate user errors than just + using runtime checks. The assertions in the check routines spell + out in more detail the assumptions and invariants underlying the + algorithms. The checking is fairly extensive, and will slow down + execution noticeably. Calling malloc_stats or mallinfo with DEBUG + set will attempt to check every non-mmapped allocated and free chunk + in the course of computing the summaries. + +ABORT_ON_ASSERT_FAILURE default: defined as 1 (true) + Debugging assertion failures can be nearly impossible if your + version of the assert macro causes malloc to be called, which will + lead to a cascade of further failures, blowing the runtime stack. + ABORT_ON_ASSERT_FAILURE cause assertions failures to call abort(), + which will usually make debugging easier. + +MALLOC_FAILURE_ACTION default: sets errno to ENOMEM, or no-op on win32 + The action to take before "return 0" when malloc fails to be able to + return memory because there is none available. + +HAVE_MORECORE default: 1 (true) unless win32 or ONLY_MSPACES + True if this system supports sbrk or an emulation of it. + +MORECORE default: sbrk + The name of the sbrk-style system routine to call to obtain more + memory. See below for guidance on writing custom MORECORE + functions. The type of the argument to sbrk/MORECORE varies across + systems. It cannot be size_t, because it supports negative + arguments, so it is normally the signed type of the same width as + size_t (sometimes declared as "intptr_t"). It doesn't much matter + though. Internally, we only call it with arguments less than half + the max value of a size_t, which should work across all reasonable + possibilities, although sometimes generating compiler warnings. See + near the end of this file for guidelines for creating a custom + version of MORECORE. + +MORECORE_CONTIGUOUS default: 1 (true) + If true, take advantage of fact that consecutive calls to MORECORE + with positive arguments always return contiguous increasing + addresses. This is true of unix sbrk. It does not hurt too much to + set it true anyway, since malloc copes with non-contiguities. + Setting it false when definitely non-contiguous saves time + and possibly wasted space it would take to discover this though. + +MORECORE_CANNOT_TRIM default: NOT defined + True if MORECORE cannot release space back to the system when given + negative arguments. This is generally necessary only if you are + using a hand-crafted MORECORE function that cannot handle negative + arguments. + +HAVE_MMAP default: 1 (true) + True if this system supports mmap or an emulation of it. If so, and + HAVE_MORECORE is not true, MMAP is used for all system + allocation. If set and HAVE_MORECORE is true as well, MMAP is + primarily used to directly allocate very large blocks. It is also + used as a backup strategy in cases where MORECORE fails to provide + space from system. Note: A single call to MUNMAP is assumed to be + able to unmap memory that may have be allocated using multiple calls + to MMAP, so long as they are adjacent. + +HAVE_MREMAP default: 1 on linux, else 0 + If true realloc() uses mremap() to re-allocate large blocks and + extend or shrink allocation spaces. + +MMAP_CLEARS default: 1 on unix + True if mmap clears memory so calloc doesn't need to. This is true + for standard unix mmap using /dev/zero. + +USE_BUILTIN_FFS default: 0 (i.e., not used) + Causes malloc to use the builtin ffs() function to compute indices. + Some compilers may recognize and intrinsify ffs to be faster than the + supplied C version. Also, the case of x86 using gcc is special-cased + to an asm instruction, so is already as fast as it can be, and so + this setting has no effect. (On most x86s, the asm version is only + slightly faster than the C version.) + +malloc_getpagesize default: derive from system includes, or 4096. + The system page size. To the extent possible, this malloc manages + memory from the system in page-size units. This may be (and + usually is) a function rather than a constant. This is ignored + if WIN32, where page size is determined using getSystemInfo during + initialization. + +USE_DEV_RANDOM default: 0 (i.e., not used) + Causes malloc to use /dev/random to initialize secure magic seed for + stamping footers. Otherwise, the current time is used. + +NO_MALLINFO default: 0 + If defined, don't compile "mallinfo". This can be a simple way + of dealing with mismatches between system declarations and + those in this file. + +MALLINFO_FIELD_TYPE default: size_t + The type of the fields in the mallinfo struct. This was originally + defined as "int" in SVID etc, but is more usefully defined as + size_t. The value is used only if HAVE_USR_INCLUDE_MALLOC_H is not set + +REALLOC_ZERO_BYTES_FREES default: not defined + This should be set if a call to realloc with zero bytes should + be the same as a call to free. Some people think it should. Otherwise, + since this malloc returns a unique pointer for malloc(0), so does + realloc(p, 0). + +LACKS_UNISTD_H, LACKS_FCNTL_H, LACKS_SYS_PARAM_H, LACKS_SYS_MMAN_H +LACKS_STRINGS_H, LACKS_STRING_H, LACKS_SYS_TYPES_H, LACKS_ERRNO_H +LACKS_STDLIB_H default: NOT defined unless on WIN32 + Define these if your system does not have these header files. + You might need to manually insert some of the declarations they provide. + +DEFAULT_GRANULARITY default: page size if MORECORE_CONTIGUOUS, + system_info.dwAllocationGranularity in WIN32, + otherwise 64K. + Also settable using mallopt(M_GRANULARITY, x) + The unit for allocating and deallocating memory from the system. On + most systems with contiguous MORECORE, there is no reason to + make this more than a page. However, systems with MMAP tend to + either require or encourage larger granularities. You can increase + this value to prevent system allocation functions to be called so + often, especially if they are slow. The value must be at least one + page and must be a power of two. Setting to 0 causes initialization + to either page size or win32 region size. (Note: In previous + versions of malloc, the equivalent of this option was called + "TOP_PAD") + +DEFAULT_TRIM_THRESHOLD default: 2MB + Also settable using mallopt(M_TRIM_THRESHOLD, x) + The maximum amount of unused top-most memory to keep before + releasing via malloc_trim in free(). Automatic trimming is mainly + useful in long-lived programs using contiguous MORECORE. Because + trimming via sbrk can be slow on some systems, and can sometimes be + wasteful (in cases where programs immediately afterward allocate + more large chunks) the value should be high enough so that your + overall system performance would improve by releasing this much + memory. As a rough guide, you might set to a value close to the + average size of a process (program) running on your system. + Releasing this much memory would allow such a process to run in + memory. Generally, it is worth tuning trim thresholds when a + program undergoes phases where several large chunks are allocated + and released in ways that can reuse each other's storage, perhaps + mixed with phases where there are no such chunks at all. The trim + value must be greater than page size to have any useful effect. To + disable trimming completely, you can set to MAX_SIZE_T. Note that the trick + some people use of mallocing a huge space and then freeing it at + program startup, in an attempt to reserve system memory, doesn't + have the intended effect under automatic trimming, since that memory + will immediately be returned to the system. + +DEFAULT_MMAP_THRESHOLD default: 256K + Also settable using mallopt(M_MMAP_THRESHOLD, x) + The request size threshold for using MMAP to directly service a + request. Requests of at least this size that cannot be allocated + using already-existing space will be serviced via mmap. (If enough + normal freed space already exists it is used instead.) Using mmap + segregates relatively large chunks of memory so that they can be + individually obtained and released from the host system. A request + serviced through mmap is never reused by any other request (at least + not directly; the system may just so happen to remap successive + requests to the same locations). Segregating space in this way has + the benefits that: Mmapped space can always be individually released + back to the system, which helps keep the system level memory demands + of a long-lived program low. Also, mapped memory doesn't become + `locked' between other chunks, as can happen with normally allocated + chunks, which means that even trimming via malloc_trim would not + release them. However, it has the disadvantage that the space + cannot be reclaimed, consolidated, and then used to service later + requests, as happens with normal chunks. The advantages of mmap + nearly always outweigh disadvantages for "large" chunks, but the + value of "large" may vary across systems. The default is an + empirically derived value that works well in most systems. You can + disable mmap by setting to MAX_SIZE_T. + +*/ + +#ifndef WIN32 +#ifdef _WIN32 +#define WIN32 1 +#endif /* _WIN32 */ +#endif /* WIN32 */ +#ifdef WIN32 +#define WIN32_LEAN_AND_MEAN +#include +#define HAVE_MMAP 1 +#define HAVE_MORECORE 0 +#define LACKS_UNISTD_H +#define LACKS_SYS_PARAM_H +#define LACKS_SYS_MMAN_H +#define LACKS_STRING_H +#define LACKS_STRINGS_H +#define LACKS_SYS_TYPES_H +#define LACKS_ERRNO_H +#define MALLOC_FAILURE_ACTION +#define MMAP_CLEARS 0 /* WINCE and some others apparently don't clear */ +#endif /* WIN32 */ + +#if defined(DARWIN) || defined(_DARWIN) +/* Mac OSX docs advise not to use sbrk; it seems better to use mmap */ +#ifndef HAVE_MORECORE +#define HAVE_MORECORE 0 +#define HAVE_MMAP 1 +#endif /* HAVE_MORECORE */ +#endif /* DARWIN */ + +#ifndef LACKS_SYS_TYPES_H +#include /* For size_t */ +#endif /* LACKS_SYS_TYPES_H */ + +/* The maximum possible size_t value has all bits set */ +#define MAX_SIZE_T (~(size_t)0) + +#ifndef ONLY_MSPACES +#define ONLY_MSPACES 0 +#endif /* ONLY_MSPACES */ +#ifndef MSPACES +#if ONLY_MSPACES +#define MSPACES 1 +#else /* ONLY_MSPACES */ +#define MSPACES 0 +#endif /* ONLY_MSPACES */ +#endif /* MSPACES */ +#ifndef MALLOC_ALIGNMENT +#define MALLOC_ALIGNMENT ((size_t)8U) +#endif /* MALLOC_ALIGNMENT */ +#ifndef FOOTERS +#define FOOTERS 0 +#endif /* FOOTERS */ +#ifndef ABORT +#define ABORT abort() +#endif /* ABORT */ +#ifndef ABORT_ON_ASSERT_FAILURE +#define ABORT_ON_ASSERT_FAILURE 1 +#endif /* ABORT_ON_ASSERT_FAILURE */ +#ifndef PROCEED_ON_ERROR +#define PROCEED_ON_ERROR 0 +#endif /* PROCEED_ON_ERROR */ +#ifndef USE_LOCKS +#define USE_LOCKS 0 +#endif /* USE_LOCKS */ +#ifndef INSECURE +#define INSECURE 0 +#endif /* INSECURE */ +#ifndef HAVE_MMAP +#define HAVE_MMAP 1 +#endif /* HAVE_MMAP */ +#ifndef MMAP_CLEARS +#define MMAP_CLEARS 1 +#endif /* MMAP_CLEARS */ +#ifndef HAVE_MREMAP +#ifdef linux +#define HAVE_MREMAP 1 +#else /* linux */ +#define HAVE_MREMAP 0 +#endif /* linux */ +#endif /* HAVE_MREMAP */ +#ifndef MALLOC_FAILURE_ACTION +#define MALLOC_FAILURE_ACTION errno = ENOMEM; +#endif /* MALLOC_FAILURE_ACTION */ +#ifndef HAVE_MORECORE +#if ONLY_MSPACES +#define HAVE_MORECORE 0 +#else /* ONLY_MSPACES */ +#define HAVE_MORECORE 1 +#endif /* ONLY_MSPACES */ +#endif /* HAVE_MORECORE */ +#if !HAVE_MORECORE +#define MORECORE_CONTIGUOUS 0 +#else /* !HAVE_MORECORE */ +#ifndef MORECORE +#define MORECORE sbrk +#endif /* MORECORE */ +#ifndef MORECORE_CONTIGUOUS +#define MORECORE_CONTIGUOUS 1 +#endif /* MORECORE_CONTIGUOUS */ +#endif /* HAVE_MORECORE */ +#ifndef DEFAULT_GRANULARITY +#if MORECORE_CONTIGUOUS +#define DEFAULT_GRANULARITY (0) /* 0 means to compute in init_mparams */ +#else /* MORECORE_CONTIGUOUS */ +#define DEFAULT_GRANULARITY ((size_t)64U * (size_t)1024U) +#endif /* MORECORE_CONTIGUOUS */ +#endif /* DEFAULT_GRANULARITY */ +#ifndef DEFAULT_TRIM_THRESHOLD +#ifndef MORECORE_CANNOT_TRIM +#define DEFAULT_TRIM_THRESHOLD ((size_t)2U * (size_t)1024U * (size_t)1024U) +#else /* MORECORE_CANNOT_TRIM */ +#define DEFAULT_TRIM_THRESHOLD MAX_SIZE_T +#endif /* MORECORE_CANNOT_TRIM */ +#endif /* DEFAULT_TRIM_THRESHOLD */ +#ifndef DEFAULT_MMAP_THRESHOLD +#if HAVE_MMAP +#define DEFAULT_MMAP_THRESHOLD ((size_t)256U * (size_t)1024U) +#else /* HAVE_MMAP */ +#define DEFAULT_MMAP_THRESHOLD MAX_SIZE_T +#endif /* HAVE_MMAP */ +#endif /* DEFAULT_MMAP_THRESHOLD */ +#ifndef USE_BUILTIN_FFS +#define USE_BUILTIN_FFS 0 +#endif /* USE_BUILTIN_FFS */ +#ifndef USE_DEV_RANDOM +#define USE_DEV_RANDOM 0 +#endif /* USE_DEV_RANDOM */ +#ifndef NO_MALLINFO +#define NO_MALLINFO 0 +#endif /* NO_MALLINFO */ +#ifndef MALLINFO_FIELD_TYPE +#define MALLINFO_FIELD_TYPE size_t +#endif /* MALLINFO_FIELD_TYPE */ + +/* + mallopt tuning options. SVID/XPG defines four standard parameter + numbers for mallopt, normally defined in malloc.h. None of these + are used in this malloc, so setting them has no effect. But this + malloc does support the following options. +*/ + +#define M_TRIM_THRESHOLD (-1) +#define M_GRANULARITY (-2) +#define M_MMAP_THRESHOLD (-3) + +/* ------------------------ Mallinfo declarations ------------------------ */ + +#if !NO_MALLINFO +/* + This version of malloc supports the standard SVID/XPG mallinfo + routine that returns a struct containing usage properties and + statistics. It should work on any system that has a + /usr/include/malloc.h defining struct mallinfo. The main + declaration needed is the mallinfo struct that is returned (by-copy) + by mallinfo(). The malloinfo struct contains a bunch of fields that + are not even meaningful in this version of malloc. These fields are + are instead filled by mallinfo() with other numbers that might be of + interest. + + HAVE_USR_INCLUDE_MALLOC_H should be set if you have a + /usr/include/malloc.h file that includes a declaration of struct + mallinfo. If so, it is included; else a compliant version is + declared below. These must be precisely the same for mallinfo() to + work. The original SVID version of this struct, defined on most + systems with mallinfo, declares all fields as ints. But some others + define as unsigned long. If your system defines the fields using a + type of different width than listed here, you MUST #include your + system version and #define HAVE_USR_INCLUDE_MALLOC_H. +*/ + +/* #define HAVE_USR_INCLUDE_MALLOC_H */ + +#ifdef HAVE_USR_INCLUDE_MALLOC_H +#include "/usr/include/malloc.h" +#else /* HAVE_USR_INCLUDE_MALLOC_H */ + +struct mallinfo { + MALLINFO_FIELD_TYPE arena; /* non-mmapped space allocated from system */ + MALLINFO_FIELD_TYPE ordblks; /* number of free chunks */ + MALLINFO_FIELD_TYPE smblks; /* always 0 */ + MALLINFO_FIELD_TYPE hblks; /* always 0 */ + MALLINFO_FIELD_TYPE hblkhd; /* space in mmapped regions */ + MALLINFO_FIELD_TYPE usmblks; /* maximum total allocated space */ + MALLINFO_FIELD_TYPE fsmblks; /* always 0 */ + MALLINFO_FIELD_TYPE uordblks; /* total allocated space */ + MALLINFO_FIELD_TYPE fordblks; /* total free space */ + MALLINFO_FIELD_TYPE keepcost; /* releasable (via malloc_trim) space */ +}; + +#endif /* HAVE_USR_INCLUDE_MALLOC_H */ +#endif /* NO_MALLINFO */ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#if !ONLY_MSPACES + +/* ------------------- Declarations of public routines ------------------- */ + +#ifndef USE_DL_PREFIX +#define dlcalloc calloc +#define dlfree free +#define dlmalloc malloc +#define dlmemalign memalign +#define dlrealloc realloc +#define dlvalloc valloc +#define dlpvalloc pvalloc +#define dlmallinfo mallinfo +#define dlmallopt mallopt +#define dlmalloc_trim malloc_trim +#define dlmalloc_stats malloc_stats +#define dlmalloc_usable_size malloc_usable_size +#define dlmalloc_footprint malloc_footprint +#define dlmalloc_max_footprint malloc_max_footprint +#define dlindependent_calloc independent_calloc +#define dlindependent_comalloc independent_comalloc +#endif /* USE_DL_PREFIX */ + + +/* + malloc(size_t n) + Returns a pointer to a newly allocated chunk of at least n bytes, or + null if no space is available, in which case errno is set to ENOMEM + on ANSI C systems. + + If n is zero, malloc returns a minimum-sized chunk. (The minimum + size is 16 bytes on most 32bit systems, and 32 bytes on 64bit + systems.) Note that size_t is an unsigned type, so calls with + arguments that would be negative if signed are interpreted as + requests for huge amounts of space, which will often fail. The + maximum supported value of n differs across systems, but is in all + cases less than the maximum representable value of a size_t. +*/ +void* dlmalloc(size_t); + +/* + free(void* p) + Releases the chunk of memory pointed to by p, that had been previously + allocated using malloc or a related routine such as realloc. + It has no effect if p is null. If p was not malloced or already + freed, free(p) will by default cause the current program to abort. +*/ +void dlfree(void*); + +/* + calloc(size_t n_elements, size_t element_size); + Returns a pointer to n_elements * element_size bytes, with all locations + set to zero. +*/ +void* dlcalloc(size_t, size_t); + +/* + realloc(void* p, size_t n) + Returns a pointer to a chunk of size n that contains the same data + as does chunk p up to the minimum of (n, p's size) bytes, or null + if no space is available. + + The returned pointer may or may not be the same as p. The algorithm + prefers extending p in most cases when possible, otherwise it + employs the equivalent of a malloc-copy-free sequence. + + If p is null, realloc is equivalent to malloc. + + If space is not available, realloc returns null, errno is set (if on + ANSI) and p is NOT freed. + + if n is for fewer bytes than already held by p, the newly unused + space is lopped off and freed if possible. realloc with a size + argument of zero (re)allocates a minimum-sized chunk. + + The old unix realloc convention of allowing the last-free'd chunk + to be used as an argument to realloc is not supported. +*/ + +void* dlrealloc(void*, size_t); + +/* + memalign(size_t alignment, size_t n); + Returns a pointer to a newly allocated chunk of n bytes, aligned + in accord with the alignment argument. + + The alignment argument should be a power of two. If the argument is + not a power of two, the nearest greater power is used. + 8-byte alignment is guaranteed by normal malloc calls, so don't + bother calling memalign with an argument of 8 or less. + + Overreliance on memalign is a sure way to fragment space. +*/ +void* dlmemalign(size_t, size_t); + +/* + valloc(size_t n); + Equivalent to memalign(pagesize, n), where pagesize is the page + size of the system. If the pagesize is unknown, 4096 is used. +*/ +void* dlvalloc(size_t); + +/* + mallopt(int parameter_number, int parameter_value) + Sets tunable parameters The format is to provide a + (parameter-number, parameter-value) pair. mallopt then sets the + corresponding parameter to the argument value if it can (i.e., so + long as the value is meaningful), and returns 1 if successful else + 0. SVID/XPG/ANSI defines four standard param numbers for mallopt, + normally defined in malloc.h. None of these are use in this malloc, + so setting them has no effect. But this malloc also supports other + options in mallopt. See below for details. Briefly, supported + parameters are as follows (listed defaults are for "typical" + configurations). + + Symbol param # default allowed param values + M_TRIM_THRESHOLD -1 2*1024*1024 any (MAX_SIZE_T disables) + M_GRANULARITY -2 page size any power of 2 >= page size + M_MMAP_THRESHOLD -3 256*1024 any (or 0 if no MMAP support) +*/ +int dlmallopt(int, int); + +/* + malloc_footprint(); + Returns the number of bytes obtained from the system. The total + number of bytes allocated by malloc, realloc etc., is less than this + value. Unlike mallinfo, this function returns only a precomputed + result, so can be called frequently to monitor memory consumption. + Even if locks are otherwise defined, this function does not use them, + so results might not be up to date. +*/ +size_t dlmalloc_footprint(void); + +/* + malloc_max_footprint(); + Returns the maximum number of bytes obtained from the system. This + value will be greater than current footprint if deallocated space + has been reclaimed by the system. The peak number of bytes allocated + by malloc, realloc etc., is less than this value. Unlike mallinfo, + this function returns only a precomputed result, so can be called + frequently to monitor memory consumption. Even if locks are + otherwise defined, this function does not use them, so results might + not be up to date. +*/ +size_t dlmalloc_max_footprint(void); + +#if !NO_MALLINFO +/* + mallinfo() + Returns (by copy) a struct containing various summary statistics: + + arena: current total non-mmapped bytes allocated from system + ordblks: the number of free chunks + smblks: always zero. + hblks: current number of mmapped regions + hblkhd: total bytes held in mmapped regions + usmblks: the maximum total allocated space. This will be greater + than current total if trimming has occurred. + fsmblks: always zero + uordblks: current total allocated space (normal or mmapped) + fordblks: total free space + keepcost: the maximum number of bytes that could ideally be released + back to system via malloc_trim. ("ideally" means that + it ignores page restrictions etc.) + + Because these fields are ints, but internal bookkeeping may + be kept as longs, the reported values may wrap around zero and + thus be inaccurate. +*/ +struct mallinfo dlmallinfo(void); +#endif /* NO_MALLINFO */ + +/* + independent_calloc(size_t n_elements, size_t element_size, void* chunks[]); + + independent_calloc is similar to calloc, but instead of returning a + single cleared space, it returns an array of pointers to n_elements + independent elements that can hold contents of size elem_size, each + of which starts out cleared, and can be independently freed, + realloc'ed etc. The elements are guaranteed to be adjacently + allocated (this is not guaranteed to occur with multiple callocs or + mallocs), which may also improve cache locality in some + applications. + + The "chunks" argument is optional (i.e., may be null, which is + probably the most typical usage). If it is null, the returned array + is itself dynamically allocated and should also be freed when it is + no longer needed. Otherwise, the chunks array must be of at least + n_elements in length. It is filled in with the pointers to the + chunks. + + In either case, independent_calloc returns this pointer array, or + null if the allocation failed. If n_elements is zero and "chunks" + is null, it returns a chunk representing an array with zero elements + (which should be freed if not wanted). + + Each element must be individually freed when it is no longer + needed. If you'd like to instead be able to free all at once, you + should instead use regular calloc and assign pointers into this + space to represent elements. (In this case though, you cannot + independently free elements.) + + independent_calloc simplifies and speeds up implementations of many + kinds of pools. It may also be useful when constructing large data + structures that initially have a fixed number of fixed-sized nodes, + but the number is not known at compile time, and some of the nodes + may later need to be freed. For example: + + struct Node { int item; struct Node* next; }; + + struct Node* build_list() { + struct Node** pool; + int n = read_number_of_nodes_needed(); + if (n <= 0) return 0; + pool = (struct Node**)(independent_calloc(n, sizeof(struct Node), 0); + if (pool == 0) die(); + // organize into a linked list... + struct Node* first = pool[0]; + for (i = 0; i < n-1; ++i) + pool[i]->next = pool[i+1]; + free(pool); // Can now free the array (or not, if it is needed later) + return first; + } +*/ +void** dlindependent_calloc(size_t, size_t, void**); + +/* + independent_comalloc(size_t n_elements, size_t sizes[], void* chunks[]); + + independent_comalloc allocates, all at once, a set of n_elements + chunks with sizes indicated in the "sizes" array. It returns + an array of pointers to these elements, each of which can be + independently freed, realloc'ed etc. The elements are guaranteed to + be adjacently allocated (this is not guaranteed to occur with + multiple callocs or mallocs), which may also improve cache locality + in some applications. + + The "chunks" argument is optional (i.e., may be null). If it is null + the returned array is itself dynamically allocated and should also + be freed when it is no longer needed. Otherwise, the chunks array + must be of at least n_elements in length. It is filled in with the + pointers to the chunks. + + In either case, independent_comalloc returns this pointer array, or + null if the allocation failed. If n_elements is zero and chunks is + null, it returns a chunk representing an array with zero elements + (which should be freed if not wanted). + + Each element must be individually freed when it is no longer + needed. If you'd like to instead be able to free all at once, you + should instead use a single regular malloc, and assign pointers at + particular offsets in the aggregate space. (In this case though, you + cannot independently free elements.) + + independent_comallac differs from independent_calloc in that each + element may have a different size, and also that it does not + automatically clear elements. + + independent_comalloc can be used to speed up allocation in cases + where several structs or objects must always be allocated at the + same time. For example: + + struct Head { ... } + struct Foot { ... } + + void send_message(char* msg) { + int msglen = strlen(msg); + size_t sizes[3] = { sizeof(struct Head), msglen, sizeof(struct Foot) }; + void* chunks[3]; + if (independent_comalloc(3, sizes, chunks) == 0) + die(); + struct Head* head = (struct Head*)(chunks[0]); + char* body = (char*)(chunks[1]); + struct Foot* foot = (struct Foot*)(chunks[2]); + // ... + } + + In general though, independent_comalloc is worth using only for + larger values of n_elements. For small values, you probably won't + detect enough difference from series of malloc calls to bother. + + Overuse of independent_comalloc can increase overall memory usage, + since it cannot reuse existing noncontiguous small chunks that + might be available for some of the elements. +*/ +void** dlindependent_comalloc(size_t, size_t*, void**); + + +/* + pvalloc(size_t n); + Equivalent to valloc(minimum-page-that-holds(n)), that is, + round up n to nearest pagesize. + */ +void* dlpvalloc(size_t); + +/* + malloc_trim(size_t pad); + + If possible, gives memory back to the system (via negative arguments + to sbrk) if there is unused memory at the `high' end of the malloc + pool or in unused MMAP segments. You can call this after freeing + large blocks of memory to potentially reduce the system-level memory + requirements of a program. However, it cannot guarantee to reduce + memory. Under some allocation patterns, some large free blocks of + memory will be locked between two used chunks, so they cannot be + given back to the system. + + The `pad' argument to malloc_trim represents the amount of free + trailing space to leave untrimmed. If this argument is zero, only + the minimum amount of memory to maintain internal data structures + will be left. Non-zero arguments can be supplied to maintain enough + trailing space to service future expected allocations without having + to re-obtain memory from the system. + + Malloc_trim returns 1 if it actually released any memory, else 0. +*/ +int dlmalloc_trim(size_t); + +/* + malloc_usable_size(void* p); + + Returns the number of bytes you can actually use in + an allocated chunk, which may be more than you requested (although + often not) due to alignment and minimum size constraints. + You can use this many bytes without worrying about + overwriting other allocated objects. This is not a particularly great + programming practice. malloc_usable_size can be more useful in + debugging and assertions, for example: + + p = malloc(n); + assert(malloc_usable_size(p) >= 256); +*/ +size_t dlmalloc_usable_size(void*); + +/* + malloc_stats(); + Prints on stderr the amount of space obtained from the system (both + via sbrk and mmap), the maximum amount (which may be more than + current if malloc_trim and/or munmap got called), and the current + number of bytes allocated via malloc (or realloc, etc) but not yet + freed. Note that this is the number of bytes allocated, not the + number requested. It will be larger than the number requested + because of alignment and bookkeeping overhead. Because it includes + alignment wastage as being in use, this figure may be greater than + zero even when no user-level chunks are allocated. + + The reported current and maximum system memory can be inaccurate if + a program makes other calls to system memory allocation functions + (normally sbrk) outside of malloc. + + malloc_stats prints only the most commonly interesting statistics. + More information can be obtained by calling mallinfo. +*/ +void dlmalloc_stats(void); + +#endif /* ONLY_MSPACES */ + +#if MSPACES + +/* + mspace is an opaque type representing an independent + region of space that supports mspace_malloc, etc. +*/ +typedef void* mspace; + +/* + create_mspace creates and returns a new independent space with the + given initial capacity, or, if 0, the default granularity size. It + returns null if there is no system memory available to create the + space. If argument locked is non-zero, the space uses a separate + lock to control access. The capacity of the space will grow + dynamically as needed to service mspace_malloc requests. You can + control the sizes of incremental increases of this space by + compiling with a different DEFAULT_GRANULARITY or dynamically + setting with mallopt(M_GRANULARITY, value). +*/ +mspace create_mspace(size_t capacity, int locked); + +/* + destroy_mspace destroys the given space, and attempts to return all + of its memory back to the system, returning the total number of + bytes freed. After destruction, the results of access to all memory + used by the space become undefined. +*/ +size_t destroy_mspace(mspace msp); + +/* + create_mspace_with_base uses the memory supplied as the initial base + of a new mspace. Part (less than 128*sizeof(size_t) bytes) of this + space is used for bookkeeping, so the capacity must be at least this + large. (Otherwise 0 is returned.) When this initial space is + exhausted, additional memory will be obtained from the system. + Destroying this space will deallocate all additionally allocated + space (if possible) but not the initial base. +*/ +mspace create_mspace_with_base(void* base, size_t capacity, int locked); + +/* + mspace_malloc behaves as malloc, but operates within + the given space. +*/ +void* mspace_malloc(mspace msp, size_t bytes); + +/* + mspace_free behaves as free, but operates within + the given space. + + If compiled with FOOTERS==1, mspace_free is not actually needed. + free may be called instead of mspace_free because freed chunks from + any space are handled by their originating spaces. +*/ +void mspace_free(mspace msp, void* mem); + +/* + mspace_realloc behaves as realloc, but operates within + the given space. + + If compiled with FOOTERS==1, mspace_realloc is not actually + needed. realloc may be called instead of mspace_realloc because + realloced chunks from any space are handled by their originating + spaces. +*/ +void* mspace_realloc(mspace msp, void* mem, size_t newsize); + +/* + mspace_calloc behaves as calloc, but operates within + the given space. +*/ +void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size); + +/* + mspace_memalign behaves as memalign, but operates within + the given space. +*/ +void* mspace_memalign(mspace msp, size_t alignment, size_t bytes); + +/* + mspace_independent_calloc behaves as independent_calloc, but + operates within the given space. +*/ +void** mspace_independent_calloc(mspace msp, size_t n_elements, + size_t elem_size, void* chunks[]); + +/* + mspace_independent_comalloc behaves as independent_comalloc, but + operates within the given space. +*/ +void** mspace_independent_comalloc(mspace msp, size_t n_elements, + size_t sizes[], void* chunks[]); + +/* + mspace_footprint() returns the number of bytes obtained from the + system for this space. +*/ +size_t mspace_footprint(mspace msp); + +/* + mspace_max_footprint() returns the peak number of bytes obtained from the + system for this space. +*/ +size_t mspace_max_footprint(mspace msp); + + +#if !NO_MALLINFO +/* + mspace_mallinfo behaves as mallinfo, but reports properties of + the given space. +*/ +struct mallinfo mspace_mallinfo(mspace msp); +#endif /* NO_MALLINFO */ + +/* + mspace_malloc_stats behaves as malloc_stats, but reports + properties of the given space. +*/ +void mspace_malloc_stats(mspace msp); + +/* + mspace_trim behaves as malloc_trim, but + operates within the given space. +*/ +int mspace_trim(mspace msp, size_t pad); + +/* + An alias for mallopt. +*/ +int mspace_mallopt(int, int); + +#endif /* MSPACES */ + +#ifdef __cplusplus +}; /* end of extern "C" */ +#endif /* __cplusplus */ + +/* + ======================================================================== + To make a fully customizable malloc.h header file, cut everything + above this line, put into file malloc.h, edit to suit, and #include it + on the next line, as well as in programs that use this malloc. + ======================================================================== +*/ + +/* #include "malloc.h" */ + +/*------------------------------ internal #includes ---------------------- */ + +#ifdef WIN32 +#pragma warning( disable : 4146 ) /* no "unsigned" warnings */ +#endif /* WIN32 */ + +#include /* for printing in malloc_stats */ + +#ifndef LACKS_ERRNO_H +#include /* for MALLOC_FAILURE_ACTION */ +#endif /* LACKS_ERRNO_H */ +#if FOOTERS +#include /* for magic initialization */ +#endif /* FOOTERS */ +#ifndef LACKS_STDLIB_H +#include /* for abort() */ +#endif /* LACKS_STDLIB_H */ +#ifdef DEBUG +#if ABORT_ON_ASSERT_FAILURE +#define assert(x) if(!(x)) ABORT +#else /* ABORT_ON_ASSERT_FAILURE */ +#include +#endif /* ABORT_ON_ASSERT_FAILURE */ +#else /* DEBUG */ +#define assert(x) +#endif /* DEBUG */ +#ifndef LACKS_STRING_H +#include /* for memset etc */ +#endif /* LACKS_STRING_H */ +#if USE_BUILTIN_FFS +#ifndef LACKS_STRINGS_H +#include /* for ffs */ +#endif /* LACKS_STRINGS_H */ +#endif /* USE_BUILTIN_FFS */ +#if HAVE_MMAP +#ifndef LACKS_SYS_MMAN_H +#include /* for mmap */ +#endif /* LACKS_SYS_MMAN_H */ +#ifndef LACKS_FCNTL_H +#include +#endif /* LACKS_FCNTL_H */ +#endif /* HAVE_MMAP */ +#if HAVE_MORECORE +#ifndef LACKS_UNISTD_H +#include /* for sbrk */ +#else /* LACKS_UNISTD_H */ +#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) +extern void* sbrk(ptrdiff_t); +#endif /* FreeBSD etc */ +#endif /* LACKS_UNISTD_H */ +#endif /* HAVE_MMAP */ + +#ifndef WIN32 +#ifndef malloc_getpagesize +# ifdef _SC_PAGESIZE /* some SVR4 systems omit an underscore */ +# ifndef _SC_PAGE_SIZE +# define _SC_PAGE_SIZE _SC_PAGESIZE +# endif +# endif +# ifdef _SC_PAGE_SIZE +# define malloc_getpagesize sysconf(_SC_PAGE_SIZE) +# else +# if defined(BSD) || defined(DGUX) || defined(HAVE_GETPAGESIZE) + extern size_t getpagesize(); +# define malloc_getpagesize getpagesize() +# else +# ifdef WIN32 /* use supplied emulation of getpagesize */ +# define malloc_getpagesize getpagesize() +# else +# ifndef LACKS_SYS_PARAM_H +# include +# endif +# ifdef EXEC_PAGESIZE +# define malloc_getpagesize EXEC_PAGESIZE +# else +# ifdef NBPG +# ifndef CLSIZE +# define malloc_getpagesize NBPG +# else +# define malloc_getpagesize (NBPG * CLSIZE) +# endif +# else +# ifdef NBPC +# define malloc_getpagesize NBPC +# else +# ifdef PAGESIZE +# define malloc_getpagesize PAGESIZE +# else /* just guess */ +# define malloc_getpagesize ((size_t)4096U) +# endif +# endif +# endif +# endif +# endif +# endif +# endif +#endif +#endif + +/* ------------------- size_t and alignment properties -------------------- */ + +/* The byte and bit size of a size_t */ +#define SIZE_T_SIZE (sizeof(size_t)) +#define SIZE_T_BITSIZE (sizeof(size_t) << 3) + +/* Some constants coerced to size_t */ +/* Annoying but necessary to avoid errors on some plaftorms */ +#define SIZE_T_ZERO ((size_t)0) +#define SIZE_T_ONE ((size_t)1) +#define SIZE_T_TWO ((size_t)2) +#define TWO_SIZE_T_SIZES (SIZE_T_SIZE<<1) +#define FOUR_SIZE_T_SIZES (SIZE_T_SIZE<<2) +#define SIX_SIZE_T_SIZES (FOUR_SIZE_T_SIZES+TWO_SIZE_T_SIZES) +#define HALF_MAX_SIZE_T (MAX_SIZE_T / 2U) + +/* The bit mask value corresponding to MALLOC_ALIGNMENT */ +#define CHUNK_ALIGN_MASK (MALLOC_ALIGNMENT - SIZE_T_ONE) + +/* True if address a has acceptable alignment */ +#define is_aligned(A) (((size_t)((A)) & (CHUNK_ALIGN_MASK)) == 0) + +/* the number of bytes to offset an address to align it */ +#define align_offset(A)\ + ((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\ + ((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK)) + +/* -------------------------- MMAP preliminaries ------------------------- */ + +/* + If HAVE_MORECORE or HAVE_MMAP are false, we just define calls and + checks to fail so compiler optimizer can delete code rather than + using so many "#if"s. +*/ + + +/* MORECORE and MMAP must return MFAIL on failure */ +#define MFAIL ((void*)(MAX_SIZE_T)) +#define CMFAIL ((char*)(MFAIL)) /* defined for convenience */ + +#if !HAVE_MMAP +#define IS_MMAPPED_BIT (SIZE_T_ZERO) +#define USE_MMAP_BIT (SIZE_T_ZERO) +#define CALL_MMAP(s) MFAIL +#define CALL_MUNMAP(a, s) (-1) +#define DIRECT_MMAP(s) MFAIL + +#else /* HAVE_MMAP */ +#define IS_MMAPPED_BIT (SIZE_T_ONE) +#define USE_MMAP_BIT (SIZE_T_ONE) + +#ifndef WIN32 +#define CALL_MUNMAP(a, s) munmap((a), (s)) +#define MMAP_PROT (PROT_READ|PROT_WRITE) +#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) +#define MAP_ANONYMOUS MAP_ANON +#endif /* MAP_ANON */ +#ifdef MAP_ANONYMOUS +#define MMAP_FLAGS (MAP_PRIVATE|MAP_ANONYMOUS) +#define CALL_MMAP(s) mmap(0, (s), MMAP_PROT, MMAP_FLAGS, -1, 0) +#else /* MAP_ANONYMOUS */ +/* + Nearly all versions of mmap support MAP_ANONYMOUS, so the following + is unlikely to be needed, but is supplied just in case. +*/ +#define MMAP_FLAGS (MAP_PRIVATE) +static int dev_zero_fd = -1; /* Cached file descriptor for /dev/zero. */ +#define CALL_MMAP(s) ((dev_zero_fd < 0) ? \ + (dev_zero_fd = open("/dev/zero", O_RDWR), \ + mmap(0, (s), MMAP_PROT, MMAP_FLAGS, dev_zero_fd, 0)) : \ + mmap(0, (s), MMAP_PROT, MMAP_FLAGS, dev_zero_fd, 0)) +#endif /* MAP_ANONYMOUS */ + +#define DIRECT_MMAP(s) CALL_MMAP(s) +#else /* WIN32 */ + +/* Win32 MMAP via VirtualAlloc */ +static void* win32mmap(size_t size) { + void* ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE); + return (ptr != 0)? ptr: MFAIL; +} + +/* For direct MMAP, use MEM_TOP_DOWN to minimize interference */ +static void* win32direct_mmap(size_t size) { + void* ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT|MEM_TOP_DOWN, + PAGE_READWRITE); + return (ptr != 0)? ptr: MFAIL; +} + +/* This function supports releasing coalesed segments */ +static int win32munmap(void* ptr, size_t size) { + MEMORY_BASIC_INFORMATION minfo; + char* cptr = ptr; + while (size) { + if (VirtualQuery(cptr, &minfo, sizeof(minfo)) == 0) + return -1; + if (minfo.BaseAddress != cptr || minfo.AllocationBase != cptr || + minfo.State != MEM_COMMIT || minfo.RegionSize > size) + return -1; + if (VirtualFree(cptr, 0, MEM_RELEASE) == 0) + return -1; + cptr += minfo.RegionSize; + size -= minfo.RegionSize; + } + return 0; +} + +#define CALL_MMAP(s) win32mmap(s) +#define CALL_MUNMAP(a, s) win32munmap((a), (s)) +#define DIRECT_MMAP(s) win32direct_mmap(s) +#endif /* WIN32 */ +#endif /* HAVE_MMAP */ + +#if HAVE_MMAP && HAVE_MREMAP +#define CALL_MREMAP(addr, osz, nsz, mv) mremap((addr), (osz), (nsz), (mv)) +#else /* HAVE_MMAP && HAVE_MREMAP */ +#define CALL_MREMAP(addr, osz, nsz, mv) MFAIL +#endif /* HAVE_MMAP && HAVE_MREMAP */ + +#if HAVE_MORECORE +#define CALL_MORECORE(S) MORECORE(S) +#else /* HAVE_MORECORE */ +#define CALL_MORECORE(S) MFAIL +#endif /* HAVE_MORECORE */ + +/* mstate bit set if continguous morecore disabled or failed */ +#define USE_NONCONTIGUOUS_BIT (4U) + +/* segment bit set in create_mspace_with_base */ +#define EXTERN_BIT (8U) + + +/* --------------------------- Lock preliminaries ------------------------ */ + +#if USE_LOCKS + +/* + When locks are defined, there are up to two global locks: + + * If HAVE_MORECORE, morecore_mutex protects sequences of calls to + MORECORE. In many cases sys_alloc requires two calls, that should + not be interleaved with calls by other threads. This does not + protect against direct calls to MORECORE by other threads not + using this lock, so there is still code to cope the best we can on + interference. + + * magic_init_mutex ensures that mparams.magic and other + unique mparams values are initialized only once. +*/ + +#ifndef WIN32 +/* By default use posix locks */ +#include +#define MLOCK_T pthread_mutex_t +#define INITIAL_LOCK(l) pthread_mutex_init(l, NULL) +#define ACQUIRE_LOCK(l) pthread_mutex_lock(l) +#define RELEASE_LOCK(l) pthread_mutex_unlock(l) + +#if HAVE_MORECORE +static MLOCK_T morecore_mutex = PTHREAD_MUTEX_INITIALIZER; +#endif /* HAVE_MORECORE */ + +static MLOCK_T magic_init_mutex = PTHREAD_MUTEX_INITIALIZER; + +#else /* WIN32 */ +/* + Because lock-protected regions have bounded times, and there + are no recursive lock calls, we can use simple spinlocks. +*/ + +#define MLOCK_T long +static int win32_acquire_lock (MLOCK_T *sl) { + for (;;) { +#ifdef InterlockedCompareExchangePointer + if (!InterlockedCompareExchange(sl, 1, 0)) + return 0; +#else /* Use older void* version */ + if (!InterlockedCompareExchange((void**)sl, (void*)1, (void*)0)) + return 0; +#endif /* InterlockedCompareExchangePointer */ + Sleep (0); + } +} + +static void win32_release_lock (MLOCK_T *sl) { + InterlockedExchange (sl, 0); +} + +#define INITIAL_LOCK(l) *(l)=0 +#define ACQUIRE_LOCK(l) win32_acquire_lock(l) +#define RELEASE_LOCK(l) win32_release_lock(l) +#if HAVE_MORECORE +static MLOCK_T morecore_mutex; +#endif /* HAVE_MORECORE */ +static MLOCK_T magic_init_mutex; +#endif /* WIN32 */ + +#define USE_LOCK_BIT (2U) +#else /* USE_LOCKS */ +#define USE_LOCK_BIT (0U) +#define INITIAL_LOCK(l) +#endif /* USE_LOCKS */ + +#if USE_LOCKS && HAVE_MORECORE +#define ACQUIRE_MORECORE_LOCK() ACQUIRE_LOCK(&morecore_mutex); +#define RELEASE_MORECORE_LOCK() RELEASE_LOCK(&morecore_mutex); +#else /* USE_LOCKS && HAVE_MORECORE */ +#define ACQUIRE_MORECORE_LOCK() +#define RELEASE_MORECORE_LOCK() +#endif /* USE_LOCKS && HAVE_MORECORE */ + +#if USE_LOCKS +#define ACQUIRE_MAGIC_INIT_LOCK() ACQUIRE_LOCK(&magic_init_mutex); +#define RELEASE_MAGIC_INIT_LOCK() RELEASE_LOCK(&magic_init_mutex); +#else /* USE_LOCKS */ +#define ACQUIRE_MAGIC_INIT_LOCK() +#define RELEASE_MAGIC_INIT_LOCK() +#endif /* USE_LOCKS */ + + +/* ----------------------- Chunk representations ------------------------ */ + +/* + (The following includes lightly edited explanations by Colin Plumb.) + + The malloc_chunk declaration below is misleading (but accurate and + necessary). It declares a "view" into memory allowing access to + necessary fields at known offsets from a given base. + + Chunks of memory are maintained using a `boundary tag' method as + originally described by Knuth. (See the paper by Paul Wilson + ftp://ftp.cs.utexas.edu/pub/garbage/allocsrv.ps for a survey of such + techniques.) Sizes of free chunks are stored both in the front of + each chunk and at the end. This makes consolidating fragmented + chunks into bigger chunks fast. The head fields also hold bits + representing whether chunks are free or in use. + + Here are some pictures to make it clearer. They are "exploded" to + show that the state of a chunk can be thought of as extending from + the high 31 bits of the head field of its header through the + prev_foot and PINUSE_BIT bit of the following chunk header. + + A chunk that's in use looks like: + + chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Size of previous chunk (if P = 1) | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |P| + | Size of this chunk 1| +-+ + mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | + +- -+ + | | + +- -+ + | : + +- size - sizeof(size_t) available payload bytes -+ + : | + chunk-> +- -+ + | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1| + | Size of next chunk (may or may not be in use) | +-+ + mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + And if it's free, it looks like this: + + chunk-> +- -+ + | User payload (must be in use, or we would have merged!) | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |P| + | Size of this chunk 0| +-+ + mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Next pointer | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Prev pointer | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | : + +- size - sizeof(struct chunk) unused bytes -+ + : | + chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Size of this chunk | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0| + | Size of next chunk (must be in use, or we would have merged)| +-+ + mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | : + +- User payload -+ + : | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + |0| + +-+ + Note that since we always merge adjacent free chunks, the chunks + adjacent to a free chunk must be in use. + + Given a pointer to a chunk (which can be derived trivially from the + payload pointer) we can, in O(1) time, find out whether the adjacent + chunks are free, and if so, unlink them from the lists that they + are on and merge them with the current chunk. + + Chunks always begin on even word boundaries, so the mem portion + (which is returned to the user) is also on an even word boundary, and + thus at least double-word aligned. + + The P (PINUSE_BIT) bit, stored in the unused low-order bit of the + chunk size (which is always a multiple of two words), is an in-use + bit for the *previous* chunk. If that bit is *clear*, then the + word before the current chunk size contains the previous chunk + size, and can be used to find the front of the previous chunk. + The very first chunk allocated always has this bit set, preventing + access to non-existent (or non-owned) memory. If pinuse is set for + any given chunk, then you CANNOT determine the size of the + previous chunk, and might even get a memory addressing fault when + trying to do so. + + The C (CINUSE_BIT) bit, stored in the unused second-lowest bit of + the chunk size redundantly records whether the current chunk is + inuse. This redundancy enables usage checks within free and realloc, + and reduces indirection when freeing and consolidating chunks. + + Each freshly allocated chunk must have both cinuse and pinuse set. + That is, each allocated chunk borders either a previously allocated + and still in-use chunk, or the base of its memory arena. This is + ensured by making all allocations from the the `lowest' part of any + found chunk. Further, no free chunk physically borders another one, + so each free chunk is known to be preceded and followed by either + inuse chunks or the ends of memory. + + Note that the `foot' of the current chunk is actually represented + as the prev_foot of the NEXT chunk. This makes it easier to + deal with alignments etc but can be very confusing when trying + to extend or adapt this code. + + The exceptions to all this are + + 1. The special chunk `top' is the top-most available chunk (i.e., + the one bordering the end of available memory). It is treated + specially. Top is never included in any bin, is used only if + no other chunk is available, and is released back to the + system if it is very large (see M_TRIM_THRESHOLD). In effect, + the top chunk is treated as larger (and thus less well + fitting) than any other available chunk. The top chunk + doesn't update its trailing size field since there is no next + contiguous chunk that would have to index off it. However, + space is still allocated for it (TOP_FOOT_SIZE) to enable + separation or merging when space is extended. + + 3. Chunks allocated via mmap, which have the lowest-order bit + (IS_MMAPPED_BIT) set in their prev_foot fields, and do not set + PINUSE_BIT in their head fields. Because they are allocated + one-by-one, each must carry its own prev_foot field, which is + also used to hold the offset this chunk has within its mmapped + region, which is needed to preserve alignment. Each mmapped + chunk is trailed by the first two fields of a fake next-chunk + for sake of usage checks. + +*/ + +struct malloc_chunk { + size_t prev_foot; /* Size of previous chunk (if free). */ + size_t head; /* Size and inuse bits. */ + struct malloc_chunk* fd; /* double links -- used only if free. */ + struct malloc_chunk* bk; +}; + +typedef struct malloc_chunk mchunk; +typedef struct malloc_chunk* mchunkptr; +typedef struct malloc_chunk* sbinptr; /* The type of bins of chunks */ +typedef unsigned int bindex_t; /* Described below */ +typedef unsigned int binmap_t; /* Described below */ +typedef unsigned int flag_t; /* The type of various bit flag sets */ + +/* ------------------- Chunks sizes and alignments ----------------------- */ + +#define MCHUNK_SIZE (sizeof(mchunk)) + +#if FOOTERS +#define CHUNK_OVERHEAD (TWO_SIZE_T_SIZES) +#else /* FOOTERS */ +#define CHUNK_OVERHEAD (SIZE_T_SIZE) +#endif /* FOOTERS */ + +/* MMapped chunks need a second word of overhead ... */ +#define MMAP_CHUNK_OVERHEAD (TWO_SIZE_T_SIZES) +/* ... and additional padding for fake next-chunk at foot */ +#define MMAP_FOOT_PAD (FOUR_SIZE_T_SIZES) + +/* The smallest size we can malloc is an aligned minimal chunk */ +#define MIN_CHUNK_SIZE\ + ((MCHUNK_SIZE + CHUNK_ALIGN_MASK) & ~CHUNK_ALIGN_MASK) + +/* conversion from malloc headers to user pointers, and back */ +#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES)) +#define mem2chunk(mem) ((mchunkptr)((char*)(mem) - TWO_SIZE_T_SIZES)) +/* chunk associated with aligned address A */ +#define align_as_chunk(A) (mchunkptr)((A) + align_offset(chunk2mem(A))) + +/* Bounds on request (not chunk) sizes. */ +#define MAX_REQUEST ((-MIN_CHUNK_SIZE) << 2) +#define MIN_REQUEST (MIN_CHUNK_SIZE - CHUNK_OVERHEAD - SIZE_T_ONE) + +/* pad request bytes into a usable size */ +#define pad_request(req) \ + (((req) + CHUNK_OVERHEAD + CHUNK_ALIGN_MASK) & ~CHUNK_ALIGN_MASK) + +/* pad request, checking for minimum (but not maximum) */ +#define request2size(req) \ + (((req) < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(req)) + + +/* ------------------ Operations on head and foot fields ----------------- */ + +/* + The head field of a chunk is or'ed with PINUSE_BIT when previous + adjacent chunk in use, and or'ed with CINUSE_BIT if this chunk is in + use. If the chunk was obtained with mmap, the prev_foot field has + IS_MMAPPED_BIT set, otherwise holding the offset of the base of the + mmapped region to the base of the chunk. +*/ + +#define PINUSE_BIT (SIZE_T_ONE) +#define CINUSE_BIT (SIZE_T_TWO) +#define INUSE_BITS (PINUSE_BIT|CINUSE_BIT) + +/* Head value for fenceposts */ +#define FENCEPOST_HEAD (INUSE_BITS|SIZE_T_SIZE) + +/* extraction of fields from head words */ +#define cinuse(p) ((p)->head & CINUSE_BIT) +#define pinuse(p) ((p)->head & PINUSE_BIT) +#define chunksize(p) ((p)->head & ~(INUSE_BITS)) + +#define clear_pinuse(p) ((p)->head &= ~PINUSE_BIT) +#define clear_cinuse(p) ((p)->head &= ~CINUSE_BIT) + +/* Treat space at ptr +/- offset as a chunk */ +#define chunk_plus_offset(p, s) ((mchunkptr)(((char*)(p)) + (s))) +#define chunk_minus_offset(p, s) ((mchunkptr)(((char*)(p)) - (s))) + +/* Ptr to next or previous physical malloc_chunk. */ +#define next_chunk(p) ((mchunkptr)( ((char*)(p)) + ((p)->head & ~INUSE_BITS))) +#define prev_chunk(p) ((mchunkptr)( ((char*)(p)) - ((p)->prev_foot) )) + +/* extract next chunk's pinuse bit */ +#define next_pinuse(p) ((next_chunk(p)->head) & PINUSE_BIT) + +/* Get/set size at footer */ +#define get_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_foot) +#define set_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_foot = (s)) + +/* Set size, pinuse bit, and foot */ +#define set_size_and_pinuse_of_free_chunk(p, s)\ + ((p)->head = (s|PINUSE_BIT), set_foot(p, s)) + +/* Set size, pinuse bit, foot, and clear next pinuse */ +#define set_free_with_pinuse(p, s, n)\ + (clear_pinuse(n), set_size_and_pinuse_of_free_chunk(p, s)) + +#define is_mmapped(p)\ + (!((p)->head & PINUSE_BIT) && ((p)->prev_foot & IS_MMAPPED_BIT)) + +/* Get the internal overhead associated with chunk p */ +#define overhead_for(p)\ + (is_mmapped(p)? MMAP_CHUNK_OVERHEAD : CHUNK_OVERHEAD) + +/* Return true if malloced space is not necessarily cleared */ +#if MMAP_CLEARS +#define calloc_must_clear(p) (!is_mmapped(p)) +#else /* MMAP_CLEARS */ +#define calloc_must_clear(p) (1) +#endif /* MMAP_CLEARS */ + +/* ---------------------- Overlaid data structures ----------------------- */ + +/* + When chunks are not in use, they are treated as nodes of either + lists or trees. + + "Small" chunks are stored in circular doubly-linked lists, and look + like this: + + chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Size of previous chunk | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + `head:' | Size of chunk, in bytes |P| + mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Forward pointer to next chunk in list | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Back pointer to previous chunk in list | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Unused space (may be 0 bytes long) . + . . + . | +nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + `foot:' | Size of chunk, in bytes | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + Larger chunks are kept in a form of bitwise digital trees (aka + tries) keyed on chunksizes. Because malloc_tree_chunks are only for + free chunks greater than 256 bytes, their size doesn't impose any + constraints on user chunk sizes. Each node looks like: + + chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Size of previous chunk | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + `head:' | Size of chunk, in bytes |P| + mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Forward pointer to next chunk of same size | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Back pointer to previous chunk of same size | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Pointer to left child (child[0]) | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Pointer to right child (child[1]) | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Pointer to parent | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | bin index of this chunk | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | Unused space . + . | +nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + `foot:' | Size of chunk, in bytes | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + Each tree holding treenodes is a tree of unique chunk sizes. Chunks + of the same size are arranged in a circularly-linked list, with only + the oldest chunk (the next to be used, in our FIFO ordering) + actually in the tree. (Tree members are distinguished by a non-null + parent pointer.) If a chunk with the same size an an existing node + is inserted, it is linked off the existing node using pointers that + work in the same way as fd/bk pointers of small chunks. + + Each tree contains a power of 2 sized range of chunk sizes (the + smallest is 0x100 <= x < 0x180), which is is divided in half at each + tree level, with the chunks in the smaller half of the range (0x100 + <= x < 0x140 for the top nose) in the left subtree and the larger + half (0x140 <= x < 0x180) in the right subtree. This is, of course, + done by inspecting individual bits. + + Using these rules, each node's left subtree contains all smaller + sizes than its right subtree. However, the node at the root of each + subtree has no particular ordering relationship to either. (The + dividing line between the subtree sizes is based on trie relation.) + If we remove the last chunk of a given size from the interior of the + tree, we need to replace it with a leaf node. The tree ordering + rules permit a node to be replaced by any leaf below it. + + The smallest chunk in a tree (a common operation in a best-fit + allocator) can be found by walking a path to the leftmost leaf in + the tree. Unlike a usual binary tree, where we follow left child + pointers until we reach a null, here we follow the right child + pointer any time the left one is null, until we reach a leaf with + both child pointers null. The smallest chunk in the tree will be + somewhere along that path. + + The worst case number of steps to add, find, or remove a node is + bounded by the number of bits differentiating chunks within + bins. Under current bin calculations, this ranges from 6 up to 21 + (for 32 bit sizes) or up to 53 (for 64 bit sizes). The typical case + is of course much better. +*/ + +struct malloc_tree_chunk { + /* The first four fields must be compatible with malloc_chunk */ + size_t prev_foot; + size_t head; + struct malloc_tree_chunk* fd; + struct malloc_tree_chunk* bk; + + struct malloc_tree_chunk* child[2]; + struct malloc_tree_chunk* parent; + bindex_t index; +}; + +typedef struct malloc_tree_chunk tchunk; +typedef struct malloc_tree_chunk* tchunkptr; +typedef struct malloc_tree_chunk* tbinptr; /* The type of bins of trees */ + +/* A little helper macro for trees */ +#define leftmost_child(t) ((t)->child[0] != 0? (t)->child[0] : (t)->child[1]) + +/* ----------------------------- Segments -------------------------------- */ + +/* + Each malloc space may include non-contiguous segments, held in a + list headed by an embedded malloc_segment record representing the + top-most space. Segments also include flags holding properties of + the space. Large chunks that are directly allocated by mmap are not + included in this list. They are instead independently created and + destroyed without otherwise keeping track of them. + + Segment management mainly comes into play for spaces allocated by + MMAP. Any call to MMAP might or might not return memory that is + adjacent to an existing segment. MORECORE normally contiguously + extends the current space, so this space is almost always adjacent, + which is simpler and faster to deal with. (This is why MORECORE is + used preferentially to MMAP when both are available -- see + sys_alloc.) When allocating using MMAP, we don't use any of the + hinting mechanisms (inconsistently) supported in various + implementations of unix mmap, or distinguish reserving from + committing memory. Instead, we just ask for space, and exploit + contiguity when we get it. It is probably possible to do + better than this on some systems, but no general scheme seems + to be significantly better. + + Management entails a simpler variant of the consolidation scheme + used for chunks to reduce fragmentation -- new adjacent memory is + normally prepended or appended to an existing segment. However, + there are limitations compared to chunk consolidation that mostly + reflect the fact that segment processing is relatively infrequent + (occurring only when getting memory from system) and that we + don't expect to have huge numbers of segments: + + * Segments are not indexed, so traversal requires linear scans. (It + would be possible to index these, but is not worth the extra + overhead and complexity for most programs on most platforms.) + * New segments are only appended to old ones when holding top-most + memory; if they cannot be prepended to others, they are held in + different segments. + + Except for the top-most segment of an mstate, each segment record + is kept at the tail of its segment. Segments are added by pushing + segment records onto the list headed by &mstate.seg for the + containing mstate. + + Segment flags control allocation/merge/deallocation policies: + * If EXTERN_BIT set, then we did not allocate this segment, + and so should not try to deallocate or merge with others. + (This currently holds only for the initial segment passed + into create_mspace_with_base.) + * If IS_MMAPPED_BIT set, the segment may be merged with + other surrounding mmapped segments and trimmed/de-allocated + using munmap. + * If neither bit is set, then the segment was obtained using + MORECORE so can be merged with surrounding MORECORE'd segments + and deallocated/trimmed using MORECORE with negative arguments. +*/ + +struct malloc_segment { + char* base; /* base address */ + size_t size; /* allocated size */ + struct malloc_segment* next; /* ptr to next segment */ +#if FFI_MMAP_EXEC_WRIT + /* The mmap magic is supposed to store the address of the executable + segment at the very end of the requested block. */ + +# define mmap_exec_offset(b,s) (*(ptrdiff_t*)((b)+(s)-sizeof(ptrdiff_t))) + + /* We can only merge segments if their corresponding executable + segments are at identical offsets. */ +# define check_segment_merge(S,b,s) \ + (mmap_exec_offset((b),(s)) == (S)->exec_offset) + +# define add_segment_exec_offset(p,S) ((char*)(p) + (S)->exec_offset) +# define sub_segment_exec_offset(p,S) ((char*)(p) - (S)->exec_offset) + + /* The removal of sflags only works with HAVE_MORECORE == 0. */ + +# define get_segment_flags(S) (IS_MMAPPED_BIT) +# define set_segment_flags(S,v) \ + (((v) != IS_MMAPPED_BIT) ? (ABORT, (v)) : \ + (((S)->exec_offset = \ + mmap_exec_offset((S)->base, (S)->size)), \ + (mmap_exec_offset((S)->base + (S)->exec_offset, (S)->size) != \ + (S)->exec_offset) ? (ABORT, (v)) : \ + (mmap_exec_offset((S)->base, (S)->size) = 0), (v))) + + /* We use an offset here, instead of a pointer, because then, when + base changes, we don't have to modify this. On architectures + with segmented addresses, this might not work. */ + ptrdiff_t exec_offset; +#else + +# define get_segment_flags(S) ((S)->sflags) +# define set_segment_flags(S,v) ((S)->sflags = (v)) +# define check_segment_merge(S,b,s) (1) + + flag_t sflags; /* mmap and extern flag */ +#endif +}; + +#define is_mmapped_segment(S) (get_segment_flags(S) & IS_MMAPPED_BIT) +#define is_extern_segment(S) (get_segment_flags(S) & EXTERN_BIT) + +typedef struct malloc_segment msegment; +typedef struct malloc_segment* msegmentptr; + +/* ---------------------------- malloc_state ----------------------------- */ + +/* + A malloc_state holds all of the bookkeeping for a space. + The main fields are: + + Top + The topmost chunk of the currently active segment. Its size is + cached in topsize. The actual size of topmost space is + topsize+TOP_FOOT_SIZE, which includes space reserved for adding + fenceposts and segment records if necessary when getting more + space from the system. The size at which to autotrim top is + cached from mparams in trim_check, except that it is disabled if + an autotrim fails. + + Designated victim (dv) + This is the preferred chunk for servicing small requests that + don't have exact fits. It is normally the chunk split off most + recently to service another small request. Its size is cached in + dvsize. The link fields of this chunk are not maintained since it + is not kept in a bin. + + SmallBins + An array of bin headers for free chunks. These bins hold chunks + with sizes less than MIN_LARGE_SIZE bytes. Each bin contains + chunks of all the same size, spaced 8 bytes apart. To simplify + use in double-linked lists, each bin header acts as a malloc_chunk + pointing to the real first node, if it exists (else pointing to + itself). This avoids special-casing for headers. But to avoid + waste, we allocate only the fd/bk pointers of bins, and then use + repositioning tricks to treat these as the fields of a chunk. + + TreeBins + Treebins are pointers to the roots of trees holding a range of + sizes. There are 2 equally spaced treebins for each power of two + from TREE_SHIFT to TREE_SHIFT+16. The last bin holds anything + larger. + + Bin maps + There is one bit map for small bins ("smallmap") and one for + treebins ("treemap). Each bin sets its bit when non-empty, and + clears the bit when empty. Bit operations are then used to avoid + bin-by-bin searching -- nearly all "search" is done without ever + looking at bins that won't be selected. The bit maps + conservatively use 32 bits per map word, even if on 64bit system. + For a good description of some of the bit-based techniques used + here, see Henry S. Warren Jr's book "Hacker's Delight" (and + supplement at http://hackersdelight.org/). Many of these are + intended to reduce the branchiness of paths through malloc etc, as + well as to reduce the number of memory locations read or written. + + Segments + A list of segments headed by an embedded malloc_segment record + representing the initial space. + + Address check support + The least_addr field is the least address ever obtained from + MORECORE or MMAP. Attempted frees and reallocs of any address less + than this are trapped (unless INSECURE is defined). + + Magic tag + A cross-check field that should always hold same value as mparams.magic. + + Flags + Bits recording whether to use MMAP, locks, or contiguous MORECORE + + Statistics + Each space keeps track of current and maximum system memory + obtained via MORECORE or MMAP. + + Locking + If USE_LOCKS is defined, the "mutex" lock is acquired and released + around every public call using this mspace. +*/ + +/* Bin types, widths and sizes */ +#define NSMALLBINS (32U) +#define NTREEBINS (32U) +#define SMALLBIN_SHIFT (3U) +#define SMALLBIN_WIDTH (SIZE_T_ONE << SMALLBIN_SHIFT) +#define TREEBIN_SHIFT (8U) +#define MIN_LARGE_SIZE (SIZE_T_ONE << TREEBIN_SHIFT) +#define MAX_SMALL_SIZE (MIN_LARGE_SIZE - SIZE_T_ONE) +#define MAX_SMALL_REQUEST (MAX_SMALL_SIZE - CHUNK_ALIGN_MASK - CHUNK_OVERHEAD) + +struct malloc_state { + binmap_t smallmap; + binmap_t treemap; + size_t dvsize; + size_t topsize; + char* least_addr; + mchunkptr dv; + mchunkptr top; + size_t trim_check; + size_t magic; + mchunkptr smallbins[(NSMALLBINS+1)*2]; + tbinptr treebins[NTREEBINS]; + size_t footprint; + size_t max_footprint; + flag_t mflags; +#if USE_LOCKS + MLOCK_T mutex; /* locate lock among fields that rarely change */ +#endif /* USE_LOCKS */ + msegment seg; +}; + +typedef struct malloc_state* mstate; + +/* ------------- Global malloc_state and malloc_params ------------------- */ + +/* + malloc_params holds global properties, including those that can be + dynamically set using mallopt. There is a single instance, mparams, + initialized in init_mparams. +*/ + +struct malloc_params { + size_t magic; + size_t page_size; + size_t granularity; + size_t mmap_threshold; + size_t trim_threshold; + flag_t default_mflags; +}; + +static struct malloc_params mparams; + +/* The global malloc_state used for all non-"mspace" calls */ +static struct malloc_state _gm_; +#define gm (&_gm_) +#define is_global(M) ((M) == &_gm_) +#define is_initialized(M) ((M)->top != 0) + +/* -------------------------- system alloc setup ------------------------- */ + +/* Operations on mflags */ + +#define use_lock(M) ((M)->mflags & USE_LOCK_BIT) +#define enable_lock(M) ((M)->mflags |= USE_LOCK_BIT) +#define disable_lock(M) ((M)->mflags &= ~USE_LOCK_BIT) + +#define use_mmap(M) ((M)->mflags & USE_MMAP_BIT) +#define enable_mmap(M) ((M)->mflags |= USE_MMAP_BIT) +#define disable_mmap(M) ((M)->mflags &= ~USE_MMAP_BIT) + +#define use_noncontiguous(M) ((M)->mflags & USE_NONCONTIGUOUS_BIT) +#define disable_contiguous(M) ((M)->mflags |= USE_NONCONTIGUOUS_BIT) + +#define set_lock(M,L)\ + ((M)->mflags = (L)?\ + ((M)->mflags | USE_LOCK_BIT) :\ + ((M)->mflags & ~USE_LOCK_BIT)) + +/* page-align a size */ +#define page_align(S)\ + (((S) + (mparams.page_size)) & ~(mparams.page_size - SIZE_T_ONE)) + +/* granularity-align a size */ +#define granularity_align(S)\ + (((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE)) + +#define is_page_aligned(S)\ + (((size_t)(S) & (mparams.page_size - SIZE_T_ONE)) == 0) +#define is_granularity_aligned(S)\ + (((size_t)(S) & (mparams.granularity - SIZE_T_ONE)) == 0) + +/* True if segment S holds address A */ +#define segment_holds(S, A)\ + ((char*)(A) >= S->base && (char*)(A) < S->base + S->size) + +/* Return segment holding given address */ +static msegmentptr segment_holding(mstate m, char* addr) { + msegmentptr sp = &m->seg; + for (;;) { + if (addr >= sp->base && addr < sp->base + sp->size) + return sp; + if ((sp = sp->next) == 0) + return 0; + } +} + +/* Return true if segment contains a segment link */ +static int has_segment_link(mstate m, msegmentptr ss) { + msegmentptr sp = &m->seg; + for (;;) { + if ((char*)sp >= ss->base && (char*)sp < ss->base + ss->size) + return 1; + if ((sp = sp->next) == 0) + return 0; + } +} + +#ifndef MORECORE_CANNOT_TRIM +#define should_trim(M,s) ((s) > (M)->trim_check) +#else /* MORECORE_CANNOT_TRIM */ +#define should_trim(M,s) (0) +#endif /* MORECORE_CANNOT_TRIM */ + +/* + TOP_FOOT_SIZE is padding at the end of a segment, including space + that may be needed to place segment records and fenceposts when new + noncontiguous segments are added. +*/ +#define TOP_FOOT_SIZE\ + (align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE) + + +/* ------------------------------- Hooks -------------------------------- */ + +/* + PREACTION should be defined to return 0 on success, and nonzero on + failure. If you are not using locking, you can redefine these to do + anything you like. +*/ + +#if USE_LOCKS + +/* Ensure locks are initialized */ +#define GLOBALLY_INITIALIZE() (mparams.page_size == 0 && init_mparams()) + +#define PREACTION(M) ((GLOBALLY_INITIALIZE() || use_lock(M))? ACQUIRE_LOCK(&(M)->mutex) : 0) +#define POSTACTION(M) { if (use_lock(M)) RELEASE_LOCK(&(M)->mutex); } +#else /* USE_LOCKS */ + +#ifndef PREACTION +#define PREACTION(M) (0) +#endif /* PREACTION */ + +#ifndef POSTACTION +#define POSTACTION(M) +#endif /* POSTACTION */ + +#endif /* USE_LOCKS */ + +/* + CORRUPTION_ERROR_ACTION is triggered upon detected bad addresses. + USAGE_ERROR_ACTION is triggered on detected bad frees and + reallocs. The argument p is an address that might have triggered the + fault. It is ignored by the two predefined actions, but might be + useful in custom actions that try to help diagnose errors. +*/ + +#if PROCEED_ON_ERROR + +/* A count of the number of corruption errors causing resets */ +int malloc_corruption_error_count; + +/* default corruption action */ +static void reset_on_error(mstate m); + +#define CORRUPTION_ERROR_ACTION(m) reset_on_error(m) +#define USAGE_ERROR_ACTION(m, p) + +#else /* PROCEED_ON_ERROR */ + +#ifndef CORRUPTION_ERROR_ACTION +#define CORRUPTION_ERROR_ACTION(m) ABORT +#endif /* CORRUPTION_ERROR_ACTION */ + +#ifndef USAGE_ERROR_ACTION +#define USAGE_ERROR_ACTION(m,p) ABORT +#endif /* USAGE_ERROR_ACTION */ + +#endif /* PROCEED_ON_ERROR */ + +/* -------------------------- Debugging setup ---------------------------- */ + +#if ! DEBUG + +#define check_free_chunk(M,P) +#define check_inuse_chunk(M,P) +#define check_malloced_chunk(M,P,N) +#define check_mmapped_chunk(M,P) +#define check_malloc_state(M) +#define check_top_chunk(M,P) + +#else /* DEBUG */ +#define check_free_chunk(M,P) do_check_free_chunk(M,P) +#define check_inuse_chunk(M,P) do_check_inuse_chunk(M,P) +#define check_top_chunk(M,P) do_check_top_chunk(M,P) +#define check_malloced_chunk(M,P,N) do_check_malloced_chunk(M,P,N) +#define check_mmapped_chunk(M,P) do_check_mmapped_chunk(M,P) +#define check_malloc_state(M) do_check_malloc_state(M) + +static void do_check_any_chunk(mstate m, mchunkptr p); +static void do_check_top_chunk(mstate m, mchunkptr p); +static void do_check_mmapped_chunk(mstate m, mchunkptr p); +static void do_check_inuse_chunk(mstate m, mchunkptr p); +static void do_check_free_chunk(mstate m, mchunkptr p); +static void do_check_malloced_chunk(mstate m, void* mem, size_t s); +static void do_check_tree(mstate m, tchunkptr t); +static void do_check_treebin(mstate m, bindex_t i); +static void do_check_smallbin(mstate m, bindex_t i); +static void do_check_malloc_state(mstate m); +static int bin_find(mstate m, mchunkptr x); +static size_t traverse_and_check(mstate m); +#endif /* DEBUG */ + +/* ---------------------------- Indexing Bins ---------------------------- */ + +#define is_small(s) (((s) >> SMALLBIN_SHIFT) < NSMALLBINS) +#define small_index(s) ((s) >> SMALLBIN_SHIFT) +#define small_index2size(i) ((i) << SMALLBIN_SHIFT) +#define MIN_SMALL_INDEX (small_index(MIN_CHUNK_SIZE)) + +/* addressing by index. See above about smallbin repositioning */ +#define smallbin_at(M, i) ((sbinptr)((char*)&((M)->smallbins[(i)<<1]))) +#define treebin_at(M,i) (&((M)->treebins[i])) + +/* assign tree index for size S to variable I */ +#if defined(__GNUC__) && defined(i386) +#define compute_tree_index(S, I)\ +{\ + size_t X = S >> TREEBIN_SHIFT;\ + if (X == 0)\ + I = 0;\ + else if (X > 0xFFFF)\ + I = NTREEBINS-1;\ + else {\ + unsigned int K;\ + __asm__("bsrl %1,%0\n\t" : "=r" (K) : "rm" (X));\ + I = (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1)));\ + }\ +} +#else /* GNUC */ +#define compute_tree_index(S, I)\ +{\ + size_t X = S >> TREEBIN_SHIFT;\ + if (X == 0)\ + I = 0;\ + else if (X > 0xFFFF)\ + I = NTREEBINS-1;\ + else {\ + unsigned int Y = (unsigned int)X;\ + unsigned int N = ((Y - 0x100) >> 16) & 8;\ + unsigned int K = (((Y <<= N) - 0x1000) >> 16) & 4;\ + N += K;\ + N += K = (((Y <<= K) - 0x4000) >> 16) & 2;\ + K = 14 - N + ((Y <<= K) >> 15);\ + I = (K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1));\ + }\ +} +#endif /* GNUC */ + +/* Bit representing maximum resolved size in a treebin at i */ +#define bit_for_tree_index(i) \ + (i == NTREEBINS-1)? (SIZE_T_BITSIZE-1) : (((i) >> 1) + TREEBIN_SHIFT - 2) + +/* Shift placing maximum resolved bit in a treebin at i as sign bit */ +#define leftshift_for_tree_index(i) \ + ((i == NTREEBINS-1)? 0 : \ + ((SIZE_T_BITSIZE-SIZE_T_ONE) - (((i) >> 1) + TREEBIN_SHIFT - 2))) + +/* The size of the smallest chunk held in bin with index i */ +#define minsize_for_tree_index(i) \ + ((SIZE_T_ONE << (((i) >> 1) + TREEBIN_SHIFT)) | \ + (((size_t)((i) & SIZE_T_ONE)) << (((i) >> 1) + TREEBIN_SHIFT - 1))) + + +/* ------------------------ Operations on bin maps ----------------------- */ + +/* bit corresponding to given index */ +#define idx2bit(i) ((binmap_t)(1) << (i)) + +/* Mark/Clear bits with given index */ +#define mark_smallmap(M,i) ((M)->smallmap |= idx2bit(i)) +#define clear_smallmap(M,i) ((M)->smallmap &= ~idx2bit(i)) +#define smallmap_is_marked(M,i) ((M)->smallmap & idx2bit(i)) + +#define mark_treemap(M,i) ((M)->treemap |= idx2bit(i)) +#define clear_treemap(M,i) ((M)->treemap &= ~idx2bit(i)) +#define treemap_is_marked(M,i) ((M)->treemap & idx2bit(i)) + +/* index corresponding to given bit */ + +#if defined(__GNUC__) && defined(i386) +#define compute_bit2idx(X, I)\ +{\ + unsigned int J;\ + __asm__("bsfl %1,%0\n\t" : "=r" (J) : "rm" (X));\ + I = (bindex_t)J;\ +} + +#else /* GNUC */ +#if USE_BUILTIN_FFS +#define compute_bit2idx(X, I) I = ffs(X)-1 + +#else /* USE_BUILTIN_FFS */ +#define compute_bit2idx(X, I)\ +{\ + unsigned int Y = X - 1;\ + unsigned int K = Y >> (16-4) & 16;\ + unsigned int N = K; Y >>= K;\ + N += K = Y >> (8-3) & 8; Y >>= K;\ + N += K = Y >> (4-2) & 4; Y >>= K;\ + N += K = Y >> (2-1) & 2; Y >>= K;\ + N += K = Y >> (1-0) & 1; Y >>= K;\ + I = (bindex_t)(N + Y);\ +} +#endif /* USE_BUILTIN_FFS */ +#endif /* GNUC */ + +/* isolate the least set bit of a bitmap */ +#define least_bit(x) ((x) & -(x)) + +/* mask with all bits to left of least bit of x on */ +#define left_bits(x) ((x<<1) | -(x<<1)) + +/* mask with all bits to left of or equal to least bit of x on */ +#define same_or_left_bits(x) ((x) | -(x)) + + +/* ----------------------- Runtime Check Support ------------------------- */ + +/* + For security, the main invariant is that malloc/free/etc never + writes to a static address other than malloc_state, unless static + malloc_state itself has been corrupted, which cannot occur via + malloc (because of these checks). In essence this means that we + believe all pointers, sizes, maps etc held in malloc_state, but + check all of those linked or offsetted from other embedded data + structures. These checks are interspersed with main code in a way + that tends to minimize their run-time cost. + + When FOOTERS is defined, in addition to range checking, we also + verify footer fields of inuse chunks, which can be used guarantee + that the mstate controlling malloc/free is intact. This is a + streamlined version of the approach described by William Robertson + et al in "Run-time Detection of Heap-based Overflows" LISA'03 + http://www.usenix.org/events/lisa03/tech/robertson.html The footer + of an inuse chunk holds the xor of its mstate and a random seed, + that is checked upon calls to free() and realloc(). This is + (probablistically) unguessable from outside the program, but can be + computed by any code successfully malloc'ing any chunk, so does not + itself provide protection against code that has already broken + security through some other means. Unlike Robertson et al, we + always dynamically check addresses of all offset chunks (previous, + next, etc). This turns out to be cheaper than relying on hashes. +*/ + +#if !INSECURE +/* Check if address a is at least as high as any from MORECORE or MMAP */ +#define ok_address(M, a) ((char*)(a) >= (M)->least_addr) +/* Check if address of next chunk n is higher than base chunk p */ +#define ok_next(p, n) ((char*)(p) < (char*)(n)) +/* Check if p has its cinuse bit on */ +#define ok_cinuse(p) cinuse(p) +/* Check if p has its pinuse bit on */ +#define ok_pinuse(p) pinuse(p) + +#else /* !INSECURE */ +#define ok_address(M, a) (1) +#define ok_next(b, n) (1) +#define ok_cinuse(p) (1) +#define ok_pinuse(p) (1) +#endif /* !INSECURE */ + +#if (FOOTERS && !INSECURE) +/* Check if (alleged) mstate m has expected magic field */ +#define ok_magic(M) ((M)->magic == mparams.magic) +#else /* (FOOTERS && !INSECURE) */ +#define ok_magic(M) (1) +#endif /* (FOOTERS && !INSECURE) */ + + +/* In gcc, use __builtin_expect to minimize impact of checks */ +#if !INSECURE +#if defined(__GNUC__) && __GNUC__ >= 3 +#define RTCHECK(e) __builtin_expect(e, 1) +#else /* GNUC */ +#define RTCHECK(e) (e) +#endif /* GNUC */ +#else /* !INSECURE */ +#define RTCHECK(e) (1) +#endif /* !INSECURE */ + +/* macros to set up inuse chunks with or without footers */ + +#if !FOOTERS + +#define mark_inuse_foot(M,p,s) + +/* Set cinuse bit and pinuse bit of next chunk */ +#define set_inuse(M,p,s)\ + ((p)->head = (((p)->head & PINUSE_BIT)|s|CINUSE_BIT),\ + ((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT) + +/* Set cinuse and pinuse of this chunk and pinuse of next chunk */ +#define set_inuse_and_pinuse(M,p,s)\ + ((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\ + ((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT) + +/* Set size, cinuse and pinuse bit of this chunk */ +#define set_size_and_pinuse_of_inuse_chunk(M, p, s)\ + ((p)->head = (s|PINUSE_BIT|CINUSE_BIT)) + +#else /* FOOTERS */ + +/* Set foot of inuse chunk to be xor of mstate and seed */ +#define mark_inuse_foot(M,p,s)\ + (((mchunkptr)((char*)(p) + (s)))->prev_foot = ((size_t)(M) ^ mparams.magic)) + +#define get_mstate_for(p)\ + ((mstate)(((mchunkptr)((char*)(p) +\ + (chunksize(p))))->prev_foot ^ mparams.magic)) + +#define set_inuse(M,p,s)\ + ((p)->head = (((p)->head & PINUSE_BIT)|s|CINUSE_BIT),\ + (((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT), \ + mark_inuse_foot(M,p,s)) + +#define set_inuse_and_pinuse(M,p,s)\ + ((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\ + (((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT),\ + mark_inuse_foot(M,p,s)) + +#define set_size_and_pinuse_of_inuse_chunk(M, p, s)\ + ((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\ + mark_inuse_foot(M, p, s)) + +#endif /* !FOOTERS */ + +/* ---------------------------- setting mparams -------------------------- */ + +/* Initialize mparams */ +static int init_mparams(void) { + if (mparams.page_size == 0) { + size_t s; + + mparams.mmap_threshold = DEFAULT_MMAP_THRESHOLD; + mparams.trim_threshold = DEFAULT_TRIM_THRESHOLD; +#if MORECORE_CONTIGUOUS + mparams.default_mflags = USE_LOCK_BIT|USE_MMAP_BIT; +#else /* MORECORE_CONTIGUOUS */ + mparams.default_mflags = USE_LOCK_BIT|USE_MMAP_BIT|USE_NONCONTIGUOUS_BIT; +#endif /* MORECORE_CONTIGUOUS */ + +#if (FOOTERS && !INSECURE) + { +#if USE_DEV_RANDOM + int fd; + unsigned char buf[sizeof(size_t)]; + /* Try to use /dev/urandom, else fall back on using time */ + if ((fd = open("/dev/urandom", O_RDONLY)) >= 0 && + read(fd, buf, sizeof(buf)) == sizeof(buf)) { + s = *((size_t *) buf); + close(fd); + } + else +#endif /* USE_DEV_RANDOM */ + s = (size_t)(time(0) ^ (size_t)0x55555555U); + + s |= (size_t)8U; /* ensure nonzero */ + s &= ~(size_t)7U; /* improve chances of fault for bad values */ + + } +#else /* (FOOTERS && !INSECURE) */ + s = (size_t)0x58585858U; +#endif /* (FOOTERS && !INSECURE) */ + ACQUIRE_MAGIC_INIT_LOCK(); + if (mparams.magic == 0) { + mparams.magic = s; + /* Set up lock for main malloc area */ + INITIAL_LOCK(&gm->mutex); + gm->mflags = mparams.default_mflags; + } + RELEASE_MAGIC_INIT_LOCK(); + +#ifndef WIN32 + mparams.page_size = malloc_getpagesize; + mparams.granularity = ((DEFAULT_GRANULARITY != 0)? + DEFAULT_GRANULARITY : mparams.page_size); +#else /* WIN32 */ + { + SYSTEM_INFO system_info; + GetSystemInfo(&system_info); + mparams.page_size = system_info.dwPageSize; + mparams.granularity = system_info.dwAllocationGranularity; + } +#endif /* WIN32 */ + + /* Sanity-check configuration: + size_t must be unsigned and as wide as pointer type. + ints must be at least 4 bytes. + alignment must be at least 8. + Alignment, min chunk size, and page size must all be powers of 2. + */ + if ((sizeof(size_t) != sizeof(char*)) || + (MAX_SIZE_T < MIN_CHUNK_SIZE) || + (sizeof(int) < 4) || + (MALLOC_ALIGNMENT < (size_t)8U) || + ((MALLOC_ALIGNMENT & (MALLOC_ALIGNMENT-SIZE_T_ONE)) != 0) || + ((MCHUNK_SIZE & (MCHUNK_SIZE-SIZE_T_ONE)) != 0) || + ((mparams.granularity & (mparams.granularity-SIZE_T_ONE)) != 0) || + ((mparams.page_size & (mparams.page_size-SIZE_T_ONE)) != 0)) + ABORT; + } + return 0; +} + +/* support for mallopt */ +static int change_mparam(int param_number, int value) { + size_t val = (size_t)value; + init_mparams(); + switch(param_number) { + case M_TRIM_THRESHOLD: + mparams.trim_threshold = val; + return 1; + case M_GRANULARITY: + if (val >= mparams.page_size && ((val & (val-1)) == 0)) { + mparams.granularity = val; + return 1; + } + else + return 0; + case M_MMAP_THRESHOLD: + mparams.mmap_threshold = val; + return 1; + default: + return 0; + } +} + +#if DEBUG +/* ------------------------- Debugging Support --------------------------- */ + +/* Check properties of any chunk, whether free, inuse, mmapped etc */ +static void do_check_any_chunk(mstate m, mchunkptr p) { + assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD)); + assert(ok_address(m, p)); +} + +/* Check properties of top chunk */ +static void do_check_top_chunk(mstate m, mchunkptr p) { + msegmentptr sp = segment_holding(m, (char*)p); + size_t sz = chunksize(p); + assert(sp != 0); + assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD)); + assert(ok_address(m, p)); + assert(sz == m->topsize); + assert(sz > 0); + assert(sz == ((sp->base + sp->size) - (char*)p) - TOP_FOOT_SIZE); + assert(pinuse(p)); + assert(!next_pinuse(p)); +} + +/* Check properties of (inuse) mmapped chunks */ +static void do_check_mmapped_chunk(mstate m, mchunkptr p) { + size_t sz = chunksize(p); + size_t len = (sz + (p->prev_foot & ~IS_MMAPPED_BIT) + MMAP_FOOT_PAD); + assert(is_mmapped(p)); + assert(use_mmap(m)); + assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD)); + assert(ok_address(m, p)); + assert(!is_small(sz)); + assert((len & (mparams.page_size-SIZE_T_ONE)) == 0); + assert(chunk_plus_offset(p, sz)->head == FENCEPOST_HEAD); + assert(chunk_plus_offset(p, sz+SIZE_T_SIZE)->head == 0); +} + +/* Check properties of inuse chunks */ +static void do_check_inuse_chunk(mstate m, mchunkptr p) { + do_check_any_chunk(m, p); + assert(cinuse(p)); + assert(next_pinuse(p)); + /* If not pinuse and not mmapped, previous chunk has OK offset */ + assert(is_mmapped(p) || pinuse(p) || next_chunk(prev_chunk(p)) == p); + if (is_mmapped(p)) + do_check_mmapped_chunk(m, p); +} + +/* Check properties of free chunks */ +static void do_check_free_chunk(mstate m, mchunkptr p) { + size_t sz = p->head & ~(PINUSE_BIT|CINUSE_BIT); + mchunkptr next = chunk_plus_offset(p, sz); + do_check_any_chunk(m, p); + assert(!cinuse(p)); + assert(!next_pinuse(p)); + assert (!is_mmapped(p)); + if (p != m->dv && p != m->top) { + if (sz >= MIN_CHUNK_SIZE) { + assert((sz & CHUNK_ALIGN_MASK) == 0); + assert(is_aligned(chunk2mem(p))); + assert(next->prev_foot == sz); + assert(pinuse(p)); + assert (next == m->top || cinuse(next)); + assert(p->fd->bk == p); + assert(p->bk->fd == p); + } + else /* markers are always of size SIZE_T_SIZE */ + assert(sz == SIZE_T_SIZE); + } +} + +/* Check properties of malloced chunks at the point they are malloced */ +static void do_check_malloced_chunk(mstate m, void* mem, size_t s) { + if (mem != 0) { + mchunkptr p = mem2chunk(mem); + size_t sz = p->head & ~(PINUSE_BIT|CINUSE_BIT); + do_check_inuse_chunk(m, p); + assert((sz & CHUNK_ALIGN_MASK) == 0); + assert(sz >= MIN_CHUNK_SIZE); + assert(sz >= s); + /* unless mmapped, size is less than MIN_CHUNK_SIZE more than request */ + assert(is_mmapped(p) || sz < (s + MIN_CHUNK_SIZE)); + } +} + +/* Check a tree and its subtrees. */ +static void do_check_tree(mstate m, tchunkptr t) { + tchunkptr head = 0; + tchunkptr u = t; + bindex_t tindex = t->index; + size_t tsize = chunksize(t); + bindex_t idx; + compute_tree_index(tsize, idx); + assert(tindex == idx); + assert(tsize >= MIN_LARGE_SIZE); + assert(tsize >= minsize_for_tree_index(idx)); + assert((idx == NTREEBINS-1) || (tsize < minsize_for_tree_index((idx+1)))); + + do { /* traverse through chain of same-sized nodes */ + do_check_any_chunk(m, ((mchunkptr)u)); + assert(u->index == tindex); + assert(chunksize(u) == tsize); + assert(!cinuse(u)); + assert(!next_pinuse(u)); + assert(u->fd->bk == u); + assert(u->bk->fd == u); + if (u->parent == 0) { + assert(u->child[0] == 0); + assert(u->child[1] == 0); + } + else { + assert(head == 0); /* only one node on chain has parent */ + head = u; + assert(u->parent != u); + assert (u->parent->child[0] == u || + u->parent->child[1] == u || + *((tbinptr*)(u->parent)) == u); + if (u->child[0] != 0) { + assert(u->child[0]->parent == u); + assert(u->child[0] != u); + do_check_tree(m, u->child[0]); + } + if (u->child[1] != 0) { + assert(u->child[1]->parent == u); + assert(u->child[1] != u); + do_check_tree(m, u->child[1]); + } + if (u->child[0] != 0 && u->child[1] != 0) { + assert(chunksize(u->child[0]) < chunksize(u->child[1])); + } + } + u = u->fd; + } while (u != t); + assert(head != 0); +} + +/* Check all the chunks in a treebin. */ +static void do_check_treebin(mstate m, bindex_t i) { + tbinptr* tb = treebin_at(m, i); + tchunkptr t = *tb; + int empty = (m->treemap & (1U << i)) == 0; + if (t == 0) + assert(empty); + if (!empty) + do_check_tree(m, t); +} + +/* Check all the chunks in a smallbin. */ +static void do_check_smallbin(mstate m, bindex_t i) { + sbinptr b = smallbin_at(m, i); + mchunkptr p = b->bk; + unsigned int empty = (m->smallmap & (1U << i)) == 0; + if (p == b) + assert(empty); + if (!empty) { + for (; p != b; p = p->bk) { + size_t size = chunksize(p); + mchunkptr q; + /* each chunk claims to be free */ + do_check_free_chunk(m, p); + /* chunk belongs in bin */ + assert(small_index(size) == i); + assert(p->bk == b || chunksize(p->bk) == chunksize(p)); + /* chunk is followed by an inuse chunk */ + q = next_chunk(p); + if (q->head != FENCEPOST_HEAD) + do_check_inuse_chunk(m, q); + } + } +} + +/* Find x in a bin. Used in other check functions. */ +static int bin_find(mstate m, mchunkptr x) { + size_t size = chunksize(x); + if (is_small(size)) { + bindex_t sidx = small_index(size); + sbinptr b = smallbin_at(m, sidx); + if (smallmap_is_marked(m, sidx)) { + mchunkptr p = b; + do { + if (p == x) + return 1; + } while ((p = p->fd) != b); + } + } + else { + bindex_t tidx; + compute_tree_index(size, tidx); + if (treemap_is_marked(m, tidx)) { + tchunkptr t = *treebin_at(m, tidx); + size_t sizebits = size << leftshift_for_tree_index(tidx); + while (t != 0 && chunksize(t) != size) { + t = t->child[(sizebits >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1]; + sizebits <<= 1; + } + if (t != 0) { + tchunkptr u = t; + do { + if (u == (tchunkptr)x) + return 1; + } while ((u = u->fd) != t); + } + } + } + return 0; +} + +/* Traverse each chunk and check it; return total */ +static size_t traverse_and_check(mstate m) { + size_t sum = 0; + if (is_initialized(m)) { + msegmentptr s = &m->seg; + sum += m->topsize + TOP_FOOT_SIZE; + while (s != 0) { + mchunkptr q = align_as_chunk(s->base); + mchunkptr lastq = 0; + assert(pinuse(q)); + while (segment_holds(s, q) && + q != m->top && q->head != FENCEPOST_HEAD) { + sum += chunksize(q); + if (cinuse(q)) { + assert(!bin_find(m, q)); + do_check_inuse_chunk(m, q); + } + else { + assert(q == m->dv || bin_find(m, q)); + assert(lastq == 0 || cinuse(lastq)); /* Not 2 consecutive free */ + do_check_free_chunk(m, q); + } + lastq = q; + q = next_chunk(q); + } + s = s->next; + } + } + return sum; +} + +/* Check all properties of malloc_state. */ +static void do_check_malloc_state(mstate m) { + bindex_t i; + size_t total; + /* check bins */ + for (i = 0; i < NSMALLBINS; ++i) + do_check_smallbin(m, i); + for (i = 0; i < NTREEBINS; ++i) + do_check_treebin(m, i); + + if (m->dvsize != 0) { /* check dv chunk */ + do_check_any_chunk(m, m->dv); + assert(m->dvsize == chunksize(m->dv)); + assert(m->dvsize >= MIN_CHUNK_SIZE); + assert(bin_find(m, m->dv) == 0); + } + + if (m->top != 0) { /* check top chunk */ + do_check_top_chunk(m, m->top); + assert(m->topsize == chunksize(m->top)); + assert(m->topsize > 0); + assert(bin_find(m, m->top) == 0); + } + + total = traverse_and_check(m); + assert(total <= m->footprint); + assert(m->footprint <= m->max_footprint); +} +#endif /* DEBUG */ + +/* ----------------------------- statistics ------------------------------ */ + +#if !NO_MALLINFO +static struct mallinfo internal_mallinfo(mstate m) { + struct mallinfo nm = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + if (!PREACTION(m)) { + check_malloc_state(m); + if (is_initialized(m)) { + size_t nfree = SIZE_T_ONE; /* top always free */ + size_t mfree = m->topsize + TOP_FOOT_SIZE; + size_t sum = mfree; + msegmentptr s = &m->seg; + while (s != 0) { + mchunkptr q = align_as_chunk(s->base); + while (segment_holds(s, q) && + q != m->top && q->head != FENCEPOST_HEAD) { + size_t sz = chunksize(q); + sum += sz; + if (!cinuse(q)) { + mfree += sz; + ++nfree; + } + q = next_chunk(q); + } + s = s->next; + } + + nm.arena = sum; + nm.ordblks = nfree; + nm.hblkhd = m->footprint - sum; + nm.usmblks = m->max_footprint; + nm.uordblks = m->footprint - mfree; + nm.fordblks = mfree; + nm.keepcost = m->topsize; + } + + POSTACTION(m); + } + return nm; +} +#endif /* !NO_MALLINFO */ + +static void internal_malloc_stats(mstate m) { + if (!PREACTION(m)) { + size_t maxfp = 0; + size_t fp = 0; + size_t used = 0; + check_malloc_state(m); + if (is_initialized(m)) { + msegmentptr s = &m->seg; + maxfp = m->max_footprint; + fp = m->footprint; + used = fp - (m->topsize + TOP_FOOT_SIZE); + + while (s != 0) { + mchunkptr q = align_as_chunk(s->base); + while (segment_holds(s, q) && + q != m->top && q->head != FENCEPOST_HEAD) { + if (!cinuse(q)) + used -= chunksize(q); + q = next_chunk(q); + } + s = s->next; + } + } + + fprintf(stderr, "max system bytes = %10lu\n", (unsigned long)(maxfp)); + fprintf(stderr, "system bytes = %10lu\n", (unsigned long)(fp)); + fprintf(stderr, "in use bytes = %10lu\n", (unsigned long)(used)); + + POSTACTION(m); + } +} + +/* ----------------------- Operations on smallbins ----------------------- */ + +/* + Various forms of linking and unlinking are defined as macros. Even + the ones for trees, which are very long but have very short typical + paths. This is ugly but reduces reliance on inlining support of + compilers. +*/ + +/* Link a free chunk into a smallbin */ +#define insert_small_chunk(M, P, S) {\ + bindex_t I = small_index(S);\ + mchunkptr B = smallbin_at(M, I);\ + mchunkptr F = B;\ + assert(S >= MIN_CHUNK_SIZE);\ + if (!smallmap_is_marked(M, I))\ + mark_smallmap(M, I);\ + else if (RTCHECK(ok_address(M, B->fd)))\ + F = B->fd;\ + else {\ + CORRUPTION_ERROR_ACTION(M);\ + }\ + B->fd = P;\ + F->bk = P;\ + P->fd = F;\ + P->bk = B;\ +} + +/* Unlink a chunk from a smallbin */ +#define unlink_small_chunk(M, P, S) {\ + mchunkptr F = P->fd;\ + mchunkptr B = P->bk;\ + bindex_t I = small_index(S);\ + assert(P != B);\ + assert(P != F);\ + assert(chunksize(P) == small_index2size(I));\ + if (F == B)\ + clear_smallmap(M, I);\ + else if (RTCHECK((F == smallbin_at(M,I) || ok_address(M, F)) &&\ + (B == smallbin_at(M,I) || ok_address(M, B)))) {\ + F->bk = B;\ + B->fd = F;\ + }\ + else {\ + CORRUPTION_ERROR_ACTION(M);\ + }\ +} + +/* Unlink the first chunk from a smallbin */ +#define unlink_first_small_chunk(M, B, P, I) {\ + mchunkptr F = P->fd;\ + assert(P != B);\ + assert(P != F);\ + assert(chunksize(P) == small_index2size(I));\ + if (B == F)\ + clear_smallmap(M, I);\ + else if (RTCHECK(ok_address(M, F))) {\ + B->fd = F;\ + F->bk = B;\ + }\ + else {\ + CORRUPTION_ERROR_ACTION(M);\ + }\ +} + +/* Replace dv node, binning the old one */ +/* Used only when dvsize known to be small */ +#define replace_dv(M, P, S) {\ + size_t DVS = M->dvsize;\ + if (DVS != 0) {\ + mchunkptr DV = M->dv;\ + assert(is_small(DVS));\ + insert_small_chunk(M, DV, DVS);\ + }\ + M->dvsize = S;\ + M->dv = P;\ +} + +/* ------------------------- Operations on trees ------------------------- */ + +/* Insert chunk into tree */ +#define insert_large_chunk(M, X, S) {\ + tbinptr* H;\ + bindex_t I;\ + compute_tree_index(S, I);\ + H = treebin_at(M, I);\ + X->index = I;\ + X->child[0] = X->child[1] = 0;\ + if (!treemap_is_marked(M, I)) {\ + mark_treemap(M, I);\ + *H = X;\ + X->parent = (tchunkptr)H;\ + X->fd = X->bk = X;\ + }\ + else {\ + tchunkptr T = *H;\ + size_t K = S << leftshift_for_tree_index(I);\ + for (;;) {\ + if (chunksize(T) != S) {\ + tchunkptr* C = &(T->child[(K >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1]);\ + K <<= 1;\ + if (*C != 0)\ + T = *C;\ + else if (RTCHECK(ok_address(M, C))) {\ + *C = X;\ + X->parent = T;\ + X->fd = X->bk = X;\ + break;\ + }\ + else {\ + CORRUPTION_ERROR_ACTION(M);\ + break;\ + }\ + }\ + else {\ + tchunkptr F = T->fd;\ + if (RTCHECK(ok_address(M, T) && ok_address(M, F))) {\ + T->fd = F->bk = X;\ + X->fd = F;\ + X->bk = T;\ + X->parent = 0;\ + break;\ + }\ + else {\ + CORRUPTION_ERROR_ACTION(M);\ + break;\ + }\ + }\ + }\ + }\ +} + +/* + Unlink steps: + + 1. If x is a chained node, unlink it from its same-sized fd/bk links + and choose its bk node as its replacement. + 2. If x was the last node of its size, but not a leaf node, it must + be replaced with a leaf node (not merely one with an open left or + right), to make sure that lefts and rights of descendents + correspond properly to bit masks. We use the rightmost descendent + of x. We could use any other leaf, but this is easy to locate and + tends to counteract removal of leftmosts elsewhere, and so keeps + paths shorter than minimally guaranteed. This doesn't loop much + because on average a node in a tree is near the bottom. + 3. If x is the base of a chain (i.e., has parent links) relink + x's parent and children to x's replacement (or null if none). +*/ + +#define unlink_large_chunk(M, X) {\ + tchunkptr XP = X->parent;\ + tchunkptr R;\ + if (X->bk != X) {\ + tchunkptr F = X->fd;\ + R = X->bk;\ + if (RTCHECK(ok_address(M, F))) {\ + F->bk = R;\ + R->fd = F;\ + }\ + else {\ + CORRUPTION_ERROR_ACTION(M);\ + }\ + }\ + else {\ + tchunkptr* RP;\ + if (((R = *(RP = &(X->child[1]))) != 0) ||\ + ((R = *(RP = &(X->child[0]))) != 0)) {\ + tchunkptr* CP;\ + while ((*(CP = &(R->child[1])) != 0) ||\ + (*(CP = &(R->child[0])) != 0)) {\ + R = *(RP = CP);\ + }\ + if (RTCHECK(ok_address(M, RP)))\ + *RP = 0;\ + else {\ + CORRUPTION_ERROR_ACTION(M);\ + }\ + }\ + }\ + if (XP != 0) {\ + tbinptr* H = treebin_at(M, X->index);\ + if (X == *H) {\ + if ((*H = R) == 0) \ + clear_treemap(M, X->index);\ + }\ + else if (RTCHECK(ok_address(M, XP))) {\ + if (XP->child[0] == X) \ + XP->child[0] = R;\ + else \ + XP->child[1] = R;\ + }\ + else\ + CORRUPTION_ERROR_ACTION(M);\ + if (R != 0) {\ + if (RTCHECK(ok_address(M, R))) {\ + tchunkptr C0, C1;\ + R->parent = XP;\ + if ((C0 = X->child[0]) != 0) {\ + if (RTCHECK(ok_address(M, C0))) {\ + R->child[0] = C0;\ + C0->parent = R;\ + }\ + else\ + CORRUPTION_ERROR_ACTION(M);\ + }\ + if ((C1 = X->child[1]) != 0) {\ + if (RTCHECK(ok_address(M, C1))) {\ + R->child[1] = C1;\ + C1->parent = R;\ + }\ + else\ + CORRUPTION_ERROR_ACTION(M);\ + }\ + }\ + else\ + CORRUPTION_ERROR_ACTION(M);\ + }\ + }\ +} + +/* Relays to large vs small bin operations */ + +#define insert_chunk(M, P, S)\ + if (is_small(S)) insert_small_chunk(M, P, S)\ + else { tchunkptr TP = (tchunkptr)(P); insert_large_chunk(M, TP, S); } + +#define unlink_chunk(M, P, S)\ + if (is_small(S)) unlink_small_chunk(M, P, S)\ + else { tchunkptr TP = (tchunkptr)(P); unlink_large_chunk(M, TP); } + + +/* Relays to internal calls to malloc/free from realloc, memalign etc */ + +#if ONLY_MSPACES +#define internal_malloc(m, b) mspace_malloc(m, b) +#define internal_free(m, mem) mspace_free(m,mem); +#else /* ONLY_MSPACES */ +#if MSPACES +#define internal_malloc(m, b)\ + (m == gm)? dlmalloc(b) : mspace_malloc(m, b) +#define internal_free(m, mem)\ + if (m == gm) dlfree(mem); else mspace_free(m,mem); +#else /* MSPACES */ +#define internal_malloc(m, b) dlmalloc(b) +#define internal_free(m, mem) dlfree(mem) +#endif /* MSPACES */ +#endif /* ONLY_MSPACES */ + +/* ----------------------- Direct-mmapping chunks ----------------------- */ + +/* + Directly mmapped chunks are set up with an offset to the start of + the mmapped region stored in the prev_foot field of the chunk. This + allows reconstruction of the required argument to MUNMAP when freed, + and also allows adjustment of the returned chunk to meet alignment + requirements (especially in memalign). There is also enough space + allocated to hold a fake next chunk of size SIZE_T_SIZE to maintain + the PINUSE bit so frees can be checked. +*/ + +/* Malloc using mmap */ +static void* mmap_alloc(mstate m, size_t nb) { + size_t mmsize = granularity_align(nb + SIX_SIZE_T_SIZES + CHUNK_ALIGN_MASK); + if (mmsize > nb) { /* Check for wrap around 0 */ + char* mm = (char*)(DIRECT_MMAP(mmsize)); + if (mm != CMFAIL) { + size_t offset = align_offset(chunk2mem(mm)); + size_t psize = mmsize - offset - MMAP_FOOT_PAD; + mchunkptr p = (mchunkptr)(mm + offset); + p->prev_foot = offset | IS_MMAPPED_BIT; + (p)->head = (psize|CINUSE_BIT); + mark_inuse_foot(m, p, psize); + chunk_plus_offset(p, psize)->head = FENCEPOST_HEAD; + chunk_plus_offset(p, psize+SIZE_T_SIZE)->head = 0; + + if (mm < m->least_addr) + m->least_addr = mm; + if ((m->footprint += mmsize) > m->max_footprint) + m->max_footprint = m->footprint; + assert(is_aligned(chunk2mem(p))); + check_mmapped_chunk(m, p); + return chunk2mem(p); + } + } + return 0; +} + +/* Realloc using mmap */ +static mchunkptr mmap_resize(mstate m, mchunkptr oldp, size_t nb) { + size_t oldsize = chunksize(oldp); + if (is_small(nb)) /* Can't shrink mmap regions below small size */ + return 0; + /* Keep old chunk if big enough but not too big */ + if (oldsize >= nb + SIZE_T_SIZE && + (oldsize - nb) <= (mparams.granularity << 1)) + return oldp; + else { + size_t offset = oldp->prev_foot & ~IS_MMAPPED_BIT; + size_t oldmmsize = oldsize + offset + MMAP_FOOT_PAD; + size_t newmmsize = granularity_align(nb + SIX_SIZE_T_SIZES + + CHUNK_ALIGN_MASK); + char* cp = (char*)CALL_MREMAP((char*)oldp - offset, + oldmmsize, newmmsize, 1); + if (cp != CMFAIL) { + mchunkptr newp = (mchunkptr)(cp + offset); + size_t psize = newmmsize - offset - MMAP_FOOT_PAD; + newp->head = (psize|CINUSE_BIT); + mark_inuse_foot(m, newp, psize); + chunk_plus_offset(newp, psize)->head = FENCEPOST_HEAD; + chunk_plus_offset(newp, psize+SIZE_T_SIZE)->head = 0; + + if (cp < m->least_addr) + m->least_addr = cp; + if ((m->footprint += newmmsize - oldmmsize) > m->max_footprint) + m->max_footprint = m->footprint; + check_mmapped_chunk(m, newp); + return newp; + } + } + return 0; +} + +/* -------------------------- mspace management -------------------------- */ + +/* Initialize top chunk and its size */ +static void init_top(mstate m, mchunkptr p, size_t psize) { + /* Ensure alignment */ + size_t offset = align_offset(chunk2mem(p)); + p = (mchunkptr)((char*)p + offset); + psize -= offset; + + m->top = p; + m->topsize = psize; + p->head = psize | PINUSE_BIT; + /* set size of fake trailing chunk holding overhead space only once */ + chunk_plus_offset(p, psize)->head = TOP_FOOT_SIZE; + m->trim_check = mparams.trim_threshold; /* reset on each update */ +} + +/* Initialize bins for a new mstate that is otherwise zeroed out */ +static void init_bins(mstate m) { + /* Establish circular links for smallbins */ + bindex_t i; + for (i = 0; i < NSMALLBINS; ++i) { + sbinptr bin = smallbin_at(m,i); + bin->fd = bin->bk = bin; + } +} + +#if PROCEED_ON_ERROR + +/* default corruption action */ +static void reset_on_error(mstate m) { + int i; + ++malloc_corruption_error_count; + /* Reinitialize fields to forget about all memory */ + m->smallbins = m->treebins = 0; + m->dvsize = m->topsize = 0; + m->seg.base = 0; + m->seg.size = 0; + m->seg.next = 0; + m->top = m->dv = 0; + for (i = 0; i < NTREEBINS; ++i) + *treebin_at(m, i) = 0; + init_bins(m); +} +#endif /* PROCEED_ON_ERROR */ + +/* Allocate chunk and prepend remainder with chunk in successor base. */ +static void* prepend_alloc(mstate m, char* newbase, char* oldbase, + size_t nb) { + mchunkptr p = align_as_chunk(newbase); + mchunkptr oldfirst = align_as_chunk(oldbase); + size_t psize = (char*)oldfirst - (char*)p; + mchunkptr q = chunk_plus_offset(p, nb); + size_t qsize = psize - nb; + set_size_and_pinuse_of_inuse_chunk(m, p, nb); + + assert((char*)oldfirst > (char*)q); + assert(pinuse(oldfirst)); + assert(qsize >= MIN_CHUNK_SIZE); + + /* consolidate remainder with first chunk of old base */ + if (oldfirst == m->top) { + size_t tsize = m->topsize += qsize; + m->top = q; + q->head = tsize | PINUSE_BIT; + check_top_chunk(m, q); + } + else if (oldfirst == m->dv) { + size_t dsize = m->dvsize += qsize; + m->dv = q; + set_size_and_pinuse_of_free_chunk(q, dsize); + } + else { + if (!cinuse(oldfirst)) { + size_t nsize = chunksize(oldfirst); + unlink_chunk(m, oldfirst, nsize); + oldfirst = chunk_plus_offset(oldfirst, nsize); + qsize += nsize; + } + set_free_with_pinuse(q, qsize, oldfirst); + insert_chunk(m, q, qsize); + check_free_chunk(m, q); + } + + check_malloced_chunk(m, chunk2mem(p), nb); + return chunk2mem(p); +} + + +/* Add a segment to hold a new noncontiguous region */ +static void add_segment(mstate m, char* tbase, size_t tsize, flag_t mmapped) { + /* Determine locations and sizes of segment, fenceposts, old top */ + char* old_top = (char*)m->top; + msegmentptr oldsp = segment_holding(m, old_top); + char* old_end = oldsp->base + oldsp->size; + size_t ssize = pad_request(sizeof(struct malloc_segment)); + char* rawsp = old_end - (ssize + FOUR_SIZE_T_SIZES + CHUNK_ALIGN_MASK); + size_t offset = align_offset(chunk2mem(rawsp)); + char* asp = rawsp + offset; + char* csp = (asp < (old_top + MIN_CHUNK_SIZE))? old_top : asp; + mchunkptr sp = (mchunkptr)csp; + msegmentptr ss = (msegmentptr)(chunk2mem(sp)); + mchunkptr tnext = chunk_plus_offset(sp, ssize); + mchunkptr p = tnext; + int nfences = 0; + + /* reset top to new space */ + init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE); + + /* Set up segment record */ + assert(is_aligned(ss)); + set_size_and_pinuse_of_inuse_chunk(m, sp, ssize); + *ss = m->seg; /* Push current record */ + m->seg.base = tbase; + m->seg.size = tsize; + set_segment_flags(&m->seg, mmapped); + m->seg.next = ss; + + /* Insert trailing fenceposts */ + for (;;) { + mchunkptr nextp = chunk_plus_offset(p, SIZE_T_SIZE); + p->head = FENCEPOST_HEAD; + ++nfences; + if ((char*)(&(nextp->head)) < old_end) + p = nextp; + else + break; + } + assert(nfences >= 2); + + /* Insert the rest of old top into a bin as an ordinary free chunk */ + if (csp != old_top) { + mchunkptr q = (mchunkptr)old_top; + size_t psize = csp - old_top; + mchunkptr tn = chunk_plus_offset(q, psize); + set_free_with_pinuse(q, psize, tn); + insert_chunk(m, q, psize); + } + + check_top_chunk(m, m->top); +} + +/* -------------------------- System allocation -------------------------- */ + +/* Get memory from system using MORECORE or MMAP */ +static void* sys_alloc(mstate m, size_t nb) { + char* tbase = CMFAIL; + size_t tsize = 0; + flag_t mmap_flag = 0; + + init_mparams(); + + /* Directly map large chunks */ + if (use_mmap(m) && nb >= mparams.mmap_threshold) { + void* mem = mmap_alloc(m, nb); + if (mem != 0) + return mem; + } + + /* + Try getting memory in any of three ways (in most-preferred to + least-preferred order): + 1. A call to MORECORE that can normally contiguously extend memory. + (disabled if not MORECORE_CONTIGUOUS or not HAVE_MORECORE or + or main space is mmapped or a previous contiguous call failed) + 2. A call to MMAP new space (disabled if not HAVE_MMAP). + Note that under the default settings, if MORECORE is unable to + fulfill a request, and HAVE_MMAP is true, then mmap is + used as a noncontiguous system allocator. This is a useful backup + strategy for systems with holes in address spaces -- in this case + sbrk cannot contiguously expand the heap, but mmap may be able to + find space. + 3. A call to MORECORE that cannot usually contiguously extend memory. + (disabled if not HAVE_MORECORE) + */ + + if (MORECORE_CONTIGUOUS && !use_noncontiguous(m)) { + char* br = CMFAIL; + msegmentptr ss = (m->top == 0)? 0 : segment_holding(m, (char*)m->top); + size_t asize = 0; + ACQUIRE_MORECORE_LOCK(); + + if (ss == 0) { /* First time through or recovery */ + char* base = (char*)CALL_MORECORE(0); + if (base != CMFAIL) { + asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE); + /* Adjust to end on a page boundary */ + if (!is_page_aligned(base)) + asize += (page_align((size_t)base) - (size_t)base); + /* Can't call MORECORE if size is negative when treated as signed */ + if (asize < HALF_MAX_SIZE_T && + (br = (char*)(CALL_MORECORE(asize))) == base) { + tbase = base; + tsize = asize; + } + } + } + else { + /* Subtract out existing available top space from MORECORE request. */ + asize = granularity_align(nb - m->topsize + TOP_FOOT_SIZE + SIZE_T_ONE); + /* Use mem here only if it did continuously extend old space */ + if (asize < HALF_MAX_SIZE_T && + (br = (char*)(CALL_MORECORE(asize))) == ss->base+ss->size) { + tbase = br; + tsize = asize; + } + } + + if (tbase == CMFAIL) { /* Cope with partial failure */ + if (br != CMFAIL) { /* Try to use/extend the space we did get */ + if (asize < HALF_MAX_SIZE_T && + asize < nb + TOP_FOOT_SIZE + SIZE_T_ONE) { + size_t esize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE - asize); + if (esize < HALF_MAX_SIZE_T) { + char* end = (char*)CALL_MORECORE(esize); + if (end != CMFAIL) + asize += esize; + else { /* Can't use; try to release */ + (void)CALL_MORECORE(-asize); + br = CMFAIL; + } + } + } + } + if (br != CMFAIL) { /* Use the space we did get */ + tbase = br; + tsize = asize; + } + else + disable_contiguous(m); /* Don't try contiguous path in the future */ + } + + RELEASE_MORECORE_LOCK(); + } + + if (HAVE_MMAP && tbase == CMFAIL) { /* Try MMAP */ + size_t req = nb + TOP_FOOT_SIZE + SIZE_T_ONE; + size_t rsize = granularity_align(req); + if (rsize > nb) { /* Fail if wraps around zero */ + char* mp = (char*)(CALL_MMAP(rsize)); + if (mp != CMFAIL) { + tbase = mp; + tsize = rsize; + mmap_flag = IS_MMAPPED_BIT; + } + } + } + + if (HAVE_MORECORE && tbase == CMFAIL) { /* Try noncontiguous MORECORE */ + size_t asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE); + if (asize < HALF_MAX_SIZE_T) { + char* br = CMFAIL; + char* end = CMFAIL; + ACQUIRE_MORECORE_LOCK(); + br = (char*)(CALL_MORECORE(asize)); + end = (char*)(CALL_MORECORE(0)); + RELEASE_MORECORE_LOCK(); + if (br != CMFAIL && end != CMFAIL && br < end) { + size_t ssize = end - br; + if (ssize > nb + TOP_FOOT_SIZE) { + tbase = br; + tsize = ssize; + } + } + } + } + + if (tbase != CMFAIL) { + + if ((m->footprint += tsize) > m->max_footprint) + m->max_footprint = m->footprint; + + if (!is_initialized(m)) { /* first-time initialization */ + m->seg.base = m->least_addr = tbase; + m->seg.size = tsize; + set_segment_flags(&m->seg, mmap_flag); + m->magic = mparams.magic; + init_bins(m); + if (is_global(m)) + init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE); + else { + /* Offset top by embedded malloc_state */ + mchunkptr mn = next_chunk(mem2chunk(m)); + init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) -TOP_FOOT_SIZE); + } + } + + else { + /* Try to merge with an existing segment */ + msegmentptr sp = &m->seg; + while (sp != 0 && tbase != sp->base + sp->size) + sp = sp->next; + if (sp != 0 && + !is_extern_segment(sp) && + check_segment_merge(sp, tbase, tsize) && + (get_segment_flags(sp) & IS_MMAPPED_BIT) == mmap_flag && + segment_holds(sp, m->top)) { /* append */ + sp->size += tsize; + init_top(m, m->top, m->topsize + tsize); + } + else { + if (tbase < m->least_addr) + m->least_addr = tbase; + sp = &m->seg; + while (sp != 0 && sp->base != tbase + tsize) + sp = sp->next; + if (sp != 0 && + !is_extern_segment(sp) && + check_segment_merge(sp, tbase, tsize) && + (get_segment_flags(sp) & IS_MMAPPED_BIT) == mmap_flag) { + char* oldbase = sp->base; + sp->base = tbase; + sp->size += tsize; + return prepend_alloc(m, tbase, oldbase, nb); + } + else + add_segment(m, tbase, tsize, mmap_flag); + } + } + + if (nb < m->topsize) { /* Allocate from new or extended top space */ + size_t rsize = m->topsize -= nb; + mchunkptr p = m->top; + mchunkptr r = m->top = chunk_plus_offset(p, nb); + r->head = rsize | PINUSE_BIT; + set_size_and_pinuse_of_inuse_chunk(m, p, nb); + check_top_chunk(m, m->top); + check_malloced_chunk(m, chunk2mem(p), nb); + return chunk2mem(p); + } + } + + MALLOC_FAILURE_ACTION; + return 0; +} + +/* ----------------------- system deallocation -------------------------- */ + +/* Unmap and unlink any mmapped segments that don't contain used chunks */ +static size_t release_unused_segments(mstate m) { + size_t released = 0; + msegmentptr pred = &m->seg; + msegmentptr sp = pred->next; + while (sp != 0) { + char* base = sp->base; + size_t size = sp->size; + msegmentptr next = sp->next; + if (is_mmapped_segment(sp) && !is_extern_segment(sp)) { + mchunkptr p = align_as_chunk(base); + size_t psize = chunksize(p); + /* Can unmap if first chunk holds entire segment and not pinned */ + if (!cinuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) { + tchunkptr tp = (tchunkptr)p; + assert(segment_holds(sp, (char*)sp)); + if (p == m->dv) { + m->dv = 0; + m->dvsize = 0; + } + else { + unlink_large_chunk(m, tp); + } + if (CALL_MUNMAP(base, size) == 0) { + released += size; + m->footprint -= size; + /* unlink obsoleted record */ + sp = pred; + sp->next = next; + } + else { /* back out if cannot unmap */ + insert_large_chunk(m, tp, psize); + } + } + } + pred = sp; + sp = next; + } + return released; +} + +static int sys_trim(mstate m, size_t pad) { + size_t released = 0; + if (pad < MAX_REQUEST && is_initialized(m)) { + pad += TOP_FOOT_SIZE; /* ensure enough room for segment overhead */ + + if (m->topsize > pad) { + /* Shrink top space in granularity-size units, keeping at least one */ + size_t unit = mparams.granularity; + size_t extra = ((m->topsize - pad + (unit - SIZE_T_ONE)) / unit - + SIZE_T_ONE) * unit; + msegmentptr sp = segment_holding(m, (char*)m->top); + + if (!is_extern_segment(sp)) { + if (is_mmapped_segment(sp)) { + if (HAVE_MMAP && + sp->size >= extra && + !has_segment_link(m, sp)) { /* can't shrink if pinned */ + size_t newsize = sp->size - extra; + /* Prefer mremap, fall back to munmap */ + if ((CALL_MREMAP(sp->base, sp->size, newsize, 0) != MFAIL) || + (CALL_MUNMAP(sp->base + newsize, extra) == 0)) { + released = extra; + } + } + } + else if (HAVE_MORECORE) { + if (extra >= HALF_MAX_SIZE_T) /* Avoid wrapping negative */ + extra = (HALF_MAX_SIZE_T) + SIZE_T_ONE - unit; + ACQUIRE_MORECORE_LOCK(); + { + /* Make sure end of memory is where we last set it. */ + char* old_br = (char*)(CALL_MORECORE(0)); + if (old_br == sp->base + sp->size) { + char* rel_br = (char*)(CALL_MORECORE(-extra)); + char* new_br = (char*)(CALL_MORECORE(0)); + if (rel_br != CMFAIL && new_br < old_br) + released = old_br - new_br; + } + } + RELEASE_MORECORE_LOCK(); + } + } + + if (released != 0) { + sp->size -= released; + m->footprint -= released; + init_top(m, m->top, m->topsize - released); + check_top_chunk(m, m->top); + } + } + + /* Unmap any unused mmapped segments */ + if (HAVE_MMAP) + released += release_unused_segments(m); + + /* On failure, disable autotrim to avoid repeated failed future calls */ + if (released == 0) + m->trim_check = MAX_SIZE_T; + } + + return (released != 0)? 1 : 0; +} + +/* ---------------------------- malloc support --------------------------- */ + +/* allocate a large request from the best fitting chunk in a treebin */ +static void* tmalloc_large(mstate m, size_t nb) { + tchunkptr v = 0; + size_t rsize = -nb; /* Unsigned negation */ + tchunkptr t; + bindex_t idx; + compute_tree_index(nb, idx); + + if ((t = *treebin_at(m, idx)) != 0) { + /* Traverse tree for this bin looking for node with size == nb */ + size_t sizebits = nb << leftshift_for_tree_index(idx); + tchunkptr rst = 0; /* The deepest untaken right subtree */ + for (;;) { + tchunkptr rt; + size_t trem = chunksize(t) - nb; + if (trem < rsize) { + v = t; + if ((rsize = trem) == 0) + break; + } + rt = t->child[1]; + t = t->child[(sizebits >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1]; + if (rt != 0 && rt != t) + rst = rt; + if (t == 0) { + t = rst; /* set t to least subtree holding sizes > nb */ + break; + } + sizebits <<= 1; + } + } + + if (t == 0 && v == 0) { /* set t to root of next non-empty treebin */ + binmap_t leftbits = left_bits(idx2bit(idx)) & m->treemap; + if (leftbits != 0) { + bindex_t i; + binmap_t leastbit = least_bit(leftbits); + compute_bit2idx(leastbit, i); + t = *treebin_at(m, i); + } + } + + while (t != 0) { /* find smallest of tree or subtree */ + size_t trem = chunksize(t) - nb; + if (trem < rsize) { + rsize = trem; + v = t; + } + t = leftmost_child(t); + } + + /* If dv is a better fit, return 0 so malloc will use it */ + if (v != 0 && rsize < (size_t)(m->dvsize - nb)) { + if (RTCHECK(ok_address(m, v))) { /* split */ + mchunkptr r = chunk_plus_offset(v, nb); + assert(chunksize(v) == rsize + nb); + if (RTCHECK(ok_next(v, r))) { + unlink_large_chunk(m, v); + if (rsize < MIN_CHUNK_SIZE) + set_inuse_and_pinuse(m, v, (rsize + nb)); + else { + set_size_and_pinuse_of_inuse_chunk(m, v, nb); + set_size_and_pinuse_of_free_chunk(r, rsize); + insert_chunk(m, r, rsize); + } + return chunk2mem(v); + } + } + CORRUPTION_ERROR_ACTION(m); + } + return 0; +} + +/* allocate a small request from the best fitting chunk in a treebin */ +static void* tmalloc_small(mstate m, size_t nb) { + tchunkptr t, v; + size_t rsize; + bindex_t i; + binmap_t leastbit = least_bit(m->treemap); + compute_bit2idx(leastbit, i); + + v = t = *treebin_at(m, i); + rsize = chunksize(t) - nb; + + while ((t = leftmost_child(t)) != 0) { + size_t trem = chunksize(t) - nb; + if (trem < rsize) { + rsize = trem; + v = t; + } + } + + if (RTCHECK(ok_address(m, v))) { + mchunkptr r = chunk_plus_offset(v, nb); + assert(chunksize(v) == rsize + nb); + if (RTCHECK(ok_next(v, r))) { + unlink_large_chunk(m, v); + if (rsize < MIN_CHUNK_SIZE) + set_inuse_and_pinuse(m, v, (rsize + nb)); + else { + set_size_and_pinuse_of_inuse_chunk(m, v, nb); + set_size_and_pinuse_of_free_chunk(r, rsize); + replace_dv(m, r, rsize); + } + return chunk2mem(v); + } + } + + CORRUPTION_ERROR_ACTION(m); + return 0; +} + +/* --------------------------- realloc support --------------------------- */ + +static void* internal_realloc(mstate m, void* oldmem, size_t bytes) { + if (bytes >= MAX_REQUEST) { + MALLOC_FAILURE_ACTION; + return 0; + } + if (!PREACTION(m)) { + mchunkptr oldp = mem2chunk(oldmem); + size_t oldsize = chunksize(oldp); + mchunkptr next = chunk_plus_offset(oldp, oldsize); + mchunkptr newp = 0; + void* extra = 0; + + /* Try to either shrink or extend into top. Else malloc-copy-free */ + + if (RTCHECK(ok_address(m, oldp) && ok_cinuse(oldp) && + ok_next(oldp, next) && ok_pinuse(next))) { + size_t nb = request2size(bytes); + if (is_mmapped(oldp)) + newp = mmap_resize(m, oldp, nb); + else if (oldsize >= nb) { /* already big enough */ + size_t rsize = oldsize - nb; + newp = oldp; + if (rsize >= MIN_CHUNK_SIZE) { + mchunkptr remainder = chunk_plus_offset(newp, nb); + set_inuse(m, newp, nb); + set_inuse(m, remainder, rsize); + extra = chunk2mem(remainder); + } + } + else if (next == m->top && oldsize + m->topsize > nb) { + /* Expand into top */ + size_t newsize = oldsize + m->topsize; + size_t newtopsize = newsize - nb; + mchunkptr newtop = chunk_plus_offset(oldp, nb); + set_inuse(m, oldp, nb); + newtop->head = newtopsize |PINUSE_BIT; + m->top = newtop; + m->topsize = newtopsize; + newp = oldp; + } + } + else { + USAGE_ERROR_ACTION(m, oldmem); + POSTACTION(m); + return 0; + } + + POSTACTION(m); + + if (newp != 0) { + if (extra != 0) { + internal_free(m, extra); + } + check_inuse_chunk(m, newp); + return chunk2mem(newp); + } + else { + void* newmem = internal_malloc(m, bytes); + if (newmem != 0) { + size_t oc = oldsize - overhead_for(oldp); + memcpy(newmem, oldmem, (oc < bytes)? oc : bytes); + internal_free(m, oldmem); + } + return newmem; + } + } + return 0; +} + +/* --------------------------- memalign support -------------------------- */ + +static void* internal_memalign(mstate m, size_t alignment, size_t bytes) { + if (alignment <= MALLOC_ALIGNMENT) /* Can just use malloc */ + return internal_malloc(m, bytes); + if (alignment < MIN_CHUNK_SIZE) /* must be at least a minimum chunk size */ + alignment = MIN_CHUNK_SIZE; + if ((alignment & (alignment-SIZE_T_ONE)) != 0) {/* Ensure a power of 2 */ + size_t a = MALLOC_ALIGNMENT << 1; + while (a < alignment) a <<= 1; + alignment = a; + } + + if (bytes >= MAX_REQUEST - alignment) { + if (m != 0) { /* Test isn't needed but avoids compiler warning */ + MALLOC_FAILURE_ACTION; + } + } + else { + size_t nb = request2size(bytes); + size_t req = nb + alignment + MIN_CHUNK_SIZE - CHUNK_OVERHEAD; + char* mem = (char*)internal_malloc(m, req); + if (mem != 0) { + void* leader = 0; + void* trailer = 0; + mchunkptr p = mem2chunk(mem); + + if (PREACTION(m)) return 0; + if ((((size_t)(mem)) % alignment) != 0) { /* misaligned */ + /* + Find an aligned spot inside chunk. Since we need to give + back leading space in a chunk of at least MIN_CHUNK_SIZE, if + the first calculation places us at a spot with less than + MIN_CHUNK_SIZE leader, we can move to the next aligned spot. + We've allocated enough total room so that this is always + possible. + */ + char* br = (char*)mem2chunk((size_t)(((size_t)(mem + + alignment - + SIZE_T_ONE)) & + -alignment)); + char* pos = ((size_t)(br - (char*)(p)) >= MIN_CHUNK_SIZE)? + br : br+alignment; + mchunkptr newp = (mchunkptr)pos; + size_t leadsize = pos - (char*)(p); + size_t newsize = chunksize(p) - leadsize; + + if (is_mmapped(p)) { /* For mmapped chunks, just adjust offset */ + newp->prev_foot = p->prev_foot + leadsize; + newp->head = (newsize|CINUSE_BIT); + } + else { /* Otherwise, give back leader, use the rest */ + set_inuse(m, newp, newsize); + set_inuse(m, p, leadsize); + leader = chunk2mem(p); + } + p = newp; + } + + /* Give back spare room at the end */ + if (!is_mmapped(p)) { + size_t size = chunksize(p); + if (size > nb + MIN_CHUNK_SIZE) { + size_t remainder_size = size - nb; + mchunkptr remainder = chunk_plus_offset(p, nb); + set_inuse(m, p, nb); + set_inuse(m, remainder, remainder_size); + trailer = chunk2mem(remainder); + } + } + + assert (chunksize(p) >= nb); + assert((((size_t)(chunk2mem(p))) % alignment) == 0); + check_inuse_chunk(m, p); + POSTACTION(m); + if (leader != 0) { + internal_free(m, leader); + } + if (trailer != 0) { + internal_free(m, trailer); + } + return chunk2mem(p); + } + } + return 0; +} + +/* ------------------------ comalloc/coalloc support --------------------- */ + +static void** ialloc(mstate m, + size_t n_elements, + size_t* sizes, + int opts, + void* chunks[]) { + /* + This provides common support for independent_X routines, handling + all of the combinations that can result. + + The opts arg has: + bit 0 set if all elements are same size (using sizes[0]) + bit 1 set if elements should be zeroed + */ + + size_t element_size; /* chunksize of each element, if all same */ + size_t contents_size; /* total size of elements */ + size_t array_size; /* request size of pointer array */ + void* mem; /* malloced aggregate space */ + mchunkptr p; /* corresponding chunk */ + size_t remainder_size; /* remaining bytes while splitting */ + void** marray; /* either "chunks" or malloced ptr array */ + mchunkptr array_chunk; /* chunk for malloced ptr array */ + flag_t was_enabled; /* to disable mmap */ + size_t size; + size_t i; + + /* compute array length, if needed */ + if (chunks != 0) { + if (n_elements == 0) + return chunks; /* nothing to do */ + marray = chunks; + array_size = 0; + } + else { + /* if empty req, must still return chunk representing empty array */ + if (n_elements == 0) + return (void**)internal_malloc(m, 0); + marray = 0; + array_size = request2size(n_elements * (sizeof(void*))); + } + + /* compute total element size */ + if (opts & 0x1) { /* all-same-size */ + element_size = request2size(*sizes); + contents_size = n_elements * element_size; + } + else { /* add up all the sizes */ + element_size = 0; + contents_size = 0; + for (i = 0; i != n_elements; ++i) + contents_size += request2size(sizes[i]); + } + + size = contents_size + array_size; + + /* + Allocate the aggregate chunk. First disable direct-mmapping so + malloc won't use it, since we would not be able to later + free/realloc space internal to a segregated mmap region. + */ + was_enabled = use_mmap(m); + disable_mmap(m); + mem = internal_malloc(m, size - CHUNK_OVERHEAD); + if (was_enabled) + enable_mmap(m); + if (mem == 0) + return 0; + + if (PREACTION(m)) return 0; + p = mem2chunk(mem); + remainder_size = chunksize(p); + + assert(!is_mmapped(p)); + + if (opts & 0x2) { /* optionally clear the elements */ + memset((size_t*)mem, 0, remainder_size - SIZE_T_SIZE - array_size); + } + + /* If not provided, allocate the pointer array as final part of chunk */ + if (marray == 0) { + size_t array_chunk_size; + array_chunk = chunk_plus_offset(p, contents_size); + array_chunk_size = remainder_size - contents_size; + marray = (void**) (chunk2mem(array_chunk)); + set_size_and_pinuse_of_inuse_chunk(m, array_chunk, array_chunk_size); + remainder_size = contents_size; + } + + /* split out elements */ + for (i = 0; ; ++i) { + marray[i] = chunk2mem(p); + if (i != n_elements-1) { + if (element_size != 0) + size = element_size; + else + size = request2size(sizes[i]); + remainder_size -= size; + set_size_and_pinuse_of_inuse_chunk(m, p, size); + p = chunk_plus_offset(p, size); + } + else { /* the final element absorbs any overallocation slop */ + set_size_and_pinuse_of_inuse_chunk(m, p, remainder_size); + break; + } + } + +#if DEBUG + if (marray != chunks) { + /* final element must have exactly exhausted chunk */ + if (element_size != 0) { + assert(remainder_size == element_size); + } + else { + assert(remainder_size == request2size(sizes[i])); + } + check_inuse_chunk(m, mem2chunk(marray)); + } + for (i = 0; i != n_elements; ++i) + check_inuse_chunk(m, mem2chunk(marray[i])); + +#endif /* DEBUG */ + + POSTACTION(m); + return marray; +} + + +/* -------------------------- public routines ---------------------------- */ + +#if !ONLY_MSPACES + +void* dlmalloc(size_t bytes) { + /* + Basic algorithm: + If a small request (< 256 bytes minus per-chunk overhead): + 1. If one exists, use a remainderless chunk in associated smallbin. + (Remainderless means that there are too few excess bytes to + represent as a chunk.) + 2. If it is big enough, use the dv chunk, which is normally the + chunk adjacent to the one used for the most recent small request. + 3. If one exists, split the smallest available chunk in a bin, + saving remainder in dv. + 4. If it is big enough, use the top chunk. + 5. If available, get memory from system and use it + Otherwise, for a large request: + 1. Find the smallest available binned chunk that fits, and use it + if it is better fitting than dv chunk, splitting if necessary. + 2. If better fitting than any binned chunk, use the dv chunk. + 3. If it is big enough, use the top chunk. + 4. If request size >= mmap threshold, try to directly mmap this chunk. + 5. If available, get memory from system and use it + + The ugly goto's here ensure that postaction occurs along all paths. + */ + + if (!PREACTION(gm)) { + void* mem; + size_t nb; + if (bytes <= MAX_SMALL_REQUEST) { + bindex_t idx; + binmap_t smallbits; + nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes); + idx = small_index(nb); + smallbits = gm->smallmap >> idx; + + if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */ + mchunkptr b, p; + idx += ~smallbits & 1; /* Uses next bin if idx empty */ + b = smallbin_at(gm, idx); + p = b->fd; + assert(chunksize(p) == small_index2size(idx)); + unlink_first_small_chunk(gm, b, p, idx); + set_inuse_and_pinuse(gm, p, small_index2size(idx)); + mem = chunk2mem(p); + check_malloced_chunk(gm, mem, nb); + goto postaction; + } + + else if (nb > gm->dvsize) { + if (smallbits != 0) { /* Use chunk in next nonempty smallbin */ + mchunkptr b, p, r; + size_t rsize; + bindex_t i; + binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx)); + binmap_t leastbit = least_bit(leftbits); + compute_bit2idx(leastbit, i); + b = smallbin_at(gm, i); + p = b->fd; + assert(chunksize(p) == small_index2size(i)); + unlink_first_small_chunk(gm, b, p, i); + rsize = small_index2size(i) - nb; + /* Fit here cannot be remainderless if 4byte sizes */ + if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE) + set_inuse_and_pinuse(gm, p, small_index2size(i)); + else { + set_size_and_pinuse_of_inuse_chunk(gm, p, nb); + r = chunk_plus_offset(p, nb); + set_size_and_pinuse_of_free_chunk(r, rsize); + replace_dv(gm, r, rsize); + } + mem = chunk2mem(p); + check_malloced_chunk(gm, mem, nb); + goto postaction; + } + + else if (gm->treemap != 0 && (mem = tmalloc_small(gm, nb)) != 0) { + check_malloced_chunk(gm, mem, nb); + goto postaction; + } + } + } + else if (bytes >= MAX_REQUEST) + nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */ + else { + nb = pad_request(bytes); + if (gm->treemap != 0 && (mem = tmalloc_large(gm, nb)) != 0) { + check_malloced_chunk(gm, mem, nb); + goto postaction; + } + } + + if (nb <= gm->dvsize) { + size_t rsize = gm->dvsize - nb; + mchunkptr p = gm->dv; + if (rsize >= MIN_CHUNK_SIZE) { /* split dv */ + mchunkptr r = gm->dv = chunk_plus_offset(p, nb); + gm->dvsize = rsize; + set_size_and_pinuse_of_free_chunk(r, rsize); + set_size_and_pinuse_of_inuse_chunk(gm, p, nb); + } + else { /* exhaust dv */ + size_t dvs = gm->dvsize; + gm->dvsize = 0; + gm->dv = 0; + set_inuse_and_pinuse(gm, p, dvs); + } + mem = chunk2mem(p); + check_malloced_chunk(gm, mem, nb); + goto postaction; + } + + else if (nb < gm->topsize) { /* Split top */ + size_t rsize = gm->topsize -= nb; + mchunkptr p = gm->top; + mchunkptr r = gm->top = chunk_plus_offset(p, nb); + r->head = rsize | PINUSE_BIT; + set_size_and_pinuse_of_inuse_chunk(gm, p, nb); + mem = chunk2mem(p); + check_top_chunk(gm, gm->top); + check_malloced_chunk(gm, mem, nb); + goto postaction; + } + + mem = sys_alloc(gm, nb); + + postaction: + POSTACTION(gm); + return mem; + } + + return 0; +} + +void dlfree(void* mem) { + /* + Consolidate freed chunks with preceeding or succeeding bordering + free chunks, if they exist, and then place in a bin. Intermixed + with special cases for top, dv, mmapped chunks, and usage errors. + */ + + if (mem != 0) { + mchunkptr p = mem2chunk(mem); +#if FOOTERS + mstate fm = get_mstate_for(p); + if (!ok_magic(fm)) { + USAGE_ERROR_ACTION(fm, p); + return; + } +#else /* FOOTERS */ +#define fm gm +#endif /* FOOTERS */ + if (!PREACTION(fm)) { + check_inuse_chunk(fm, p); + if (RTCHECK(ok_address(fm, p) && ok_cinuse(p))) { + size_t psize = chunksize(p); + mchunkptr next = chunk_plus_offset(p, psize); + if (!pinuse(p)) { + size_t prevsize = p->prev_foot; + if ((prevsize & IS_MMAPPED_BIT) != 0) { + prevsize &= ~IS_MMAPPED_BIT; + psize += prevsize + MMAP_FOOT_PAD; + if (CALL_MUNMAP((char*)p - prevsize, psize) == 0) + fm->footprint -= psize; + goto postaction; + } + else { + mchunkptr prev = chunk_minus_offset(p, prevsize); + psize += prevsize; + p = prev; + if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */ + if (p != fm->dv) { + unlink_chunk(fm, p, prevsize); + } + else if ((next->head & INUSE_BITS) == INUSE_BITS) { + fm->dvsize = psize; + set_free_with_pinuse(p, psize, next); + goto postaction; + } + } + else + goto erroraction; + } + } + + if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) { + if (!cinuse(next)) { /* consolidate forward */ + if (next == fm->top) { + size_t tsize = fm->topsize += psize; + fm->top = p; + p->head = tsize | PINUSE_BIT; + if (p == fm->dv) { + fm->dv = 0; + fm->dvsize = 0; + } + if (should_trim(fm, tsize)) + sys_trim(fm, 0); + goto postaction; + } + else if (next == fm->dv) { + size_t dsize = fm->dvsize += psize; + fm->dv = p; + set_size_and_pinuse_of_free_chunk(p, dsize); + goto postaction; + } + else { + size_t nsize = chunksize(next); + psize += nsize; + unlink_chunk(fm, next, nsize); + set_size_and_pinuse_of_free_chunk(p, psize); + if (p == fm->dv) { + fm->dvsize = psize; + goto postaction; + } + } + } + else + set_free_with_pinuse(p, psize, next); + insert_chunk(fm, p, psize); + check_free_chunk(fm, p); + goto postaction; + } + } + erroraction: + USAGE_ERROR_ACTION(fm, p); + postaction: + POSTACTION(fm); + } + } +#if !FOOTERS +#undef fm +#endif /* FOOTERS */ +} + +void* dlcalloc(size_t n_elements, size_t elem_size) { + void* mem; + size_t req = 0; + if (n_elements != 0) { + req = n_elements * elem_size; + if (((n_elements | elem_size) & ~(size_t)0xffff) && + (req / n_elements != elem_size)) + req = MAX_SIZE_T; /* force downstream failure on overflow */ + } + mem = dlmalloc(req); + if (mem != 0 && calloc_must_clear(mem2chunk(mem))) + memset(mem, 0, req); + return mem; +} + +void* dlrealloc(void* oldmem, size_t bytes) { + if (oldmem == 0) + return dlmalloc(bytes); +#ifdef REALLOC_ZERO_BYTES_FREES + if (bytes == 0) { + dlfree(oldmem); + return 0; + } +#endif /* REALLOC_ZERO_BYTES_FREES */ + else { +#if ! FOOTERS + mstate m = gm; +#else /* FOOTERS */ + mstate m = get_mstate_for(mem2chunk(oldmem)); + if (!ok_magic(m)) { + USAGE_ERROR_ACTION(m, oldmem); + return 0; + } +#endif /* FOOTERS */ + return internal_realloc(m, oldmem, bytes); + } +} + +void* dlmemalign(size_t alignment, size_t bytes) { + return internal_memalign(gm, alignment, bytes); +} + +void** dlindependent_calloc(size_t n_elements, size_t elem_size, + void* chunks[]) { + size_t sz = elem_size; /* serves as 1-element array */ + return ialloc(gm, n_elements, &sz, 3, chunks); +} + +void** dlindependent_comalloc(size_t n_elements, size_t sizes[], + void* chunks[]) { + return ialloc(gm, n_elements, sizes, 0, chunks); +} + +void* dlvalloc(size_t bytes) { + size_t pagesz; + init_mparams(); + pagesz = mparams.page_size; + return dlmemalign(pagesz, bytes); +} + +void* dlpvalloc(size_t bytes) { + size_t pagesz; + init_mparams(); + pagesz = mparams.page_size; + return dlmemalign(pagesz, (bytes + pagesz - SIZE_T_ONE) & ~(pagesz - SIZE_T_ONE)); +} + +int dlmalloc_trim(size_t pad) { + int result = 0; + if (!PREACTION(gm)) { + result = sys_trim(gm, pad); + POSTACTION(gm); + } + return result; +} + +size_t dlmalloc_footprint(void) { + return gm->footprint; +} + +size_t dlmalloc_max_footprint(void) { + return gm->max_footprint; +} + +#if !NO_MALLINFO +struct mallinfo dlmallinfo(void) { + return internal_mallinfo(gm); +} +#endif /* NO_MALLINFO */ + +void dlmalloc_stats() { + internal_malloc_stats(gm); +} + +size_t dlmalloc_usable_size(void* mem) { + if (mem != 0) { + mchunkptr p = mem2chunk(mem); + if (cinuse(p)) + return chunksize(p) - overhead_for(p); + } + return 0; +} + +int dlmallopt(int param_number, int value) { + return change_mparam(param_number, value); +} + +#endif /* !ONLY_MSPACES */ + +/* ----------------------------- user mspaces ---------------------------- */ + +#if MSPACES + +static mstate init_user_mstate(char* tbase, size_t tsize) { + size_t msize = pad_request(sizeof(struct malloc_state)); + mchunkptr mn; + mchunkptr msp = align_as_chunk(tbase); + mstate m = (mstate)(chunk2mem(msp)); + memset(m, 0, msize); + INITIAL_LOCK(&m->mutex); + msp->head = (msize|PINUSE_BIT|CINUSE_BIT); + m->seg.base = m->least_addr = tbase; + m->seg.size = m->footprint = m->max_footprint = tsize; + m->magic = mparams.magic; + m->mflags = mparams.default_mflags; + disable_contiguous(m); + init_bins(m); + mn = next_chunk(mem2chunk(m)); + init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) - TOP_FOOT_SIZE); + check_top_chunk(m, m->top); + return m; +} + +mspace create_mspace(size_t capacity, int locked) { + mstate m = 0; + size_t msize = pad_request(sizeof(struct malloc_state)); + init_mparams(); /* Ensure pagesize etc initialized */ + + if (capacity < (size_t) -(msize + TOP_FOOT_SIZE + mparams.page_size)) { + size_t rs = ((capacity == 0)? mparams.granularity : + (capacity + TOP_FOOT_SIZE + msize)); + size_t tsize = granularity_align(rs); + char* tbase = (char*)(CALL_MMAP(tsize)); + if (tbase != CMFAIL) { + m = init_user_mstate(tbase, tsize); + set_segment_flags(&m->seg, IS_MMAPPED_BIT); + set_lock(m, locked); + } + } + return (mspace)m; +} + +mspace create_mspace_with_base(void* base, size_t capacity, int locked) { + mstate m = 0; + size_t msize = pad_request(sizeof(struct malloc_state)); + init_mparams(); /* Ensure pagesize etc initialized */ + + if (capacity > msize + TOP_FOOT_SIZE && + capacity < (size_t) -(msize + TOP_FOOT_SIZE + mparams.page_size)) { + m = init_user_mstate((char*)base, capacity); + set_segment_flags(&m->seg, EXTERN_BIT); + set_lock(m, locked); + } + return (mspace)m; +} + +size_t destroy_mspace(mspace msp) { + size_t freed = 0; + mstate ms = (mstate)msp; + if (ok_magic(ms)) { + msegmentptr sp = &ms->seg; + while (sp != 0) { + char* base = sp->base; + size_t size = sp->size; + flag_t flag = get_segment_flags(sp); + sp = sp->next; + if ((flag & IS_MMAPPED_BIT) && !(flag & EXTERN_BIT) && + CALL_MUNMAP(base, size) == 0) + freed += size; + } + } + else { + USAGE_ERROR_ACTION(ms,ms); + } + return freed; +} + +/* + mspace versions of routines are near-clones of the global + versions. This is not so nice but better than the alternatives. +*/ + + +void* mspace_malloc(mspace msp, size_t bytes) { + mstate ms = (mstate)msp; + if (!ok_magic(ms)) { + USAGE_ERROR_ACTION(ms,ms); + return 0; + } + if (!PREACTION(ms)) { + void* mem; + size_t nb; + if (bytes <= MAX_SMALL_REQUEST) { + bindex_t idx; + binmap_t smallbits; + nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes); + idx = small_index(nb); + smallbits = ms->smallmap >> idx; + + if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */ + mchunkptr b, p; + idx += ~smallbits & 1; /* Uses next bin if idx empty */ + b = smallbin_at(ms, idx); + p = b->fd; + assert(chunksize(p) == small_index2size(idx)); + unlink_first_small_chunk(ms, b, p, idx); + set_inuse_and_pinuse(ms, p, small_index2size(idx)); + mem = chunk2mem(p); + check_malloced_chunk(ms, mem, nb); + goto postaction; + } + + else if (nb > ms->dvsize) { + if (smallbits != 0) { /* Use chunk in next nonempty smallbin */ + mchunkptr b, p, r; + size_t rsize; + bindex_t i; + binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx)); + binmap_t leastbit = least_bit(leftbits); + compute_bit2idx(leastbit, i); + b = smallbin_at(ms, i); + p = b->fd; + assert(chunksize(p) == small_index2size(i)); + unlink_first_small_chunk(ms, b, p, i); + rsize = small_index2size(i) - nb; + /* Fit here cannot be remainderless if 4byte sizes */ + if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE) + set_inuse_and_pinuse(ms, p, small_index2size(i)); + else { + set_size_and_pinuse_of_inuse_chunk(ms, p, nb); + r = chunk_plus_offset(p, nb); + set_size_and_pinuse_of_free_chunk(r, rsize); + replace_dv(ms, r, rsize); + } + mem = chunk2mem(p); + check_malloced_chunk(ms, mem, nb); + goto postaction; + } + + else if (ms->treemap != 0 && (mem = tmalloc_small(ms, nb)) != 0) { + check_malloced_chunk(ms, mem, nb); + goto postaction; + } + } + } + else if (bytes >= MAX_REQUEST) + nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */ + else { + nb = pad_request(bytes); + if (ms->treemap != 0 && (mem = tmalloc_large(ms, nb)) != 0) { + check_malloced_chunk(ms, mem, nb); + goto postaction; + } + } + + if (nb <= ms->dvsize) { + size_t rsize = ms->dvsize - nb; + mchunkptr p = ms->dv; + if (rsize >= MIN_CHUNK_SIZE) { /* split dv */ + mchunkptr r = ms->dv = chunk_plus_offset(p, nb); + ms->dvsize = rsize; + set_size_and_pinuse_of_free_chunk(r, rsize); + set_size_and_pinuse_of_inuse_chunk(ms, p, nb); + } + else { /* exhaust dv */ + size_t dvs = ms->dvsize; + ms->dvsize = 0; + ms->dv = 0; + set_inuse_and_pinuse(ms, p, dvs); + } + mem = chunk2mem(p); + check_malloced_chunk(ms, mem, nb); + goto postaction; + } + + else if (nb < ms->topsize) { /* Split top */ + size_t rsize = ms->topsize -= nb; + mchunkptr p = ms->top; + mchunkptr r = ms->top = chunk_plus_offset(p, nb); + r->head = rsize | PINUSE_BIT; + set_size_and_pinuse_of_inuse_chunk(ms, p, nb); + mem = chunk2mem(p); + check_top_chunk(ms, ms->top); + check_malloced_chunk(ms, mem, nb); + goto postaction; + } + + mem = sys_alloc(ms, nb); + + postaction: + POSTACTION(ms); + return mem; + } + + return 0; +} + +void mspace_free(mspace msp, void* mem) { + if (mem != 0) { + mchunkptr p = mem2chunk(mem); +#if FOOTERS + mstate fm = get_mstate_for(p); +#else /* FOOTERS */ + mstate fm = (mstate)msp; +#endif /* FOOTERS */ + if (!ok_magic(fm)) { + USAGE_ERROR_ACTION(fm, p); + return; + } + if (!PREACTION(fm)) { + check_inuse_chunk(fm, p); + if (RTCHECK(ok_address(fm, p) && ok_cinuse(p))) { + size_t psize = chunksize(p); + mchunkptr next = chunk_plus_offset(p, psize); + if (!pinuse(p)) { + size_t prevsize = p->prev_foot; + if ((prevsize & IS_MMAPPED_BIT) != 0) { + prevsize &= ~IS_MMAPPED_BIT; + psize += prevsize + MMAP_FOOT_PAD; + if (CALL_MUNMAP((char*)p - prevsize, psize) == 0) + fm->footprint -= psize; + goto postaction; + } + else { + mchunkptr prev = chunk_minus_offset(p, prevsize); + psize += prevsize; + p = prev; + if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */ + if (p != fm->dv) { + unlink_chunk(fm, p, prevsize); + } + else if ((next->head & INUSE_BITS) == INUSE_BITS) { + fm->dvsize = psize; + set_free_with_pinuse(p, psize, next); + goto postaction; + } + } + else + goto erroraction; + } + } + + if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) { + if (!cinuse(next)) { /* consolidate forward */ + if (next == fm->top) { + size_t tsize = fm->topsize += psize; + fm->top = p; + p->head = tsize | PINUSE_BIT; + if (p == fm->dv) { + fm->dv = 0; + fm->dvsize = 0; + } + if (should_trim(fm, tsize)) + sys_trim(fm, 0); + goto postaction; + } + else if (next == fm->dv) { + size_t dsize = fm->dvsize += psize; + fm->dv = p; + set_size_and_pinuse_of_free_chunk(p, dsize); + goto postaction; + } + else { + size_t nsize = chunksize(next); + psize += nsize; + unlink_chunk(fm, next, nsize); + set_size_and_pinuse_of_free_chunk(p, psize); + if (p == fm->dv) { + fm->dvsize = psize; + goto postaction; + } + } + } + else + set_free_with_pinuse(p, psize, next); + insert_chunk(fm, p, psize); + check_free_chunk(fm, p); + goto postaction; + } + } + erroraction: + USAGE_ERROR_ACTION(fm, p); + postaction: + POSTACTION(fm); + } + } +} + +void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size) { + void* mem; + size_t req = 0; + mstate ms = (mstate)msp; + if (!ok_magic(ms)) { + USAGE_ERROR_ACTION(ms,ms); + return 0; + } + if (n_elements != 0) { + req = n_elements * elem_size; + if (((n_elements | elem_size) & ~(size_t)0xffff) && + (req / n_elements != elem_size)) + req = MAX_SIZE_T; /* force downstream failure on overflow */ + } + mem = internal_malloc(ms, req); + if (mem != 0 && calloc_must_clear(mem2chunk(mem))) + memset(mem, 0, req); + return mem; +} + +void* mspace_realloc(mspace msp, void* oldmem, size_t bytes) { + if (oldmem == 0) + return mspace_malloc(msp, bytes); +#ifdef REALLOC_ZERO_BYTES_FREES + if (bytes == 0) { + mspace_free(msp, oldmem); + return 0; + } +#endif /* REALLOC_ZERO_BYTES_FREES */ + else { +#if FOOTERS + mchunkptr p = mem2chunk(oldmem); + mstate ms = get_mstate_for(p); +#else /* FOOTERS */ + mstate ms = (mstate)msp; +#endif /* FOOTERS */ + if (!ok_magic(ms)) { + USAGE_ERROR_ACTION(ms,ms); + return 0; + } + return internal_realloc(ms, oldmem, bytes); + } +} + +void* mspace_memalign(mspace msp, size_t alignment, size_t bytes) { + mstate ms = (mstate)msp; + if (!ok_magic(ms)) { + USAGE_ERROR_ACTION(ms,ms); + return 0; + } + return internal_memalign(ms, alignment, bytes); +} + +void** mspace_independent_calloc(mspace msp, size_t n_elements, + size_t elem_size, void* chunks[]) { + size_t sz = elem_size; /* serves as 1-element array */ + mstate ms = (mstate)msp; + if (!ok_magic(ms)) { + USAGE_ERROR_ACTION(ms,ms); + return 0; + } + return ialloc(ms, n_elements, &sz, 3, chunks); +} + +void** mspace_independent_comalloc(mspace msp, size_t n_elements, + size_t sizes[], void* chunks[]) { + mstate ms = (mstate)msp; + if (!ok_magic(ms)) { + USAGE_ERROR_ACTION(ms,ms); + return 0; + } + return ialloc(ms, n_elements, sizes, 0, chunks); +} + +int mspace_trim(mspace msp, size_t pad) { + int result = 0; + mstate ms = (mstate)msp; + if (ok_magic(ms)) { + if (!PREACTION(ms)) { + result = sys_trim(ms, pad); + POSTACTION(ms); + } + } + else { + USAGE_ERROR_ACTION(ms,ms); + } + return result; +} + +void mspace_malloc_stats(mspace msp) { + mstate ms = (mstate)msp; + if (ok_magic(ms)) { + internal_malloc_stats(ms); + } + else { + USAGE_ERROR_ACTION(ms,ms); + } +} + +size_t mspace_footprint(mspace msp) { + size_t result; + mstate ms = (mstate)msp; + if (ok_magic(ms)) { + result = ms->footprint; + } + USAGE_ERROR_ACTION(ms,ms); + return result; +} + + +size_t mspace_max_footprint(mspace msp) { + size_t result; + mstate ms = (mstate)msp; + if (ok_magic(ms)) { + result = ms->max_footprint; + } + USAGE_ERROR_ACTION(ms,ms); + return result; +} + + +#if !NO_MALLINFO +struct mallinfo mspace_mallinfo(mspace msp) { + mstate ms = (mstate)msp; + if (!ok_magic(ms)) { + USAGE_ERROR_ACTION(ms,ms); + } + return internal_mallinfo(ms); +} +#endif /* NO_MALLINFO */ + +int mspace_mallopt(int param_number, int value) { + return change_mparam(param_number, value); +} + +#endif /* MSPACES */ + +/* -------------------- Alternative MORECORE functions ------------------- */ + +/* + Guidelines for creating a custom version of MORECORE: + + * For best performance, MORECORE should allocate in multiples of pagesize. + * MORECORE may allocate more memory than requested. (Or even less, + but this will usually result in a malloc failure.) + * MORECORE must not allocate memory when given argument zero, but + instead return one past the end address of memory from previous + nonzero call. + * For best performance, consecutive calls to MORECORE with positive + arguments should return increasing addresses, indicating that + space has been contiguously extended. + * Even though consecutive calls to MORECORE need not return contiguous + addresses, it must be OK for malloc'ed chunks to span multiple + regions in those cases where they do happen to be contiguous. + * MORECORE need not handle negative arguments -- it may instead + just return MFAIL when given negative arguments. + Negative arguments are always multiples of pagesize. MORECORE + must not misinterpret negative args as large positive unsigned + args. You can suppress all such calls from even occurring by defining + MORECORE_CANNOT_TRIM, + + As an example alternative MORECORE, here is a custom allocator + kindly contributed for pre-OSX macOS. It uses virtually but not + necessarily physically contiguous non-paged memory (locked in, + present and won't get swapped out). You can use it by uncommenting + this section, adding some #includes, and setting up the appropriate + defines above: + + #define MORECORE osMoreCore + + There is also a shutdown routine that should somehow be called for + cleanup upon program exit. + + #define MAX_POOL_ENTRIES 100 + #define MINIMUM_MORECORE_SIZE (64 * 1024U) + static int next_os_pool; + void *our_os_pools[MAX_POOL_ENTRIES]; + + void *osMoreCore(int size) + { + void *ptr = 0; + static void *sbrk_top = 0; + + if (size > 0) + { + if (size < MINIMUM_MORECORE_SIZE) + size = MINIMUM_MORECORE_SIZE; + if (CurrentExecutionLevel() == kTaskLevel) + ptr = PoolAllocateResident(size + RM_PAGE_SIZE, 0); + if (ptr == 0) + { + return (void *) MFAIL; + } + // save ptrs so they can be freed during cleanup + our_os_pools[next_os_pool] = ptr; + next_os_pool++; + ptr = (void *) ((((size_t) ptr) + RM_PAGE_MASK) & ~RM_PAGE_MASK); + sbrk_top = (char *) ptr + size; + return ptr; + } + else if (size < 0) + { + // we don't currently support shrink behavior + return (void *) MFAIL; + } + else + { + return sbrk_top; + } + } + + // cleanup any allocated memory pools + // called as last thing before shutting down driver + + void osCleanupMem(void) + { + void **ptr; + + for (ptr = our_os_pools; ptr < &our_os_pools[MAX_POOL_ENTRIES]; ptr++) + if (*ptr) + { + PoolDeallocate(*ptr); + *ptr = 0; + } + } + +*/ + + +/* ----------------------------------------------------------------------- +History: + V2.8.3 Thu Sep 22 11:16:32 2005 Doug Lea (dl at gee) + * Add max_footprint functions + * Ensure all appropriate literals are size_t + * Fix conditional compilation problem for some #define settings + * Avoid concatenating segments with the one provided + in create_mspace_with_base + * Rename some variables to avoid compiler shadowing warnings + * Use explicit lock initialization. + * Better handling of sbrk interference. + * Simplify and fix segment insertion, trimming and mspace_destroy + * Reinstate REALLOC_ZERO_BYTES_FREES option from 2.7.x + * Thanks especially to Dennis Flanagan for help on these. + + V2.8.2 Sun Jun 12 16:01:10 2005 Doug Lea (dl at gee) + * Fix memalign brace error. + + V2.8.1 Wed Jun 8 16:11:46 2005 Doug Lea (dl at gee) + * Fix improper #endif nesting in C++ + * Add explicit casts needed for C++ + + V2.8.0 Mon May 30 14:09:02 2005 Doug Lea (dl at gee) + * Use trees for large bins + * Support mspaces + * Use segments to unify sbrk-based and mmap-based system allocation, + removing need for emulation on most platforms without sbrk. + * Default safety checks + * Optional footer checks. Thanks to William Robertson for the idea. + * Internal code refactoring + * Incorporate suggestions and platform-specific changes. + Thanks to Dennis Flanagan, Colin Plumb, Niall Douglas, + Aaron Bachmann, Emery Berger, and others. + * Speed up non-fastbin processing enough to remove fastbins. + * Remove useless cfree() to avoid conflicts with other apps. + * Remove internal memcpy, memset. Compilers handle builtins better. + * Remove some options that no one ever used and rename others. + + V2.7.2 Sat Aug 17 09:07:30 2002 Doug Lea (dl at gee) + * Fix malloc_state bitmap array misdeclaration + + V2.7.1 Thu Jul 25 10:58:03 2002 Doug Lea (dl at gee) + * Allow tuning of FIRST_SORTED_BIN_SIZE + * Use PTR_UINT as type for all ptr->int casts. Thanks to John Belmonte. + * Better detection and support for non-contiguousness of MORECORE. + Thanks to Andreas Mueller, Conal Walsh, and Wolfram Gloger + * Bypass most of malloc if no frees. Thanks To Emery Berger. + * Fix freeing of old top non-contiguous chunk im sysmalloc. + * Raised default trim and map thresholds to 256K. + * Fix mmap-related #defines. Thanks to Lubos Lunak. + * Fix copy macros; added LACKS_FCNTL_H. Thanks to Neal Walfield. + * Branch-free bin calculation + * Default trim and mmap thresholds now 256K. + + V2.7.0 Sun Mar 11 14:14:06 2001 Doug Lea (dl at gee) + * Introduce independent_comalloc and independent_calloc. + Thanks to Michael Pachos for motivation and help. + * Make optional .h file available + * Allow > 2GB requests on 32bit systems. + * new WIN32 sbrk, mmap, munmap, lock code from . + Thanks also to Andreas Mueller , + and Anonymous. + * Allow override of MALLOC_ALIGNMENT (Thanks to Ruud Waij for + helping test this.) + * memalign: check alignment arg + * realloc: don't try to shift chunks backwards, since this + leads to more fragmentation in some programs and doesn't + seem to help in any others. + * Collect all cases in malloc requiring system memory into sysmalloc + * Use mmap as backup to sbrk + * Place all internal state in malloc_state + * Introduce fastbins (although similar to 2.5.1) + * Many minor tunings and cosmetic improvements + * Introduce USE_PUBLIC_MALLOC_WRAPPERS, USE_MALLOC_LOCK + * Introduce MALLOC_FAILURE_ACTION, MORECORE_CONTIGUOUS + Thanks to Tony E. Bennett and others. + * Include errno.h to support default failure action. + + V2.6.6 Sun Dec 5 07:42:19 1999 Doug Lea (dl at gee) + * return null for negative arguments + * Added Several WIN32 cleanups from Martin C. Fong + * Add 'LACKS_SYS_PARAM_H' for those systems without 'sys/param.h' + (e.g. WIN32 platforms) + * Cleanup header file inclusion for WIN32 platforms + * Cleanup code to avoid Microsoft Visual C++ compiler complaints + * Add 'USE_DL_PREFIX' to quickly allow co-existence with existing + memory allocation routines + * Set 'malloc_getpagesize' for WIN32 platforms (needs more work) + * Use 'assert' rather than 'ASSERT' in WIN32 code to conform to + usage of 'assert' in non-WIN32 code + * Improve WIN32 'sbrk()' emulation's 'findRegion()' routine to + avoid infinite loop + * Always call 'fREe()' rather than 'free()' + + V2.6.5 Wed Jun 17 15:57:31 1998 Doug Lea (dl at gee) + * Fixed ordering problem with boundary-stamping + + V2.6.3 Sun May 19 08:17:58 1996 Doug Lea (dl at gee) + * Added pvalloc, as recommended by H.J. Liu + * Added 64bit pointer support mainly from Wolfram Gloger + * Added anonymously donated WIN32 sbrk emulation + * Malloc, calloc, getpagesize: add optimizations from Raymond Nijssen + * malloc_extend_top: fix mask error that caused wastage after + foreign sbrks + * Add linux mremap support code from HJ Liu + + V2.6.2 Tue Dec 5 06:52:55 1995 Doug Lea (dl at gee) + * Integrated most documentation with the code. + * Add support for mmap, with help from + Wolfram Gloger (Gloger@lrz.uni-muenchen.de). + * Use last_remainder in more cases. + * Pack bins using idea from colin@nyx10.cs.du.edu + * Use ordered bins instead of best-fit threshhold + * Eliminate block-local decls to simplify tracing and debugging. + * Support another case of realloc via move into top + * Fix error occuring when initial sbrk_base not word-aligned. + * Rely on page size for units instead of SBRK_UNIT to + avoid surprises about sbrk alignment conventions. + * Add mallinfo, mallopt. Thanks to Raymond Nijssen + (raymond@es.ele.tue.nl) for the suggestion. + * Add `pad' argument to malloc_trim and top_pad mallopt parameter. + * More precautions for cases where other routines call sbrk, + courtesy of Wolfram Gloger (Gloger@lrz.uni-muenchen.de). + * Added macros etc., allowing use in linux libc from + H.J. Lu (hjl@gnu.ai.mit.edu) + * Inverted this history list + + V2.6.1 Sat Dec 2 14:10:57 1995 Doug Lea (dl at gee) + * Re-tuned and fixed to behave more nicely with V2.6.0 changes. + * Removed all preallocation code since under current scheme + the work required to undo bad preallocations exceeds + the work saved in good cases for most test programs. + * No longer use return list or unconsolidated bins since + no scheme using them consistently outperforms those that don't + given above changes. + * Use best fit for very large chunks to prevent some worst-cases. + * Added some support for debugging + + V2.6.0 Sat Nov 4 07:05:23 1995 Doug Lea (dl at gee) + * Removed footers when chunks are in use. Thanks to + Paul Wilson (wilson@cs.texas.edu) for the suggestion. + + V2.5.4 Wed Nov 1 07:54:51 1995 Doug Lea (dl at gee) + * Added malloc_trim, with help from Wolfram Gloger + (wmglo@Dent.MED.Uni-Muenchen.DE). + + V2.5.3 Tue Apr 26 10:16:01 1994 Doug Lea (dl at g) + + V2.5.2 Tue Apr 5 16:20:40 1994 Doug Lea (dl at g) + * realloc: try to expand in both directions + * malloc: swap order of clean-bin strategy; + * realloc: only conditionally expand backwards + * Try not to scavenge used bins + * Use bin counts as a guide to preallocation + * Occasionally bin return list chunks in first scan + * Add a few optimizations from colin@nyx10.cs.du.edu + + V2.5.1 Sat Aug 14 15:40:43 1993 Doug Lea (dl at g) + * faster bin computation & slightly different binning + * merged all consolidations to one part of malloc proper + (eliminating old malloc_find_space & malloc_clean_bin) + * Scan 2 returns chunks (not just 1) + * Propagate failure in realloc if malloc returns 0 + * Add stuff to allow compilation on non-ANSI compilers + from kpv@research.att.com + + V2.5 Sat Aug 7 07:41:59 1993 Doug Lea (dl at g.oswego.edu) + * removed potential for odd address access in prev_chunk + * removed dependency on getpagesize.h + * misc cosmetics and a bit more internal documentation + * anticosmetics: mangled names in macros to evade debugger strangeness + * tested on sparc, hp-700, dec-mips, rs6000 + with gcc & native cc (hp, dec only) allowing + Detlefs & Zorn comparison study (in SIGPLAN Notices.) + + Trial version Fri Aug 28 13:14:29 1992 Doug Lea (dl at g.oswego.edu) + * Based loosely on libg++-1.2X malloc. (It retains some of the overall + structure of old version, but most details differ.) + +*/ diff -rNu smalltalk-3.0.2/libffi/src/frv/ffi.c smalltalk-3.0.3/libffi/src/frv/ffi.c --- smalltalk-3.0.2/libffi/src/frv/ffi.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/frv/ffi.c 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,6 @@ /* ----------------------------------------------------------------------- ffi.c - Copyright (c) 2004 Anthony Green + Copyright (C) 2007 Free Software Foundation, Inc. FR-V Foreign Function Interface @@ -14,13 +15,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ #include @@ -243,14 +245,15 @@ } ffi_status -ffi_prep_closure (ffi_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*, void*, void**, void*), - void *user_data) +ffi_prep_closure_loc (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*, void*, void**, void*), + void *user_data, + void *codeloc) { unsigned int *tramp = (unsigned int *) &closure->tramp[0]; unsigned long fn = (long) ffi_closure_eabi; - unsigned long cls = (long) closure; + unsigned long cls = (long) codeloc; #ifdef __FRV_FDPIC__ register void *got __asm__("gr15"); #endif @@ -259,7 +262,7 @@ fn = (unsigned long) ffi_closure_eabi; #ifdef __FRV_FDPIC__ - tramp[0] = &tramp[2]; + tramp[0] = &((unsigned int *)codeloc)[2]; tramp[1] = got; tramp[2] = 0x8cfc0000 + (fn & 0xffff); /* setlos lo(fn), gr6 */ tramp[3] = 0x8efc0000 + (cls & 0xffff); /* setlos lo(cls), gr7 */ @@ -281,7 +284,8 @@ /* Cache flushing. */ for (i = 0; i < FFI_TRAMPOLINE_SIZE; i++) - __asm__ volatile ("dcf @(%0,%1)\n\tici @(%0,%1)" :: "r" (tramp), "r" (i)); + __asm__ volatile ("dcf @(%0,%1)\n\tici @(%2,%1)" :: "r" (tramp), "r" (i), + "r" (codeloc)); return FFI_OK; } diff -rNu smalltalk-3.0.2/libffi/src/frv/ffitarget.h smalltalk-3.0.3/libffi/src/frv/ffitarget.h --- smalltalk-3.0.2/libffi/src/frv/ffitarget.h 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/frv/ffitarget.h 2008-04-10 11:10:57.000000000 +0200 @@ -13,13 +13,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ diff -rNu smalltalk-3.0.2/libffi/src/ia64/ffi.c smalltalk-3.0.3/libffi/src/ia64/ffi.c --- smalltalk-3.0.2/libffi/src/ia64/ffi.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/ia64/ffi.c 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- - ffi.c - Copyright (c) 1998 Red Hat, Inc. + ffi.c - Copyright (c) 1998, 2007 Red Hat, Inc. Copyright (c) 2000 Hewlett Packard Company IA64 Foreign Function Interface @@ -15,13 +15,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ #include @@ -400,10 +401,11 @@ extern void ffi_closure_unix (); ffi_status -ffi_prep_closure (ffi_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*,void*,void**,void*), - void *user_data) +ffi_prep_closure_loc (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data, + void *codeloc) { /* The layout of a function descriptor. A C function pointer really points to one of these. */ @@ -430,7 +432,7 @@ tramp->code_pointer = fd->code_pointer; tramp->real_gp = fd->gp; - tramp->fake_gp = (UINT64)(PTR64)closure; + tramp->fake_gp = (UINT64)(PTR64)codeloc; closure->cif = cif; closure->user_data = user_data; closure->fun = fun; diff -rNu smalltalk-3.0.2/libffi/src/ia64/ffitarget.h smalltalk-3.0.3/libffi/src/ia64/ffitarget.h --- smalltalk-3.0.2/libffi/src/ia64/ffitarget.h 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/ia64/ffitarget.h 2008-04-10 11:10:57.000000000 +0200 @@ -13,13 +13,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ diff -rNu smalltalk-3.0.2/libffi/src/ia64/ia64_flags.h smalltalk-3.0.3/libffi/src/ia64/ia64_flags.h --- smalltalk-3.0.2/libffi/src/ia64/ia64_flags.h 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/ia64/ia64_flags.h 2008-04-10 11:10:57.000000000 +0200 @@ -16,13 +16,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ /* "Type" codes used between assembly and C. When used as a part of diff -rNu smalltalk-3.0.2/libffi/src/ia64/unix.S smalltalk-3.0.3/libffi/src/ia64/unix.S --- smalltalk-3.0.2/libffi/src/ia64/unix.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/ia64/unix.S 2008-04-10 11:10:57.000000000 +0200 @@ -22,7 +22,8 @@ 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 CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + 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. diff -rNu smalltalk-3.0.2/libffi/src/java_raw_api.c smalltalk-3.0.3/libffi/src/java_raw_api.c --- smalltalk-3.0.2/libffi/src/java_raw_api.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/java_raw_api.c 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- - java_raw_api.c - Copyright (c) 1999 Red Hat, Inc. + java_raw_api.c - Copyright (c) 1999, 2007 Red Hat, Inc. Cloned from raw_api.c @@ -19,13 +19,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ /* This defines a Java- and 64-bit specific variant of the raw API. */ @@ -54,13 +55,13 @@ case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: case FFI_TYPE_DOUBLE: - result += 2 * FFI_SIZEOF_ARG; + result += 2 * FFI_SIZEOF_JAVA_RAW; break; case FFI_TYPE_STRUCT: /* No structure parameters in Java. */ abort(); default: - result += FFI_SIZEOF_ARG; + result += FFI_SIZEOF_JAVA_RAW; } } @@ -69,7 +70,7 @@ void -ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args) +ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args) { unsigned i; ffi_type **tp = cif->arg_types; @@ -90,7 +91,7 @@ *args = (void*) ((char*)(raw++) + 2); break; -#if FFI_SIZEOF_ARG == 8 +#if FFI_SIZEOF_JAVA_RAW == 8 case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: case FFI_TYPE_DOUBLE: @@ -105,7 +106,8 @@ default: *args = raw; - raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; + raw += + ALIGN ((*tp)->size, sizeof(ffi_java_raw)) / sizeof(ffi_java_raw); } } @@ -116,7 +118,7 @@ /* then assume little endian */ for (i = 0; i < cif->nargs; i++, tp++, args++) { -#if FFI_SIZEOF_ARG == 8 +#if FFI_SIZEOF_JAVA_RAW == 8 switch((*tp)->type) { case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: @@ -127,10 +129,11 @@ default: *args = (void*) raw++; } -#else /* FFI_SIZEOF_ARG != 8 */ +#else /* FFI_SIZEOF_JAVA_RAW != 8 */ *args = (void*) raw; - raw += ALIGN ((*tp)->size, sizeof (void*)) / sizeof (void*); -#endif /* FFI_SIZEOF_ARG == 8 */ + raw += + ALIGN ((*tp)->size, sizeof(ffi_java_raw)) / sizeof(ffi_java_raw); +#endif /* FFI_SIZEOF_JAVA_RAW == 8 */ } #else @@ -141,7 +144,7 @@ } void -ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw) +ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw) { unsigned i; ffi_type **tp = cif->arg_types; @@ -202,7 +205,7 @@ (raw++)->flt = *(FLOAT32*) (*args); break; -#if FFI_SIZEOF_ARG == 8 +#if FFI_SIZEOF_JAVA_RAW == 8 case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: case FFI_TYPE_DOUBLE: @@ -216,11 +219,12 @@ break; default: -#if FFI_SIZEOF_ARG == 8 +#if FFI_SIZEOF_JAVA_RAW == 8 FFI_ASSERT(0); /* Should have covered all cases */ #else memcpy ((void*) raw->data, (void*)*args, (*tp)->size); - raw += ALIGN ((*tp)->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; + raw += + ALIGN ((*tp)->size, sizeof(ffi_java_raw)) / sizeof(ffi_java_raw); #endif } } @@ -244,6 +248,9 @@ case FFI_TYPE_SINT16: case FFI_TYPE_SINT32: case FFI_TYPE_INT: +#if FFI_SIZEOF_JAVA_RAW == 4 + case FFI_TYPE_POINTER: +#endif *(SINT64 *)rvalue <<= 32; break; @@ -269,6 +276,9 @@ case FFI_TYPE_SINT16: case FFI_TYPE_SINT32: case FFI_TYPE_INT: +#if FFI_SIZEOF_JAVA_RAW == 4 + case FFI_TYPE_POINTER: +#endif *(SINT64 *)rvalue >>= 32; break; @@ -285,7 +295,8 @@ * these following couple of functions will handle the translation forth * and back automatically. */ -void ffi_java_raw_call (ffi_cif *cif, void (*fn)(), void *rvalue, ffi_raw *raw) +void ffi_java_raw_call (ffi_cif *cif, void (*fn)(), void *rvalue, + ffi_java_raw *raw) { void **avalue = (void**) alloca (cif->nargs * sizeof (void*)); ffi_java_raw_to_ptrarray (cif, raw, avalue); @@ -299,7 +310,7 @@ ffi_java_translate_args (ffi_cif *cif, void *rvalue, void **avalue, void *user_data) { - ffi_raw *raw = (ffi_raw*)alloca (ffi_java_raw_size (cif)); + ffi_java_raw *raw = (ffi_java_raw*)alloca (ffi_java_raw_size (cif)); ffi_raw_closure *cl = (ffi_raw_closure*)user_data; ffi_java_ptrarray_to_raw (cif, avalue, raw); @@ -307,22 +318,20 @@ ffi_java_raw_to_rvalue (cif, rvalue); } -/* Again, here is the generic version of ffi_prep_raw_closure, which - * will install an intermediate "hub" for translation of arguments from - * the pointer-array format, to the raw format */ - ffi_status -ffi_prep_java_raw_closure (ffi_raw_closure* cl, - ffi_cif *cif, - void (*fun)(ffi_cif*,void*,ffi_raw*,void*), - void *user_data) +ffi_prep_java_raw_closure_loc (ffi_java_raw_closure* cl, + ffi_cif *cif, + void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*), + void *user_data, + void *codeloc) { ffi_status status; - status = ffi_prep_closure ((ffi_closure*) cl, - cif, - &ffi_java_translate_args, - (void*)cl); + status = ffi_prep_closure_loc ((ffi_closure*) cl, + cif, + &ffi_java_translate_args, + codeloc, + codeloc); if (status == FFI_OK) { cl->fun = fun; @@ -332,6 +341,19 @@ return status; } +/* Again, here is the generic version of ffi_prep_raw_closure, which + * will install an intermediate "hub" for translation of arguments from + * the pointer-array format, to the raw format */ + +ffi_status +ffi_prep_java_raw_closure (ffi_java_raw_closure* cl, + ffi_cif *cif, + void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*), + void *user_data) +{ + return ffi_prep_java_raw_closure_loc (cl, cif, fun, user_data, cl); +} + #endif /* FFI_CLOSURES */ #endif /* !FFI_NATIVE_RAW_API */ #endif /* !FFI_NO_RAW_API */ diff -rNu smalltalk-3.0.2/libffi/src/m68k/ffi.c smalltalk-3.0.3/libffi/src/m68k/ffi.c --- smalltalk-3.0.2/libffi/src/m68k/ffi.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/m68k/ffi.c 2008-04-10 11:10:57.000000000 +0200 @@ -8,11 +8,23 @@ #include #include +#include +#include +#include + +void ffi_call_SYSV (extended_cif *, + unsigned, unsigned, + void *, void (*fn) ()); +void *ffi_prep_args (void *stack, extended_cif *ecif); +void ffi_closure_SYSV (ffi_closure *); +void ffi_closure_struct_SYSV (ffi_closure *); +unsigned int ffi_closure_SYSV_inner (ffi_closure *closure, + void *resp, void *args); /* ffi_prep_args is called by the assembly routine once stack space has been allocated for the function's arguments. */ -static void * +void * ffi_prep_args (void *stack, extended_cif *ecif) { unsigned int i; @@ -24,7 +36,7 @@ argp = stack; if (ecif->cif->rtype->type == FFI_TYPE_STRUCT - && ecif->cif->rtype->size > 8) + && !ecif->cif->flags) struct_value_ptr = ecif->rvalue; else struct_value_ptr = NULL; @@ -37,44 +49,47 @@ { size_t z; - /* Align if necessary. */ - if (((*p_arg)->alignment - 1) & (unsigned) argp) - argp = (char *) ALIGN (argp, (*p_arg)->alignment); - - z = (*p_arg)->size; - if (z < sizeof (int)) + z = (*p_arg)->size; + if (z < sizeof (int)) + { + switch ((*p_arg)->type) { - switch ((*p_arg)->type) - { - case FFI_TYPE_SINT8: - *(signed int *) argp = (signed int) *(SINT8 *) *p_argv; - break; - - case FFI_TYPE_UINT8: - *(unsigned int *) argp = (unsigned int) *(UINT8 *) *p_argv; - break; - - case FFI_TYPE_SINT16: - *(signed int *) argp = (signed int) *(SINT16 *) *p_argv; - break; - - case FFI_TYPE_UINT16: - *(unsigned int *) argp = (unsigned int) *(UINT16 *) *p_argv; - break; - - case FFI_TYPE_STRUCT: - memcpy (argp + sizeof (int) - z, *p_argv, z); - break; - - default: - FFI_ASSERT (0); - } - z = sizeof (int); + case FFI_TYPE_SINT8: + *(signed int *) argp = (signed int) *(SINT8 *) *p_argv; + break; + + case FFI_TYPE_UINT8: + *(unsigned int *) argp = (unsigned int) *(UINT8 *) *p_argv; + break; + + case FFI_TYPE_SINT16: + *(signed int *) argp = (signed int) *(SINT16 *) *p_argv; + break; + + case FFI_TYPE_UINT16: + *(unsigned int *) argp = (unsigned int) *(UINT16 *) *p_argv; + break; + + case FFI_TYPE_STRUCT: + memcpy (argp + sizeof (int) - z, *p_argv, z); + break; + + default: + FFI_ASSERT (0); } - else - memcpy (argp, *p_argv, z); - p_argv++; - argp += z; + z = sizeof (int); + } + else + { + memcpy (argp, *p_argv, z); + + /* Align if necessary. */ + if ((sizeof(int) - 1) & z) + z = ALIGN(z, sizeof(int)); + } + + p_argv++; + argp += z; } return struct_value_ptr; @@ -86,7 +101,8 @@ #define CIF_FLAGS_DOUBLE 8 #define CIF_FLAGS_LDOUBLE 16 #define CIF_FLAGS_POINTER 32 -#define CIF_FLAGS_STRUCT 64 +#define CIF_FLAGS_STRUCT1 64 +#define CIF_FLAGS_STRUCT2 128 /* Perform machine dependent cif processing */ ffi_status @@ -100,12 +116,24 @@ break; case FFI_TYPE_STRUCT: - if (cif->rtype->size > 4 && cif->rtype->size <= 8) - cif->flags = CIF_FLAGS_DINT; - else if (cif->rtype->size <= 4) - cif->flags = CIF_FLAGS_STRUCT; - else - cif->flags = 0; + switch (cif->rtype->size) + { + case 1: + cif->flags = CIF_FLAGS_STRUCT1; + break; + case 2: + cif->flags = CIF_FLAGS_STRUCT2; + break; + case 4: + cif->flags = CIF_FLAGS_INT; + break; + case 8: + cif->flags = CIF_FLAGS_DINT; + break; + default: + cif->flags = 0; + break; + } break; case FFI_TYPE_FLOAT: @@ -137,11 +165,6 @@ return FFI_OK; } -extern void ffi_call_SYSV (void *(*) (void *, extended_cif *), - extended_cif *, - unsigned, unsigned, unsigned, - void *, void (*fn) ()); - void ffi_call (ffi_cif *cif, void (*fn) (), void *rvalue, void **avalue) { @@ -149,7 +172,7 @@ ecif.cif = cif; ecif.avalue = avalue; - + /* If the return value is a struct and we don't have a return value address then we need to make one. */ @@ -159,13 +182,11 @@ ecif.rvalue = alloca (cif->rtype->size); else ecif.rvalue = rvalue; - - - switch (cif->abi) + + switch (cif->abi) { case FFI_SYSV: - ffi_call_SYSV (ffi_prep_args, &ecif, cif->bytes, - cif->flags, cif->rtype->size * 8, + ffi_call_SYSV (&ecif, cif->bytes, cif->flags, ecif.rvalue, fn); break; @@ -174,3 +195,84 @@ break; } } + +static void +ffi_prep_incoming_args_SYSV (char *stack, void **avalue, ffi_cif *cif) +{ + unsigned int i; + void **p_argv; + char *argp; + ffi_type **p_arg; + + argp = stack; + p_argv = avalue; + + for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++) + { + size_t z; + + z = (*p_arg)->size; + if (z <= 4) + { + *p_argv = (void *) (argp + 4 - z); + + z = 4; + } + else + { + *p_argv = (void *) argp; + + /* Align if necessary */ + if ((sizeof(int) - 1) & z) + z = ALIGN(z, sizeof(int)); + } + + p_argv++; + argp += z; + } +} + +unsigned int +ffi_closure_SYSV_inner (ffi_closure *closure, void *resp, void *args) +{ + ffi_cif *cif; + void **arg_area; + + cif = closure->cif; + arg_area = (void**) alloca (cif->nargs * sizeof (void *)); + + ffi_prep_incoming_args_SYSV(args, arg_area, cif); + + (closure->fun) (cif, resp, arg_area, closure->user_data); + + return cif->flags; +} + +ffi_status +ffi_prep_closure_loc (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data, + void *codeloc) +{ + FFI_ASSERT (cif->abi == FFI_SYSV); + + *(unsigned short *)closure->tramp = 0x207c; + *(void **)(closure->tramp + 2) = codeloc; + *(unsigned short *)(closure->tramp + 6) = 0x4ef9; + if (cif->rtype->type == FFI_TYPE_STRUCT + && !cif->flags) + *(void **)(closure->tramp + 8) = ffi_closure_struct_SYSV; + else + *(void **)(closure->tramp + 8) = ffi_closure_SYSV; + + syscall(SYS_cacheflush, codeloc, FLUSH_SCOPE_LINE, + FLUSH_CACHE_BOTH, FFI_TRAMPOLINE_SIZE); + + closure->cif = cif; + closure->user_data = user_data; + closure->fun = fun; + + return FFI_OK; +} + diff -rNu smalltalk-3.0.2/libffi/src/m68k/ffitarget.h smalltalk-3.0.3/libffi/src/m68k/ffitarget.h --- smalltalk-3.0.2/libffi/src/m68k/ffitarget.h 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/m68k/ffitarget.h 2008-04-10 11:10:57.000000000 +0200 @@ -13,13 +13,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ @@ -40,7 +41,8 @@ /* ---- Definitions for closures ----------------------------------------- */ -#define FFI_CLOSURES 0 +#define FFI_CLOSURES 1 +#define FFI_TRAMPOLINE_SIZE 16 #define FFI_NATIVE_RAW_API 0 #endif diff -rNu smalltalk-3.0.2/libffi/src/m68k/sysv.S smalltalk-3.0.3/libffi/src/m68k/sysv.S --- smalltalk-3.0.2/libffi/src/m68k/sysv.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/m68k/sysv.S 2008-04-10 11:10:57.000000000 +0200 @@ -8,40 +8,60 @@ #include #include +#ifdef HAVE_AS_CFI_PSEUDO_OP +#define CFI_STARTPROC() .cfi_startproc +#define CFI_OFFSET(reg,off) .cfi_offset reg,off +#define CFI_DEF_CFA(reg,off) .cfi_def_cfa reg,off +#define CFI_ENDPROC() .cfi_endproc +#else +#define CFI_STARTPROC() +#define CFI_OFFSET(reg,off) +#define CFI_DEF_CFA(reg,off) +#define CFI_ENDPROC() +#endif + .text .globl ffi_call_SYSV .type ffi_call_SYSV,@function + .align 4 ffi_call_SYSV: + CFI_STARTPROC() link %fp,#0 + CFI_OFFSET(14,-8) + CFI_DEF_CFA(14,8) move.l %d2,-(%sp) + CFI_OFFSET(2,-12) | Make room for all of the new args. - sub.l 16(%fp),%sp + sub.l 12(%fp),%sp | Call ffi_prep_args - move.l 12(%fp),-(%sp) + move.l 8(%fp),-(%sp) pea 4(%sp) - move.l 8(%fp),%a0 - jsr (%a0) +#if !defined __PIC__ + jsr ffi_prep_args +#else + bsr.l ffi_prep_args@PLTPC +#endif addq.l #8,%sp | Pass pointer to struct value, if any move.l %a0,%a1 | Call the function - move.l 32(%fp),%a0 + move.l 24(%fp),%a0 jsr (%a0) | Remove the space we pushed for the args - add.l 16(%fp),%sp + add.l 12(%fp),%sp | Load the pointer to storage for the return value - move.l 28(%fp),%a1 + move.l 20(%fp),%a1 | Load the return type code - move.l 20(%fp),%d2 + move.l 16(%fp),%d2 | If the return value pointer is NULL, assume no return value. tst.l %a1 @@ -79,19 +99,111 @@ retpointer: btst #5,%d2 - jbeq retstruct + jbeq retstruct1 move.l %a0,(%a1) jbra epilogue -retstruct: +retstruct1: btst #6,%d2 + jbeq retstruct2 + move.b %d0,(%a1) + jbra epilogue + +retstruct2: + btst #7,%d2 jbeq noretval - move.l 24(%fp),%d2 - bfins %d0,(%a1){#0,%d2} + move.w %d0,(%a1) noretval: epilogue: move.l (%sp)+,%d2 - unlk %a6 + unlk %fp rts + CFI_ENDPROC() .size ffi_call_SYSV,.-ffi_call_SYSV + + .globl ffi_closure_SYSV + .type ffi_closure_SYSV, @function + .align 4 + +ffi_closure_SYSV: + CFI_STARTPROC() + link %fp,#-12 + CFI_OFFSET(14,-8) + CFI_DEF_CFA(14,8) + move.l %sp,-12(%fp) + pea 8(%fp) + pea -12(%fp) + move.l %a0,-(%sp) +#if !defined __PIC__ + jsr ffi_closure_SYSV_inner +#else + bsr.l ffi_closure_SYSV_inner@PLTPC +#endif + + lsr.l #1,%d0 + jne 1f + jcc .Lcls_epilogue + move.l -12(%fp),%d0 +.Lcls_epilogue: + unlk %fp + rts +1: + lea -12(%fp),%a0 + lsr.l #2,%d0 + jne 1f + jcs .Lcls_ret_float + move.l (%a0)+,%d0 + move.l (%a0),%d1 + jra .Lcls_epilogue +.Lcls_ret_float: + fmove.s (%a0),%fp0 + jra .Lcls_epilogue +1: + lsr.l #2,%d0 + jne 1f + jcs .Lcls_ret_ldouble + fmove.d (%a0),%fp0 + jra .Lcls_epilogue +.Lcls_ret_ldouble: + fmove.x (%a0),%fp0 + jra .Lcls_epilogue +1: + lsr.l #2,%d0 + jne .Lcls_ret_struct2 + jcs .Lcls_ret_struct1 + move.l (%a0),%a0 + move.l %a0,%d0 + jra .Lcls_epilogue +.Lcls_ret_struct1: + move.b (%a0),%d0 + jra .Lcls_epilogue +.Lcls_ret_struct2: + move.w (%a0),%d0 + jra .Lcls_epilogue + CFI_ENDPROC() + + .size ffi_closure_SYSV,.-ffi_closure_SYSV + + .globl ffi_closure_struct_SYSV + .type ffi_closure_struct_SYSV, @function + .align 4 + +ffi_closure_struct_SYSV: + CFI_STARTPROC() + link %fp,#0 + CFI_OFFSET(14,-8) + CFI_DEF_CFA(14,8) + move.l %sp,-12(%fp) + pea 8(%fp) + move.l %a1,-(%sp) + move.l %a0,-(%sp) +#if !defined __PIC__ + jsr ffi_closure_SYSV_inner +#else + bsr.l ffi_closure_SYSV_inner@PLTPC +#endif + unlk %fp + rts + CFI_ENDPROC() + .size ffi_closure_struct_SYSV,.-ffi_closure_struct_SYSV diff -rNu smalltalk-3.0.2/libffi/src/mips/ffi.c smalltalk-3.0.3/libffi/src/mips/ffi.c --- smalltalk-3.0.2/libffi/src/mips/ffi.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/mips/ffi.c 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,6 @@ /* ----------------------------------------------------------------------- - ffi.c - Copyright (c) 1996 Red Hat, Inc. + ffi.c - Copyright (c) 1996, 2007 Red Hat, Inc. + Copyright (c) 2008 David Daney MIPS Foreign Function Interface @@ -14,28 +15,44 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ #include #include #include + +#ifdef __GNUC__ +# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) +# define USE__BUILTIN___CLEAR_CACHE 1 +# endif +#endif + +#ifndef USE__BUILTIN___CLEAR_CACHE #include +#endif -#if _MIPS_SIM == _ABIN32 +#ifdef FFI_DEBUG +# define FFI_MIPS_STOP_HERE() ffi_stop_here() +#else +# define FFI_MIPS_STOP_HERE() do {} while(0) +#endif + +#ifdef FFI_MIPS_N32 #define FIX_ARGP \ FFI_ASSERT(argp <= &stack[bytes]); \ if (argp == &stack[bytes]) \ { \ argp = stack; \ - ffi_stop_here(); \ + FFI_MIPS_STOP_HERE(); \ } #else #define FIX_ARGP @@ -55,7 +72,7 @@ char *argp; ffi_type **p_arg; -#if _MIPS_SIM == _ABIN32 +#ifdef FFI_MIPS_N32 /* If more than 8 double words are used, the remainder go on the stack. We reorder stuff on the stack here to support this easily. */ @@ -69,7 +86,7 @@ memset(stack, 0, bytes); -#if _MIPS_SIM == _ABIN32 +#ifdef FFI_MIPS_N32 if ( ecif->cif->rstruct_flag != 0 ) #else if ( ecif->cif->rtype->type == FFI_TYPE_STRUCT ) @@ -92,7 +109,7 @@ if (a < sizeof(ffi_arg)) a = sizeof(ffi_arg); - if ((a - 1) & (unsigned int) argp) + if ((a - 1) & (unsigned long) argp) { argp = (char *) ALIGN(argp, a); FIX_ARGP; @@ -101,9 +118,15 @@ z = (*p_arg)->size; if (z <= sizeof(ffi_arg)) { + int type = (*p_arg)->type; z = sizeof(ffi_arg); - switch ((*p_arg)->type) + /* The size of a pointer depends on the ABI */ + if (type == FFI_TYPE_POINTER) + type = + (ecif->cif->abi == FFI_N64) ? FFI_TYPE_SINT64 : FFI_TYPE_SINT32; + + switch (type) { case FFI_TYPE_SINT8: *(ffi_arg *)argp = *(SINT8 *)(* p_argv); @@ -126,7 +149,6 @@ break; case FFI_TYPE_UINT32: - case FFI_TYPE_POINTER: *(ffi_arg *)argp = *(UINT32 *)(* p_argv); break; @@ -135,8 +157,7 @@ *(float *) argp = *(float *)(* p_argv); break; - /* Handle small structures. */ - case FFI_TYPE_STRUCT: + /* Handle structures. */ default: memcpy(argp, *p_argv, (*p_arg)->size); break; @@ -144,12 +165,12 @@ } else { -#if _MIPS_SIM == _ABIO32 +#ifdef FFI_MIPS_O32 memcpy(argp, *p_argv, z); #else { - unsigned end = (unsigned) argp+z; - unsigned cap = (unsigned) stack+bytes; + unsigned long end = (unsigned long) argp + z; + unsigned long cap = (unsigned long) stack + bytes; /* Check if the data will fit within the register space. Handle it if it doesn't. */ @@ -158,12 +179,13 @@ memcpy(argp, *p_argv, z); else { - unsigned portion = end - cap; + unsigned long portion = cap - (unsigned long)argp; memcpy(argp, *p_argv, portion); argp = stack; - memcpy(argp, - (void*)((unsigned)(*p_argv)+portion), z - portion); + z -= portion; + memcpy(argp, (void*)((unsigned long)(*p_argv) + portion), + z); } } #endif @@ -174,7 +196,7 @@ } } -#if _MIPS_SIM == _ABIN32 +#ifdef FFI_MIPS_N32 /* The n32 spec says that if "a chunk consists solely of a double float field (but not a double, which is part of a union), it @@ -182,35 +204,41 @@ passed in an integer register". This code traverses structure definitions and generates the appropriate flags. */ -unsigned calc_n32_struct_flags(ffi_type *arg, unsigned *shift) +static unsigned +calc_n32_struct_flags(ffi_type *arg, unsigned *loc, unsigned *arg_reg) { unsigned flags = 0; unsigned index = 0; ffi_type *e; - while (e = arg->elements[index]) + while ((e = arg->elements[index])) { + /* Align this object. */ + *loc = ALIGN(*loc, e->alignment); if (e->type == FFI_TYPE_DOUBLE) { - flags += (FFI_TYPE_DOUBLE << *shift); - *shift += FFI_FLAG_BITS; + /* Already aligned to FFI_SIZEOF_ARG. */ + *arg_reg = *loc / FFI_SIZEOF_ARG; + if (*arg_reg > 7) + break; + flags += (FFI_TYPE_DOUBLE << (*arg_reg * FFI_FLAG_BITS)); + *loc += e->size; } - else if (e->type == FFI_TYPE_STRUCT) - flags += calc_n32_struct_flags(e, shift); else - *shift += FFI_FLAG_BITS; - + *loc += e->size; index++; } + /* Next Argument register at alignment of FFI_SIZEOF_ARG. */ + *arg_reg = ALIGN(*loc, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; return flags; } -unsigned calc_n32_return_struct_flags(ffi_type *arg) +static unsigned +calc_n32_return_struct_flags(ffi_type *arg) { unsigned flags = 0; - unsigned index = 0; unsigned small = FFI_TYPE_SMALLSTRUCT; ffi_type *e; @@ -229,16 +257,16 @@ e = arg->elements[0]; if (e->type == FFI_TYPE_DOUBLE) - flags = FFI_TYPE_DOUBLE << FFI_FLAG_BITS; + flags = FFI_TYPE_DOUBLE; else if (e->type == FFI_TYPE_FLOAT) - flags = FFI_TYPE_FLOAT << FFI_FLAG_BITS; + flags = FFI_TYPE_FLOAT; if (flags && (e = arg->elements[1])) { if (e->type == FFI_TYPE_DOUBLE) - flags += FFI_TYPE_DOUBLE; + flags += FFI_TYPE_DOUBLE << FFI_FLAG_BITS; else if (e->type == FFI_TYPE_FLOAT) - flags += FFI_TYPE_FLOAT; + flags += FFI_TYPE_FLOAT << FFI_FLAG_BITS; else return small; @@ -263,7 +291,7 @@ { cif->flags = 0; -#if _MIPS_SIM == _ABIO32 +#ifdef FFI_MIPS_O32 /* Set the flags necessary for O32 processing. FFI_O32_SOFT_FLOAT * does not have special handling for floating point args. */ @@ -351,10 +379,11 @@ } #endif -#if _MIPS_SIM == _ABIN32 +#ifdef FFI_MIPS_N32 /* Set the flags necessary for N32 processing */ { - unsigned shift = 0; + unsigned arg_reg = 0; + unsigned loc = 0; unsigned count = (cif->nargs < 8) ? cif->nargs : 8; unsigned index = 0; @@ -369,7 +398,7 @@ /* This means that the structure is being passed as a hidden argument */ - shift = FFI_FLAG_BITS; + arg_reg = 1; count = (cif->nargs < 7) ? cif->nargs : 7; cif->rstruct_flag = !0; @@ -380,23 +409,37 @@ else cif->rstruct_flag = 0; - while (count-- > 0) + while (count-- > 0 && arg_reg < 8) { switch ((cif->arg_types)[index]->type) { case FFI_TYPE_FLOAT: case FFI_TYPE_DOUBLE: - cif->flags += ((cif->arg_types)[index]->type << shift); - shift += FFI_FLAG_BITS; + cif->flags += + ((cif->arg_types)[index]->type << (arg_reg * FFI_FLAG_BITS)); + arg_reg++; break; + case FFI_TYPE_LONGDOUBLE: + /* Align it. */ + arg_reg = ALIGN(arg_reg, 2); + /* Treat it as two adjacent doubles. */ + cif->flags += + (FFI_TYPE_DOUBLE << (arg_reg * FFI_FLAG_BITS)); + arg_reg++; + cif->flags += + (FFI_TYPE_DOUBLE << (arg_reg * FFI_FLAG_BITS)); + arg_reg++; + break; case FFI_TYPE_STRUCT: + loc = arg_reg * FFI_SIZEOF_ARG; cif->flags += calc_n32_struct_flags((cif->arg_types)[index], - &shift); + &loc, &arg_reg); break; default: - shift += FFI_FLAG_BITS; + arg_reg++; + break; } index++; @@ -431,7 +474,13 @@ case FFI_TYPE_DOUBLE: cif->flags += cif->rtype->type << (FFI_FLAG_BITS * 8); break; - + case FFI_TYPE_LONGDOUBLE: + /* Long double is returned as if it were a struct containing + two doubles. */ + cif->flags += FFI_TYPE_STRUCT << (FFI_FLAG_BITS * 8); + cif->flags += (FFI_TYPE_DOUBLE + (FFI_TYPE_DOUBLE << FFI_FLAG_BITS)) + << (4 + (FFI_FLAG_BITS * 8)); + break; default: cif->flags += FFI_TYPE_INT << (FFI_FLAG_BITS * 8); break; @@ -470,7 +519,7 @@ switch (cif->abi) { -#if _MIPS_SIM == _ABIO32 +#ifdef FFI_MIPS_O32 case FFI_O32: case FFI_O32_SOFT_FLOAT: ffi_call_O32(ffi_prep_args, &ecif, cif->bytes, @@ -478,10 +527,25 @@ break; #endif -#if _MIPS_SIM == _ABIN32 +#ifdef FFI_MIPS_N32 case FFI_N32: - ffi_call_N32(ffi_prep_args, &ecif, cif->bytes, - cif->flags, ecif.rvalue, fn); + case FFI_N64: + { + int copy_rvalue = 0; + void *rvalue_copy = ecif.rvalue; + if (cif->rtype->type == FFI_TYPE_STRUCT && cif->rtype->size < 16) + { + /* For structures smaller than 16 bytes we clobber memory + in 8 byte increments. Make a copy so we don't clobber + the callers memory outside of the struct bounds. */ + rvalue_copy = alloca(16); + copy_rvalue = 1; + } + ffi_call_N32(ffi_prep_args, &ecif, cif->bytes, + cif->flags, rvalue_copy, fn); + if (copy_rvalue) + memcpy(ecif.rvalue, rvalue_copy, cif->rtype->size); + } break; #endif @@ -491,42 +555,83 @@ } } -#if FFI_CLOSURES /* N32 not implemented yet, FFI_CLOSURES not defined */ +#if FFI_CLOSURES #if defined(FFI_MIPS_O32) extern void ffi_closure_O32(void); +#else +extern void ffi_closure_N32(void); #endif /* FFI_MIPS_O32 */ ffi_status -ffi_prep_closure (ffi_closure *closure, - ffi_cif *cif, - void (*fun)(ffi_cif*,void*,void**,void*), - void *user_data) +ffi_prep_closure_loc (ffi_closure *closure, + ffi_cif *cif, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data, + void *codeloc) { unsigned int *tramp = (unsigned int *) &closure->tramp[0]; - unsigned int fn; - unsigned int ctx = (unsigned int) closure; + void * fn; + char *clear_location = (char *) codeloc; #if defined(FFI_MIPS_O32) FFI_ASSERT(cif->abi == FFI_O32 || cif->abi == FFI_O32_SOFT_FLOAT); - fn = (unsigned int) ffi_closure_O32; + fn = ffi_closure_O32; #else /* FFI_MIPS_N32 */ - FFI_ASSERT(cif->abi == FFI_N32); - FFI_ASSERT(!"not implemented"); + FFI_ASSERT(cif->abi == FFI_N32 || cif->abi == FFI_N64); + fn = ffi_closure_N32; #endif /* FFI_MIPS_O32 */ - tramp[0] = 0x3c190000 | (fn >> 16); /* lui $25,high(fn) */ - tramp[1] = 0x37390000 | (fn & 0xffff); /* ori $25,low(fn) */ - tramp[2] = 0x3c080000 | (ctx >> 16); /* lui $8,high(ctx) */ - tramp[3] = 0x03200008; /* jr $25 */ - tramp[4] = 0x35080000 | (ctx & 0xffff); /* ori $8,low(ctx) */ +#if defined(FFI_MIPS_O32) || (_MIPS_SIM ==_ABIN32) + /* lui $25,high(fn) */ + tramp[0] = 0x3c190000 | ((unsigned)fn >> 16); + /* ori $25,low(fn) */ + tramp[1] = 0x37390000 | ((unsigned)fn & 0xffff); + /* lui $12,high(codeloc) */ + tramp[2] = 0x3c0c0000 | ((unsigned)codeloc >> 16); + /* jr $25 */ + tramp[3] = 0x03200008; + /* ori $12,low(codeloc) */ + tramp[4] = 0x358c0000 | ((unsigned)codeloc & 0xffff); +#else + /* N64 has a somewhat larger trampoline. */ + /* lui $25,high(fn) */ + tramp[0] = 0x3c190000 | ((unsigned long)fn >> 48); + /* lui $12,high(codeloc) */ + tramp[1] = 0x3c0c0000 | ((unsigned long)codeloc >> 48); + /* ori $25,mid-high(fn) */ + tramp[2] = 0x37390000 | (((unsigned long)fn >> 32 ) & 0xffff); + /* ori $12,mid-high(codeloc) */ + tramp[3] = 0x358c0000 | (((unsigned long)codeloc >> 32) & 0xffff); + /* dsll $25,$25,16 */ + tramp[4] = 0x0019cc38; + /* dsll $12,$12,16 */ + tramp[5] = 0x000c6438; + /* ori $25,mid-low(fn) */ + tramp[6] = 0x37390000 | (((unsigned long)fn >> 16 ) & 0xffff); + /* ori $12,mid-low(codeloc) */ + tramp[7] = 0x358c0000 | (((unsigned long)codeloc >> 16) & 0xffff); + /* dsll $25,$25,16 */ + tramp[8] = 0x0019cc38; + /* dsll $12,$12,16 */ + tramp[9] = 0x000c6438; + /* ori $25,low(fn) */ + tramp[10] = 0x37390000 | ((unsigned long)fn & 0xffff); + /* jr $25 */ + tramp[11] = 0x03200008; + /* ori $12,low(codeloc) */ + tramp[12] = 0x358c0000 | ((unsigned long)codeloc & 0xffff); + +#endif closure->cif = cif; closure->fun = fun; closure->user_data = user_data; - /* XXX this is available on Linux, but anything else? */ - cacheflush (tramp, FFI_TRAMPOLINE_SIZE, ICACHE); - +#ifdef USE__BUILTIN___CLEAR_CACHE + __builtin___clear_cache(clear_location, clear_location + FFI_TRAMPOLINE_SIZE); +#else + cacheflush (clear_location, FFI_TRAMPOLINE_SIZE, ICACHE); +#endif return FFI_OK; } @@ -567,7 +672,7 @@ if ((cif->flags >> (FFI_FLAG_BITS * 2)) == FFI_TYPE_STRUCT) { - rvalue = (void *) ar[0]; + rvalue = (void *)(UINT32)ar[0]; argn = 1; } @@ -645,4 +750,177 @@ } } +#if defined(FFI_MIPS_N32) + +static void +copy_struct_N32(char *target, unsigned offset, ffi_abi abi, ffi_type *type, + int argn, unsigned arg_offset, ffi_arg *ar, + ffi_arg *fpr) +{ + ffi_type **elt_typep = type->elements; + while(*elt_typep) + { + ffi_type *elt_type = *elt_typep; + unsigned o; + char *tp; + char *argp; + char *fpp; + + o = ALIGN(offset, elt_type->alignment); + arg_offset += o - offset; + offset = o; + argn += arg_offset / sizeof(ffi_arg); + arg_offset = arg_offset % sizeof(ffi_arg); + + argp = (char *)(ar + argn); + fpp = (char *)(argn >= 8 ? ar + argn : fpr + argn); + + tp = target + offset; + + if (elt_type->type == FFI_TYPE_DOUBLE) + *(double *)tp = *(double *)fpp; + else + memcpy(tp, argp + arg_offset, elt_type->size); + + offset += elt_type->size; + arg_offset += elt_type->size; + elt_typep++; + argn += arg_offset / sizeof(ffi_arg); + arg_offset = arg_offset % sizeof(ffi_arg); + } +} + +/* + * Decodes the arguments to a function, which will be stored on the + * stack. AR is the pointer to the beginning of the integer + * arguments. FPR is a pointer to the area where floating point + * registers have been saved. + * + * RVALUE is the location where the function return value will be + * stored. CLOSURE is the prepared closure to invoke. + * + * This function should only be called from assembly, which is in + * turn called from a trampoline. + * + * Returns the function return flags. + * + */ +int +ffi_closure_mips_inner_N32 (ffi_closure *closure, + void *rvalue, ffi_arg *ar, + ffi_arg *fpr) +{ + ffi_cif *cif; + void **avaluep; + ffi_arg *avalue; + ffi_type **arg_types; + int i, avn, argn; + + cif = closure->cif; + avalue = alloca (cif->nargs * sizeof (ffi_arg)); + avaluep = alloca (cif->nargs * sizeof (ffi_arg)); + + argn = 0; + + if (cif->rstruct_flag) + { +#if _MIPS_SIM==_ABIN32 + rvalue = (void *)(UINT32)ar[0]; +#else /* N64 */ + rvalue = (void *)ar[0]; +#endif + argn = 1; + } + + i = 0; + avn = cif->nargs; + arg_types = cif->arg_types; + + while (i < avn) + { + if (arg_types[i]->type == FFI_TYPE_FLOAT + || arg_types[i]->type == FFI_TYPE_DOUBLE) + { + ffi_arg *argp = argn >= 8 ? ar + argn : fpr + argn; +#ifdef __MIPSEB__ + if (arg_types[i]->type == FFI_TYPE_FLOAT && argn < 8) + avaluep[i] = ((char *) argp) + sizeof (float); + else +#endif + avaluep[i] = (char *) argp; + } + else + { + unsigned type = arg_types[i]->type; + + if (arg_types[i]->alignment > sizeof(ffi_arg)) + argn = ALIGN(argn, arg_types[i]->alignment / sizeof(ffi_arg)); + + ffi_arg *argp = ar + argn; + + /* The size of a pointer depends on the ABI */ + if (type == FFI_TYPE_POINTER) + type = (cif->abi == FFI_N64) ? FFI_TYPE_SINT64 : FFI_TYPE_SINT32; + + switch (type) + { + case FFI_TYPE_SINT8: + avaluep[i] = &avalue[i]; + *(SINT8 *) &avalue[i] = (SINT8) *argp; + break; + + case FFI_TYPE_UINT8: + avaluep[i] = &avalue[i]; + *(UINT8 *) &avalue[i] = (UINT8) *argp; + break; + + case FFI_TYPE_SINT16: + avaluep[i] = &avalue[i]; + *(SINT16 *) &avalue[i] = (SINT16) *argp; + break; + + case FFI_TYPE_UINT16: + avaluep[i] = &avalue[i]; + *(UINT16 *) &avalue[i] = (UINT16) *argp; + break; + + case FFI_TYPE_SINT32: + avaluep[i] = &avalue[i]; + *(SINT32 *) &avalue[i] = (SINT32) *argp; + break; + + case FFI_TYPE_UINT32: + avaluep[i] = &avalue[i]; + *(UINT32 *) &avalue[i] = (UINT32) *argp; + break; + + case FFI_TYPE_STRUCT: + if (argn < 8) + { + /* Allocate space for the struct as at least part of + it was passed in registers. */ + avaluep[i] = alloca(arg_types[i]->size); + copy_struct_N32(avaluep[i], 0, cif->abi, arg_types[i], + argn, 0, ar, fpr); + + break; + } + /* Else fall through. */ + default: + avaluep[i] = (char *) argp; + break; + } + } + argn += ALIGN(arg_types[i]->size, sizeof(ffi_arg)) / sizeof(ffi_arg); + i++; + } + + /* Invoke the closure. */ + (closure->fun) (cif, rvalue, avaluep, closure->user_data); + + return cif->flags >> (FFI_FLAG_BITS * 8); +} + +#endif /* FFI_MIPS_N32 */ + #endif /* FFI_CLOSURES */ diff -rNu smalltalk-3.0.2/libffi/src/mips/ffitarget.h smalltalk-3.0.3/libffi/src/mips/ffitarget.h --- smalltalk-3.0.2/libffi/src/mips/ffitarget.h 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/mips/ffitarget.h 2008-04-10 11:10:57.000000000 +0200 @@ -13,19 +13,33 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ #ifndef LIBFFI_TARGET_H #define LIBFFI_TARGET_H +#ifdef linux +#include +# ifndef _ABIN32 +# define _ABIN32 _MIPS_SIM_NABI32 +# endif +# ifndef _ABI64 +# define _ABI64 _MIPS_SIM_ABI64 +# endif +# ifndef _ABIO32 +# define _ABIO32 _MIPS_SIM_ABI32 +# endif +#endif + #if !defined(_MIPS_SIM) -- something is very wrong -- #else @@ -42,10 +56,13 @@ #ifdef FFI_MIPS_O32 /* O32 stack frames have 32bit integer args */ -#define FFI_SIZEOF_ARG 4 +# define FFI_SIZEOF_ARG 4 #else /* N32 and N64 frames have 64bit integer args */ -#define FFI_SIZEOF_ARG 8 +# define FFI_SIZEOF_ARG 8 +# if _MIPS_SIM == _ABIN32 +# define FFI_SIZEOF_JAVA_RAW 4 +# endif #endif #define FFI_FLAG_BITS 2 @@ -104,19 +121,28 @@ #define ra $31 #ifdef FFI_MIPS_O32 -#define REG_L lw -#define REG_S sw -#define SUBU subu -#define ADDU addu -#define SRL srl -#define LI li +# define REG_L lw +# define REG_S sw +# define SUBU subu +# define ADDU addu +# define SRL srl +# define LI li #else /* !FFI_MIPS_O32 */ -#define REG_L ld -#define REG_S sd -#define SUBU dsubu -#define ADDU daddu -#define SRL dsrl -#define LI dli +# define REG_L ld +# define REG_S sd +# define SUBU dsubu +# define ADDU daddu +# define SRL dsrl +# define LI dli +# if (_MIPS_SIM==_ABI64) +# define LA dla +# define EH_FRAME_ALIGN 3 +# define FDE_ADDR_BYTES .8byte +# else +# define LA la +# define EH_FRAME_ALIGN 2 +# define FDE_ADDR_BYTES .4byte +# endif /* _MIPS_SIM==_ABI64 */ #endif /* !FFI_MIPS_O32 */ #else /* !LIBFFI_ASM */ #ifdef FFI_MIPS_O32 @@ -143,7 +169,11 @@ FFI_DEFAULT_ABI = FFI_O32, #endif #else +# if _MIPS_SIM==_ABI64 + FFI_DEFAULT_ABI = FFI_N64, +# else FFI_DEFAULT_ABI = FFI_N32, +# endif #endif FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 @@ -158,8 +188,13 @@ #define FFI_CLOSURES 1 #define FFI_TRAMPOLINE_SIZE 20 #else -/* N32/N64 not implemented yet. */ -#define FFI_CLOSURES 0 +/* N32/N64. */ +# define FFI_CLOSURES 1 +#if _MIPS_SIM==_ABI64 +#define FFI_TRAMPOLINE_SIZE 52 +#else +#define FFI_TRAMPOLINE_SIZE 20 +#endif #endif /* FFI_MIPS_O32 */ #define FFI_NATIVE_RAW_API 0 diff -rNu smalltalk-3.0.2/libffi/src/mips/n32.S smalltalk-3.0.3/libffi/src/mips/n32.S --- smalltalk-3.0.2/libffi/src/mips/n32.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/mips/n32.S 2008-04-10 11:10:57.000000000 +0200 @@ -17,7 +17,8 @@ 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 CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + 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. @@ -45,13 +46,19 @@ .globl ffi_call_N32 .ent ffi_call_N32 ffi_call_N32: +.LFB3: + .frame $fp, SIZEOF_FRAME, ra + .mask 0xc0000000,-FFI_SIZEOF_ARG + .fmask 0x00000000,0 # Prologue SUBU $sp, SIZEOF_FRAME # Frame size +.LCFI0: REG_S $fp, SIZEOF_FRAME - 2*FFI_SIZEOF_ARG($sp) # Save frame pointer REG_S ra, SIZEOF_FRAME - 1*FFI_SIZEOF_ARG($sp) # Save return address +.LCFI1: move $fp, $sp - +.LCFI3: move t9, callback # callback function pointer REG_S bytes, 2*FFI_SIZEOF_ARG($fp) # bytes REG_S flags, 3*FFI_SIZEOF_ARG($fp) # flags @@ -72,14 +79,12 @@ SUBU $sp, $sp, v0 # move the stack pointer to reflect the # arg space - ADDU a0, $sp, 0 # 4 * FFI_SIZEOF_ARG + move a0, $sp # 4 * FFI_SIZEOF_ARG ADDU a3, $fp, 3 * FFI_SIZEOF_ARG # Call ffi_prep_args jal t9 - # ADDU $sp, $sp, 4 * FFI_SIZEOF_ARG # adjust $sp to new args - # Copy the stack pointer to t9 move t9, $sp @@ -90,18 +95,16 @@ REG_L t6, 2*FFI_SIZEOF_ARG($fp) # Is it bigger than 8 * FFI_SIZEOF_ARG? - dadd t7, $0, 8 * FFI_SIZEOF_ARG - dsub t8, t6, t7 + daddiu t8, t6, -(8 * FFI_SIZEOF_ARG) bltz t8, loadregs - add t9, t9, t8 + ADDU t9, t9, t8 loadregs: - REG_L t4, 3*FFI_SIZEOF_ARG($fp) # load the flags word - add t6, t4, 0 # and copy it into t6 + REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. - and t4, ((1< @@ -613,10 +614,11 @@ extern void ffi_closure_pa32(void); ffi_status -ffi_prep_closure (ffi_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*,void*,void**,void*), - void *user_data) +ffi_prep_closure_loc (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data, + void *codeloc) { UINT32 *tramp = (UINT32 *)(closure->tramp); #ifdef PA_HPUX diff -rNu smalltalk-3.0.2/libffi/src/pa/ffitarget.h smalltalk-3.0.3/libffi/src/pa/ffitarget.h --- smalltalk-3.0.2/libffi/src/pa/ffitarget.h 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/pa/ffitarget.h 2008-04-10 11:10:57.000000000 +0200 @@ -13,13 +13,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ diff -rNu smalltalk-3.0.2/libffi/src/pa/linux.S smalltalk-3.0.3/libffi/src/pa/linux.S --- smalltalk-3.0.2/libffi/src/pa/linux.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/pa/linux.S 2008-04-10 11:10:57.000000000 +0200 @@ -17,7 +17,8 @@ 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 CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + 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. diff -rNu smalltalk-3.0.2/libffi/src/powerpc/darwin_closure.S smalltalk-3.0.3/libffi/src/powerpc/darwin_closure.S --- smalltalk-3.0.2/libffi/src/powerpc/darwin_closure.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/powerpc/darwin_closure.S 2008-04-10 11:10:41.000000000 +0200 @@ -246,7 +246,7 @@ /* END(ffi_closure_ASM) */ .data -.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms +.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support EH_frame1: .set L$set$0,LECIE1-LSCIE1 .long L$set$0 ; Length of Common Information Entry diff -rNu smalltalk-3.0.2/libffi/src/powerpc/ffi.c smalltalk-3.0.3/libffi/src/powerpc/ffi.c --- smalltalk-3.0.2/libffi/src/powerpc/ffi.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/powerpc/ffi.c 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,6 @@ /* ----------------------------------------------------------------------- ffi.c - Copyright (c) 1998 Geoffrey Keating + Copyright (C) 2007 Free Software Foundation, Inc PowerPC Foreign Function Interface @@ -39,7 +40,8 @@ FLAG_RETURNS_NOTHING = 1 << (31-30), /* These go in cr7 */ FLAG_RETURNS_FP = 1 << (31-29), FLAG_RETURNS_64BITS = 1 << (31-28), - FLAG_RETURNS_128BITS = 1 << (31-27), + + FLAG_RETURNS_128BITS = 1 << (31-27), /* cr6 */ FLAG_ARG_NEEDS_COPY = 1 << (31- 7), FLAG_FP_ARGUMENTS = 1 << (31- 6), /* cr1.eq; specified by ABI */ @@ -48,10 +50,13 @@ }; /* About the SYSV ABI. */ -enum { - NUM_GPR_ARG_REGISTERS = 8, - NUM_FPR_ARG_REGISTERS = 8 -}; +unsigned int NUM_GPR_ARG_REGISTERS = 8; +#ifndef __NO_FPRS__ +unsigned int NUM_FPR_ARG_REGISTERS = 8; +#else +unsigned int NUM_FPR_ARG_REGISTERS = 0; +#endif + enum { ASM_NEEDS_REGISTERS = 4 }; /* ffi_prep_args_SYSV is called by the assembly routine once stack space @@ -114,7 +119,7 @@ /* 'next_arg' grows up as we put parameters in it. */ valp next_arg; - int i; + int i, ii MAYBE_UNUSED; ffi_type **ptr; double double_tmp; union { @@ -132,6 +137,9 @@ size_t struct_copy_size; unsigned gprvalue; + if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) + NUM_FPR_ARG_REGISTERS = 0; + stacktop.c = (char *) stack + bytes; gpr_base.u = stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS; intarg_count = 0; @@ -163,6 +171,9 @@ switch ((*ptr)->type) { case FFI_TYPE_FLOAT: + /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32. */ + if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) + goto soft_float_prep; double_tmp = **p_argv.f; if (fparg_count >= NUM_FPR_ARG_REGISTERS) { @@ -176,6 +187,9 @@ break; case FFI_TYPE_DOUBLE: + /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64. */ + if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) + goto soft_double_prep; double_tmp = **p_argv.d; if (fparg_count >= NUM_FPR_ARG_REGISTERS) @@ -197,38 +211,75 @@ #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE case FFI_TYPE_LONGDOUBLE: - if (ecif->cif->abi != FFI_LINUX) + if ((ecif->cif->abi != FFI_LINUX) + && (ecif->cif->abi != FFI_LINUX_SOFT_FLOAT)) goto do_struct; - double_tmp = (*p_argv.d)[0]; - - if (fparg_count >= NUM_FPR_ARG_REGISTERS - 1) + /* The soft float ABI for long doubles works like this, + a long double is passed in four consecutive gprs if available. + A maximum of 2 long doubles can be passed in gprs. + If we do not have 4 gprs left, the long double is passed on the + stack, 4-byte aligned. */ + if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) { - if (intarg_count >= NUM_GPR_ARG_REGISTERS - && intarg_count % 2 != 0) + unsigned int int_tmp = (*p_argv.ui)[0]; + if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3) { - intarg_count++; + if (intarg_count < NUM_GPR_ARG_REGISTERS) + intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count; + *next_arg.u = int_tmp; next_arg.u++; + for (ii = 1; ii < 4; ii++) + { + int_tmp = (*p_argv.ui)[ii]; + *next_arg.u = int_tmp; + next_arg.u++; + } } - *next_arg.d = double_tmp; - next_arg.u += 2; - double_tmp = (*p_argv.d)[1]; - *next_arg.d = double_tmp; - next_arg.u += 2; + else + { + *gpr_base.u++ = int_tmp; + for (ii = 1; ii < 4; ii++) + { + int_tmp = (*p_argv.ui)[ii]; + *gpr_base.u++ = int_tmp; + } + } + intarg_count +=4; } else { - *fpr_base.d++ = double_tmp; - double_tmp = (*p_argv.d)[1]; - *fpr_base.d++ = double_tmp; - } + double_tmp = (*p_argv.d)[0]; - fparg_count += 2; - FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); + if (fparg_count >= NUM_FPR_ARG_REGISTERS - 1) + { + if (intarg_count >= NUM_GPR_ARG_REGISTERS + && intarg_count % 2 != 0) + { + intarg_count++; + next_arg.u++; + } + *next_arg.d = double_tmp; + next_arg.u += 2; + double_tmp = (*p_argv.d)[1]; + *next_arg.d = double_tmp; + next_arg.u += 2; + } + else + { + *fpr_base.d++ = double_tmp; + double_tmp = (*p_argv.d)[1]; + *fpr_base.d++ = double_tmp; + } + + fparg_count += 2; + FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); + } break; #endif case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: + soft_double_prep: if (intarg_count == NUM_GPR_ARG_REGISTERS-1) intarg_count++; if (intarg_count >= NUM_GPR_ARG_REGISTERS) @@ -291,6 +342,8 @@ case FFI_TYPE_UINT32: case FFI_TYPE_SINT32: case FFI_TYPE_POINTER: + soft_float_prep: + gprvalue = **p_argv.ui; putgpr: @@ -544,6 +597,9 @@ unsigned type = cif->rtype->type; unsigned size = cif->rtype->size; + if (cif->abi == FFI_LINUX_SOFT_FLOAT) + NUM_FPR_ARG_REGISTERS = 0; + if (cif->abi != FFI_LINUX64) { /* All the machine-independent calculation of cif->bytes will be wrong. @@ -580,14 +636,16 @@ For LINUX64: - integer values in gpr3; - Structures/Unions by reference; - - Single/double FP values in fpr1, long double in fpr1,fpr2. */ + - Single/double FP values in fpr1, long double in fpr1,fpr2. + - soft-float float/doubles are treated as UINT32/UINT64 respectivley. + - soft-float long doubles are returned in gpr3-gpr6. */ switch (type) { #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE case FFI_TYPE_LONGDOUBLE: - if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) + if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64 + && cif->abi != FFI_LINUX_SOFT_FLOAT) goto byref; - flags |= FLAG_RETURNS_128BITS; /* Fall through. */ #endif @@ -595,7 +653,9 @@ flags |= FLAG_RETURNS_64BITS; /* Fall through. */ case FFI_TYPE_FLOAT: - flags |= FLAG_RETURNS_FP; + /* With FFI_LINUX_SOFT_FLOAT no fp registers are used. */ + if (cif->abi != FFI_LINUX_SOFT_FLOAT) + flags |= FLAG_RETURNS_FP; break; case FFI_TYPE_UINT64: @@ -658,18 +718,36 @@ switch ((*ptr)->type) { case FFI_TYPE_FLOAT: + /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32. */ + if (cif->abi == FFI_LINUX_SOFT_FLOAT) + goto soft_float_cif; fparg_count++; /* floating singles are not 8-aligned on stack */ break; #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE case FFI_TYPE_LONGDOUBLE: - if (cif->abi != FFI_LINUX) + if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) goto do_struct; - fparg_count++; + if (cif->abi == FFI_LINUX_SOFT_FLOAT) + { + if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3 + || intarg_count < NUM_GPR_ARG_REGISTERS) + /* A long double in FFI_LINUX_SOFT_FLOAT can use only + a set of four consecutive gprs. If we have not enough, + we have to adjust the intarg_count value. */ + intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count; + intarg_count += 4; + break; + } + else + fparg_count++; /* Fall thru */ #endif case FFI_TYPE_DOUBLE: + /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64. */ + if (cif->abi == FFI_LINUX_SOFT_FLOAT) + goto soft_double_cif; fparg_count++; /* If this FP arg is going on the stack, it must be 8-byte-aligned. */ @@ -681,6 +759,7 @@ case FFI_TYPE_UINT64: case FFI_TYPE_SINT64: + soft_double_cif: /* 'long long' arguments are passed as two words, but either both words must fit in registers or both go on the stack. If they go on the stack, they must @@ -708,6 +787,7 @@ /* Fall through (allocate space for the pointer). */ default: + soft_float_cif: /* Everything else is passed as a 4-byte word in a GPR, either the object itself or a pointer to it. */ intarg_count++; @@ -721,8 +801,13 @@ { #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE case FFI_TYPE_LONGDOUBLE: - fparg_count += 2; - intarg_count += 2; + if (cif->abi == FFI_LINUX_SOFT_FLOAT) + intarg_count += 4; + else + { + fparg_count += 2; + intarg_count += 2; + } break; #endif case FFI_TYPE_FLOAT: @@ -816,6 +901,7 @@ case FFI_SYSV: case FFI_GCC_SYSV: case FFI_LINUX: + case FFI_LINUX_SOFT_FLOAT: ffi_call_SYSV (&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn); break; #else @@ -834,27 +920,24 @@ #define MIN_CACHE_LINE_SIZE 8 static void -flush_icache (char *addr1, int size) +flush_icache (char *wraddr, char *xaddr, int size) { int i; - char * addr; for (i = 0; i < size; i += MIN_CACHE_LINE_SIZE) - { - addr = addr1 + i; - __asm__ volatile ("icbi 0,%0;" "dcbf 0,%0;" - : : "r" (addr) : "memory"); - } - addr = addr1 + size - 1; - __asm__ volatile ("icbi 0,%0;" "dcbf 0,%0;" "sync;" "isync;" - : : "r"(addr) : "memory"); + __asm__ volatile ("icbi 0,%0;" "dcbf 0,%1;" + : : "r" (xaddr + i), "r" (wraddr + i) : "memory"); + __asm__ volatile ("icbi 0,%0;" "dcbf 0,%1;" "sync;" "isync;" + : : "r"(xaddr + size - 1), "r"(wraddr + size - 1) + : "memory"); } #endif ffi_status -ffi_prep_closure (ffi_closure *closure, - ffi_cif *cif, - void (*fun) (ffi_cif *, void *, void **, void *), - void *user_data) +ffi_prep_closure_loc (ffi_closure *closure, + ffi_cif *cif, + void (*fun) (ffi_cif *, void *, void **, void *), + void *user_data, + void *codeloc) { #ifdef POWERPC64 void **tramp = (void **) &closure->tramp[0]; @@ -862,7 +945,7 @@ FFI_ASSERT (cif->abi == FFI_LINUX64); /* Copy function address and TOC from ffi_closure_LINUX64. */ memcpy (tramp, (char *) ffi_closure_LINUX64, 16); - tramp[2] = (void *) closure; + tramp[2] = codeloc; #else unsigned int *tramp; @@ -878,10 +961,10 @@ tramp[8] = 0x7c0903a6; /* mtctr r0 */ tramp[9] = 0x4e800420; /* bctr */ *(void **) &tramp[2] = (void *) ffi_closure_SYSV; /* function */ - *(void **) &tramp[3] = (void *) closure; /* context */ + *(void **) &tramp[3] = codeloc; /* context */ /* Flush the icache. */ - flush_icache (&closure->tramp[0],FFI_TRAMPOLINE_SIZE); + flush_icache ((char *)tramp, (char *)codeloc, FFI_TRAMPOLINE_SIZE); #endif closure->cif = cif; @@ -943,7 +1026,7 @@ && !((cif->abi == FFI_SYSV) && (size <= 8))) #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE || (cif->rtype->type == FFI_TYPE_LONGDOUBLE - && cif->abi != FFI_LINUX) + && cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) #endif ) { @@ -996,6 +1079,7 @@ case FFI_TYPE_SINT32: case FFI_TYPE_UINT32: case FFI_TYPE_POINTER: + soft_float_closure: /* there are 8 gpr registers used to pass values */ if (ng < 8) { @@ -1031,6 +1115,7 @@ case FFI_TYPE_SINT64: case FFI_TYPE_UINT64: + soft_double_closure: /* passing long long ints are complex, they must * be passed in suitable register pairs such as * (r3,r4) or (r5,r6) or (r6,r7), or (r7,r8) or (r9,r10) @@ -1062,6 +1147,9 @@ break; case FFI_TYPE_FLOAT: + /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32. */ + if (cif->abi == FFI_LINUX_SOFT_FLOAT) + goto soft_float_closure; /* unfortunately float values are stored as doubles * in the ffi_closure_SYSV code (since we don't check * the type in that routine). @@ -1090,6 +1178,9 @@ break; case FFI_TYPE_DOUBLE: + /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64. */ + if (cif->abi == FFI_LINUX_SOFT_FLOAT) + goto soft_double_closure; /* On the outgoing stack all values are aligned to 8 */ /* there are 8 64bit floating point registers */ @@ -1110,9 +1201,24 @@ #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE case FFI_TYPE_LONGDOUBLE: - if (cif->abi != FFI_LINUX) + if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) goto do_struct; - + if (cif->abi == FFI_LINUX_SOFT_FLOAT) + { /* Test if for the whole long double, 4 gprs are available. + otherwise the stuff ends up on the stack. */ + if (ng < 5) + { + avalue[i] = pgr; + pgr += 4; + ng += 4; + } + else + { + avalue[i] = pst; + pst += 4; + } + break; + } if (nf < 7) { avalue[i] = pfr; @@ -1148,10 +1254,34 @@ return FFI_SYSV_TYPE_SMALL_STRUCT + size; #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE else if (cif->rtype->type == FFI_TYPE_LONGDOUBLE - && cif->abi != FFI_LINUX) + && cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) return FFI_TYPE_STRUCT; #endif - return cif->rtype->type; + /* With FFI_LINUX_SOFT_FLOAT floats and doubles are handled like UINT32 + respectivley UINT64. */ + if (cif->abi == FFI_LINUX_SOFT_FLOAT) + { + switch (cif->rtype->type) + { + case FFI_TYPE_FLOAT: + return FFI_TYPE_UINT32; + break; + case FFI_TYPE_DOUBLE: + return FFI_TYPE_UINT64; + break; +#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: + return FFI_TYPE_UINT128; + break; +#endif + default: + return cif->rtype->type; + } + } + else + { + return cif->rtype->type; + } } int FFI_HIDDEN ffi_closure_helper_LINUX64 (ffi_closure *, void *, diff -rNu smalltalk-3.0.2/libffi/src/powerpc/ffi_darwin.c smalltalk-3.0.3/libffi/src/powerpc/ffi_darwin.c --- smalltalk-3.0.2/libffi/src/powerpc/ffi_darwin.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/powerpc/ffi_darwin.c 2008-04-10 11:10:57.000000000 +0200 @@ -1,11 +1,12 @@ /* ----------------------------------------------------------------------- - ffi.c - Copyright (c) 1998 Geoffrey Keating + ffi_darwin.c - PowerPC Foreign Function Interface - - Darwin ABI support (c) 2001 John Hornkvist - AIX ABI support (c) 2002 Free Software Foundation, Inc. + Copyright (C) 1998 Geoffrey Keating + Copyright (C) 2001 John Hornkvist + Copyright (C) 2002, 2006, 2007 Free Software Foundation, Inc. + FFI support for Darwin and AIX. + 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 @@ -225,6 +226,48 @@ //FFI_ASSERT(flags & FLAG_4_GPR_ARGUMENTS || intarg_count <= 4); } +/* Adjust the size of S to be correct for Darwin. + On Darwin, the first field of a structure has natural alignment. */ + +static void +darwin_adjust_aggregate_sizes (ffi_type *s) +{ + int i; + + if (s->type != FFI_TYPE_STRUCT) + return; + + s->size = 0; + for (i = 0; s->elements[i] != NULL; i++) + { + ffi_type *p; + int align; + + p = s->elements[i]; + darwin_adjust_aggregate_sizes (p); + if (i == 0 + && (p->type == FFI_TYPE_UINT64 + || p->type == FFI_TYPE_SINT64 + || p->type == FFI_TYPE_DOUBLE + || p->alignment == 8)) + align = 8; + else if (p->alignment == 16 || p->alignment < 4) + align = p->alignment; + else + align = 4; + s->size = ALIGN(s->size, align) + p->size; + } + + s->size = ALIGN(s->size, s->alignment); + + if (s->elements[0]->type == FFI_TYPE_UINT64 + || s->elements[0]->type == FFI_TYPE_SINT64 + || s->elements[0]->type == FFI_TYPE_DOUBLE + || s->elements[0]->alignment == 8) + s->alignment = s->alignment > 8 ? s->alignment : 8; + /* Do not add additional tail padding. */ +} + /* Perform machine dependent cif processing. */ ffi_status ffi_prep_cif_machdep(ffi_cif *cif) { @@ -237,8 +280,16 @@ unsigned size_al = 0; /* All the machine-independent calculation of cif->bytes will be wrong. + All the calculation of structure sizes will also be wrong. Redo the calculation for DARWIN. */ + if (cif->abi == FFI_DARWIN) + { + darwin_adjust_aggregate_sizes (cif->rtype); + for (i = 0; i < cif->nargs; i++) + darwin_adjust_aggregate_sizes (cif->arg_types[i]); + } + /* Space for the frame pointer, callee's LR, CR, etc, and for the asm's temp regs. */ @@ -477,10 +528,11 @@ */ ffi_status -ffi_prep_closure (ffi_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*, void*, void**, void*), - void *user_data) +ffi_prep_closure_loc (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*, void*, void**, void*), + void *user_data, + void *codeloc) { unsigned int *tramp; struct ffi_aix_trampoline_struct *tramp_aix; @@ -502,14 +554,14 @@ tramp[8] = 0x816b0004; /* lwz r11,4(r11) static chain */ tramp[9] = 0x4e800420; /* bctr */ tramp[2] = (unsigned long) ffi_closure_ASM; /* function */ - tramp[3] = (unsigned long) closure; /* context */ + tramp[3] = (unsigned long) codeloc; /* context */ closure->cif = cif; closure->fun = fun; closure->user_data = user_data; /* Flush the icache. Only necessary on Darwin. */ - flush_range(&closure->tramp[0],FFI_TRAMPOLINE_SIZE); + flush_range(codeloc, FFI_TRAMPOLINE_SIZE); break; @@ -522,7 +574,7 @@ tramp_aix->code_pointer = fd->code_pointer; tramp_aix->toc = fd->toc; - tramp_aix->static_chain = closure; + tramp_aix->static_chain = codeloc; closure->cif = cif; closure->fun = fun; closure->user_data = user_data; diff -rNu smalltalk-3.0.2/libffi/src/powerpc/ffitarget.h smalltalk-3.0.3/libffi/src/powerpc/ffitarget.h --- smalltalk-3.0.2/libffi/src/powerpc/ffitarget.h 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/powerpc/ffitarget.h 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,6 @@ /* -----------------------------------------------------------------*-C-*- ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + Copyright (C) 2007 Free Software Foundation, Inc Target configuration macros for PowerPC. Permission is hereby granted, free of charge, to any person obtaining @@ -13,13 +14,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ @@ -44,13 +46,18 @@ FFI_GCC_SYSV, FFI_LINUX64, FFI_LINUX, + FFI_LINUX_SOFT_FLOAT, # ifdef POWERPC64 FFI_DEFAULT_ABI = FFI_LINUX64, # else -# if __LDBL_MANT_DIG__ == 106 +# if (!defined(__NO_FPRS__) && (__LDBL_MANT_DIG__ == 106)) FFI_DEFAULT_ABI = FFI_LINUX, # else +# ifdef __NO_FPRS__ + FFI_DEFAULT_ABI = FFI_LINUX_SOFT_FLOAT, +# else FFI_DEFAULT_ABI = FFI_GCC_SYSV, +# endif # endif # endif #endif @@ -83,8 +90,14 @@ #define FFI_CLOSURES 1 #define FFI_NATIVE_RAW_API 0 +/* For additional types like the below, take care about the order in + ppc_closures.S. They must follow after the FFI_TYPE_LAST. */ + +/* Needed for soft-float long-double-128 support. */ +#define FFI_TYPE_UINT128 (FFI_TYPE_LAST + 1) + /* Needed for FFI_SYSV small structure returns. */ -#define FFI_SYSV_TYPE_SMALL_STRUCT (FFI_TYPE_LAST) +#define FFI_SYSV_TYPE_SMALL_STRUCT (FFI_TYPE_LAST + 2) #if defined(POWERPC64) || defined(POWERPC_AIX) #define FFI_TRAMPOLINE_SIZE 24 diff -rNu smalltalk-3.0.2/libffi/src/powerpc/linux64.S smalltalk-3.0.3/libffi/src/powerpc/linux64.S --- smalltalk-3.0.2/libffi/src/powerpc/linux64.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/powerpc/linux64.S 2008-04-10 11:10:57.000000000 +0200 @@ -47,8 +47,8 @@ std %r0, 16(%r1) mr %r28, %r1 /* our AP. */ - stdux %r1, %r1, %r4 .LCFI0: + stdux %r1, %r1, %r4 mr %r31, %r5 /* flags, */ mr %r30, %r6 /* rvalue, */ mr %r29, %r7 /* function address. */ @@ -100,6 +100,10 @@ /* Make the call. */ bctrl + /* This must follow the call immediately, the unwinder + uses this to find out if r2 has been saved or not. */ + ld %r2, 40(%r1) + /* Now, deal with the return value. */ mtcrf 0x01, %r31 bt- 30, .Ldone_return_value @@ -109,7 +113,6 @@ .Ldone_return_value: /* Restore the registers we used and return. */ - ld %r2, 40(%r1) mr %r1, %r28 ld %r0, 16(%r28) ld %r28, -32(%r1) @@ -122,6 +125,7 @@ .Lfp_return_value: bf 28, .Lfloat_return_value stfd %f1, 0(%r30) + mtcrf 0x02, %r31 /* cr6 */ bf 27, .Ldone_return_value stfd %f2, 8(%r30) b .Ldone_return_value @@ -175,8 +179,3 @@ .align 3 .LEFDE1: #endif - -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif - diff -rNu smalltalk-3.0.2/libffi/src/powerpc/ppc_closure.S smalltalk-3.0.3/libffi/src/powerpc/ppc_closure.S --- smalltalk-3.0.2/libffi/src/powerpc/ppc_closure.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/powerpc/ppc_closure.S 2008-04-10 11:10:57.000000000 +0200 @@ -28,6 +28,7 @@ stw %r9, 40(%r1) stw %r10,44(%r1) +#ifndef __NO_FPRS__ # next save fpr 1 to fpr 8 (aligned to 8) stfd %f1, 48(%r1) stfd %f2, 56(%r1) @@ -37,6 +38,7 @@ stfd %f6, 88(%r1) stfd %f7, 96(%r1) stfd %f8, 104(%r1) +#endif # set up registers for the routine that actually does the work # get the context pointer from the trampoline @@ -171,6 +173,12 @@ addi %r1,%r1,144 blr +# case FFI_TYPE_UINT128 + lwz %r3,112+0(%r1) + lwz %r4,112+4(%r1) + lwz %r5,112+8(%r1) + bl .Luint128 + # The return types below are only used when the ABI type is FFI_SYSV. # case FFI_SYSV_TYPE_SMALL_STRUCT + 1. One byte struct. lbz %r3,112+0(%r1) @@ -230,6 +238,12 @@ addi %r1,%r1,144 blr +.Luint128: + lwz %r6,112+12(%r1) + mtlr %r0 + addi %r1,%r1,144 + blr + END(ffi_closure_SYSV) .section ".eh_frame",EH_FRAME_FLAGS,@progbits diff -rNu smalltalk-3.0.2/libffi/src/powerpc/sysv.S smalltalk-3.0.3/libffi/src/powerpc/sysv.S --- smalltalk-3.0.2/libffi/src/powerpc/sysv.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/powerpc/sysv.S 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,6 @@ /* ----------------------------------------------------------------------- - sysv.h - Copyright (c) 1998 Geoffrey Keating + sysv.S - Copyright (c) 1998 Geoffrey Keating + Copyright (C) 2007 Free Software Foundation, Inc PowerPC Assembly glue. @@ -98,13 +99,17 @@ bctrl /* Now, deal with the return value. */ - mtcrf 0x01,%r31 + mtcrf 0x01,%r31 /* cr7 */ bt- 31,L(small_struct_return_value) bt- 30,L(done_return_value) bt- 29,L(fp_return_value) stw %r3,0(%r30) bf+ 28,L(done_return_value) stw %r4,4(%r30) + mtcrf 0x02,%r31 /* cr6 */ + bf 27,L(done_return_value) + stw %r5,8(%r30) + stw %r6,12(%r30) /* Fall through... */ L(done_return_value): @@ -121,6 +126,7 @@ L(fp_return_value): bf 28,L(float_return_value) stfd %f1,0(%r30) + mtcrf 0x02,%r31 /* cr6 */ bf 27,L(done_return_value) stfd %f2,8(%r30) b L(done_return_value) @@ -217,9 +223,3 @@ .align 2 .LEFDE1: #endif - - -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif - diff -rNu smalltalk-3.0.2/libffi/src/prep_cif.c smalltalk-3.0.3/libffi/src/prep_cif.c --- smalltalk-3.0.2/libffi/src/prep_cif.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/prep_cif.c 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- - prep_cif.c - Copyright (c) 1996, 1998 Red Hat, Inc. + prep_cif.c - Copyright (c) 1996, 1998, 2007 Red Hat, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -12,13 +12,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ #include @@ -158,3 +159,16 @@ return ffi_prep_cif_machdep(cif); } #endif /* not __CRIS__ */ + +#if FFI_CLOSURES + +ffi_status +ffi_prep_closure (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data) +{ + return ffi_prep_closure_loc (closure, cif, fun, user_data, closure); +} + +#endif diff -rNu smalltalk-3.0.2/libffi/src/raw_api.c smalltalk-3.0.3/libffi/src/raw_api.c --- smalltalk-3.0.2/libffi/src/raw_api.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/raw_api.c 2008-04-10 11:10:57.000000000 +0200 @@ -16,13 +16,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ /* This file defines generic functions for use with the raw api. */ @@ -209,22 +210,20 @@ (*cl->fun) (cif, rvalue, raw, cl->user_data); } -/* Again, here is the generic version of ffi_prep_raw_closure, which - * will install an intermediate "hub" for translation of arguments from - * the pointer-array format, to the raw format */ - ffi_status -ffi_prep_raw_closure (ffi_raw_closure* cl, - ffi_cif *cif, - void (*fun)(ffi_cif*,void*,ffi_raw*,void*), - void *user_data) +ffi_prep_raw_closure_loc (ffi_raw_closure* cl, + ffi_cif *cif, + void (*fun)(ffi_cif*,void*,ffi_raw*,void*), + void *user_data, + void *codeloc) { ffi_status status; - status = ffi_prep_closure ((ffi_closure*) cl, - cif, - &ffi_translate_args, - (void*)cl); + status = ffi_prep_closure_loc ((ffi_closure*) cl, + cif, + &ffi_translate_args, + codeloc, + codeloc); if (status == FFI_OK) { cl->fun = fun; @@ -236,4 +235,22 @@ #endif /* FFI_CLOSURES */ #endif /* !FFI_NATIVE_RAW_API */ + +#if FFI_CLOSURES + +/* Again, here is the generic version of ffi_prep_raw_closure, which + * will install an intermediate "hub" for translation of arguments from + * the pointer-array format, to the raw format */ + +ffi_status +ffi_prep_raw_closure (ffi_raw_closure* cl, + ffi_cif *cif, + void (*fun)(ffi_cif*,void*,ffi_raw*,void*), + void *user_data) +{ + return ffi_prep_raw_closure_loc (cl, cif, fun, user_data, cl); +} + +#endif /* FFI_CLOSURES */ + #endif /* !FFI_NO_RAW_API */ diff -rNu smalltalk-3.0.2/libffi/src/s390/ffi.c smalltalk-3.0.3/libffi/src/s390/ffi.c --- smalltalk-3.0.2/libffi/src/s390/ffi.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/s390/ffi.c 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- - ffi.c - Copyright (c) 2000 Software AG + ffi.c - Copyright (c) 2000, 2007 Software AG S390 Foreign Function Interface @@ -207,6 +207,12 @@ void *arg = *p_argv; int type = (*ptr)->type; +#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + /* 16-byte long double is passed like a struct. */ + if (type == FFI_TYPE_LONGDOUBLE) + type = FFI_TYPE_STRUCT; +#endif + /* Check how a structure type is passed. */ if (type == FFI_TYPE_STRUCT) { @@ -364,6 +370,12 @@ cif->flags = FFI390_RET_DOUBLE; break; +#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: + cif->flags = FFI390_RET_STRUCT; + n_gpr++; + break; +#endif /* Integer values are returned in gpr 2 (and gpr 3 for 64-bit values on 31-bit machines). */ case FFI_TYPE_UINT64: @@ -400,6 +412,12 @@ { int type = (*ptr)->type; +#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + /* 16-byte long double is passed like a struct. */ + if (type == FFI_TYPE_LONGDOUBLE) + type = FFI_TYPE_STRUCT; +#endif + /* Check how a structure type is passed. */ if (type == FFI_TYPE_STRUCT) { @@ -562,6 +580,12 @@ int deref_struct_pointer = 0; int type = (*ptr)->type; +#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + /* 16-byte long double is passed like a struct. */ + if (type == FFI_TYPE_LONGDOUBLE) + type = FFI_TYPE_STRUCT; +#endif + /* Check how a structure type is passed. */ if (type == FFI_TYPE_STRUCT) { @@ -662,6 +686,9 @@ /* Void is easy, and so is struct. */ case FFI_TYPE_VOID: case FFI_TYPE_STRUCT: +#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: +#endif break; /* Floating point values are returned in fpr 0. */ @@ -709,17 +736,18 @@ /*====================================================================*/ /* */ -/* Name - ffi_prep_closure. */ +/* Name - ffi_prep_closure_loc. */ /* */ /* Function - Prepare a FFI closure. */ /* */ /*====================================================================*/ ffi_status -ffi_prep_closure (ffi_closure *closure, - ffi_cif *cif, - void (*fun) (ffi_cif *, void *, void **, void *), - void *user_data) +ffi_prep_closure_loc (ffi_closure *closure, + ffi_cif *cif, + void (*fun) (ffi_cif *, void *, void **, void *), + void *user_data, + void *codeloc) { FFI_ASSERT (cif->abi == FFI_SYSV); @@ -728,7 +756,7 @@ *(short *)&closure->tramp [2] = 0x9801; /* lm %r0,%r1,6(%r1) */ *(short *)&closure->tramp [4] = 0x1006; *(short *)&closure->tramp [6] = 0x07f1; /* br %r1 */ - *(long *)&closure->tramp [8] = (long)closure; + *(long *)&closure->tramp [8] = (long)codeloc; *(long *)&closure->tramp[12] = (long)&ffi_closure_SYSV; #else *(short *)&closure->tramp [0] = 0x0d10; /* basr %r1,0 */ @@ -736,7 +764,7 @@ *(short *)&closure->tramp [4] = 0x100e; *(short *)&closure->tramp [6] = 0x0004; *(short *)&closure->tramp [8] = 0x07f1; /* br %r1 */ - *(long *)&closure->tramp[16] = (long)closure; + *(long *)&closure->tramp[16] = (long)codeloc; *(long *)&closure->tramp[24] = (long)&ffi_closure_SYSV; #endif diff -rNu smalltalk-3.0.2/libffi/src/s390/ffitarget.h smalltalk-3.0.3/libffi/src/s390/ffitarget.h --- smalltalk-3.0.2/libffi/src/s390/ffitarget.h 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/s390/ffitarget.h 2008-04-10 11:10:57.000000000 +0200 @@ -13,13 +13,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ diff -rNu smalltalk-3.0.2/libffi/src/s390/sysv.S smalltalk-3.0.3/libffi/src/s390/sysv.S --- smalltalk-3.0.2/libffi/src/s390/sysv.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/s390/sysv.S 2008-04-10 11:10:57.000000000 +0200 @@ -17,7 +17,8 @@ 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 CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + 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. diff -rNu smalltalk-3.0.2/libffi/src/sh/ffi.c smalltalk-3.0.3/libffi/src/sh/ffi.c --- smalltalk-3.0.2/libffi/src/sh/ffi.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/sh/ffi.c 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- - ffi.c - Copyright (c) 2002, 2003, 2004, 2005, 2006 Kaz Kojima + ffi.c - Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007 Kaz Kojima SuperH Foreign Function Interface @@ -14,13 +14,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ #include @@ -452,10 +453,11 @@ #endif ffi_status -ffi_prep_closure (ffi_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*, void*, void**, void*), - void *user_data) +ffi_prep_closure_loc (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*, void*, void**, void*), + void *user_data, + void *codeloc) { unsigned int *tramp; unsigned short insn; @@ -475,7 +477,7 @@ tramp[0] = 0xd102d301; tramp[1] = 0x412b0000 | insn; #endif - *(void **) &tramp[2] = (void *)closure; /* ctx */ + *(void **) &tramp[2] = (void *)codeloc; /* ctx */ *(void **) &tramp[3] = (void *)ffi_closure_SYSV; /* funaddr */ closure->cif = cif; @@ -484,7 +486,7 @@ #if defined(__SH4__) /* Flush the icache. */ - __ic_invalidate(&closure->tramp[0]); + __ic_invalidate(codeloc); #endif return FFI_OK; diff -rNu smalltalk-3.0.2/libffi/src/sh/ffitarget.h smalltalk-3.0.3/libffi/src/sh/ffitarget.h --- smalltalk-3.0.2/libffi/src/sh/ffitarget.h 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/sh/ffitarget.h 2008-04-10 11:10:57.000000000 +0200 @@ -13,13 +13,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ diff -rNu smalltalk-3.0.2/libffi/src/sh/sysv.S smalltalk-3.0.3/libffi/src/sh/sysv.S --- smalltalk-3.0.2/libffi/src/sh/sysv.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/sh/sysv.S 2008-04-10 11:10:57.000000000 +0200 @@ -17,7 +17,8 @@ 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 CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + 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. diff -rNu smalltalk-3.0.2/libffi/src/sh64/ffi.c smalltalk-3.0.3/libffi/src/sh64/ffi.c --- smalltalk-3.0.2/libffi/src/sh64/ffi.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/sh64/ffi.c 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- - ffi.c - Copyright (c) 2003, 2004, 2006 Kaz Kojima + ffi.c - Copyright (c) 2003, 2004 Kaz Kojima SuperH SHmedia Foreign Function Interface @@ -14,13 +14,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ #include @@ -54,7 +55,9 @@ /* ffi_prep_args is called by the assembly routine once stack space has been allocated for the function's arguments */ +/*@-exportheader@*/ void ffi_prep_args(char *stack, extended_cif *ecif) +/*@=exportheader@*/ { register unsigned int i; register unsigned int avn; @@ -158,7 +161,6 @@ int n, m; int greg; int freg; - int fpair = -1; greg = (return_type (cif->rtype) == FFI_TYPE_STRUCT ? 1 : 0); freg = 0; @@ -174,13 +176,7 @@ cif->bytes += sizeof (UINT64) - sizeof (float); if (freg >= NFREGARG - 1) continue; - if (fpair < 0) - { - fpair = freg; - freg += 2; - } - else - fpair = -1; + freg++; cif->flags2 += ((cif->arg_types)[i]->type) << (2 * j++); break; @@ -189,6 +185,7 @@ continue; if ((freg + 1) < NFREGARG) { + freg = (freg + 1) & ~1; freg += 2; cif->flags2 += ((cif->arg_types)[i]->type) << (2 * j++); } @@ -236,11 +233,20 @@ return FFI_OK; } -extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, - unsigned, unsigned, long long, unsigned *, +/*@-declundef@*/ +/*@-exportheader@*/ +extern void ffi_call_SYSV(void (*)(char *, extended_cif *), + /*@out@*/ extended_cif *, + unsigned, unsigned, long long, + /*@out@*/ unsigned *, void (*fn)()); +/*@=declundef@*/ +/*@=exportheader@*/ -void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) +void ffi_call(/*@dependent@*/ ffi_cif *cif, + void (*fn)(), + /*@out@*/ void *rvalue, + /*@dependent@*/ void **avalue) { extended_cif ecif; UINT64 trvalue; @@ -257,7 +263,9 @@ else if ((rvalue == NULL) && (cif->rtype->type == FFI_TYPE_STRUCT)) { + /*@-sysunrecog@*/ ecif.rvalue = alloca(cif->rtype->size); + /*@=sysunrecog@*/ } else ecif.rvalue = rvalue; @@ -265,8 +273,10 @@ switch (cif->abi) { case FFI_SYSV: - ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, cif->flags2, - ecif.rvalue, fn); + /*@-usedef@*/ + ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, + cif->flags, cif->flags2, ecif.rvalue, fn); + /*@=usedef@*/ break; default: FFI_ASSERT(0); @@ -341,7 +351,6 @@ int i, avn; int greg, freg; ffi_cif *cif; - int fpair = -1; cif = closure->cif; avalue = alloca (cif->nargs * sizeof (void *)); @@ -350,7 +359,7 @@ returns the data directly to the caller. */ if (return_type (cif->rtype) == FFI_TYPE_STRUCT) { - rvalue = (UINT64 *) *pgr; + rvalue = *pgr; greg = 1; } else @@ -394,24 +403,11 @@ if ((*p_arg)->type == FFI_TYPE_FLOAT) { if (freg < NFREGARG - 1) - { - if (fpair >= 0) - { - avalue[i] = (UINT32 *) pfr + fpair; - fpair = -1; - } - else - { #ifdef __LITTLE_ENDIAN__ - fpair = freg; - avalue[i] = (UINT32 *) pfr + (1 ^ freg); + avalue[i] = (UINT32 *) pfr + (1 ^ freg++); #else - fpair = 1 ^ freg; - avalue[i] = (UINT32 *) pfr + freg; + avalue[i] = (UINT32 *) pfr + freg++; #endif - freg += 2; - } - } else #ifdef __LITTLE_ENDIAN__ avalue[i] = pgr + greg; @@ -433,6 +429,7 @@ avalue[i] = pgr + greg; else { + freg = (freg + 1) & ~1; avalue[i] = pfr + (freg >> 1); freg += 2; } diff -rNu smalltalk-3.0.2/libffi/src/sh64/ffitarget.h smalltalk-3.0.3/libffi/src/sh64/ffitarget.h --- smalltalk-3.0.2/libffi/src/sh64/ffitarget.h 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/sh64/ffitarget.h 2008-04-10 11:10:57.000000000 +0200 @@ -13,13 +13,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ diff -rNu smalltalk-3.0.2/libffi/src/sh64/sysv.S smalltalk-3.0.3/libffi/src/sh64/sysv.S --- smalltalk-3.0.2/libffi/src/sh64/sysv.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/sh64/sysv.S 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- - sysv.S - Copyright (c) 2003, 2004, 2006 Kaz Kojima + sysv.S - Copyright (c) 2003, 2004 Kaz Kojima SuperH SHmedia Foreign Function Interface @@ -17,7 +17,8 @@ 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 CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + 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. @@ -84,7 +85,6 @@ addi r15, 64, r22 movi 0, r0 movi 0, r1 - movi -1, r23 pt/l 1f, tr1 bnei/l r29, FFI_TYPE_STRUCT, tr1 @@ -107,6 +107,9 @@ .L_pass_d: addi r0, 1, r0 + addi r1, 1, r1 + andi r1, ~1, r1 + pt/l 3f, tr0 movi 12, r20 bge/l r1, r20, tr0 @@ -156,23 +159,13 @@ addi.l r15, 8, r15 3: pt/l .L_pass, tr0 + addi r1, 1, r1 blink tr0, r63 .L_pop_f: pt/l .L_pop_f_tbl, tr1 - pt/l 5f, tr2 gettr tr1, r20 - bge/l r23, r63, tr2 - add r1, r63, r23 shlli r1, 3, r21 - addi r1, 2, r1 - add r20, r21, r20 - ptabs/l r20, tr1 - blink tr1, r63 -5: - addi r23, 1, r21 - movi -1, r23 - shlli r21, 3, r21 add r20, r21, r20 ptabs/l r20, tr1 blink tr1, r63 diff -rNu smalltalk-3.0.2/libffi/src/sparc/ffi.c smalltalk-3.0.3/libffi/src/sparc/ffi.c --- smalltalk-3.0.2/libffi/src/sparc/ffi.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/sparc/ffi.c 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- - ffi.c - Copyright (c) 1996, 2003, 2004 Red Hat, Inc. + ffi.c - Copyright (c) 1996, 2003, 2004, 2007 Red Hat, Inc. SPARC Foreign Function Interface @@ -14,13 +14,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ #include @@ -425,10 +426,11 @@ #endif ffi_status -ffi_prep_closure (ffi_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*, void*, void**, void*), - void *user_data) +ffi_prep_closure_loc (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*, void*, void**, void*), + void *user_data, + void *codeloc) { unsigned int *tramp = (unsigned int *) &closure->tramp[0]; unsigned long fn; @@ -443,7 +445,7 @@ tramp[3] = 0x01000000; /* nop */ *((unsigned long *) &tramp[4]) = fn; #else - unsigned long ctx = (unsigned long) closure; + unsigned long ctx = (unsigned long) codeloc; FFI_ASSERT (cif->abi == FFI_V8); fn = (unsigned long) ffi_closure_v8; tramp[0] = 0x03000000 | fn >> 10; /* sethi %hi(fn), %g1 */ diff -rNu smalltalk-3.0.2/libffi/src/sparc/ffitarget.h smalltalk-3.0.3/libffi/src/sparc/ffitarget.h --- smalltalk-3.0.2/libffi/src/sparc/ffitarget.h 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/sparc/ffitarget.h 2008-04-10 11:10:57.000000000 +0200 @@ -13,13 +13,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ diff -rNu smalltalk-3.0.2/libffi/src/sparc/v8.S smalltalk-3.0.3/libffi/src/sparc/v8.S --- smalltalk-3.0.2/libffi/src/sparc/v8.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/sparc/v8.S 2008-04-10 11:10:57.000000000 +0200 @@ -17,7 +17,8 @@ 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 CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + 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. diff -rNu smalltalk-3.0.2/libffi/src/sparc/v9.S smalltalk-3.0.3/libffi/src/sparc/v9.S --- smalltalk-3.0.2/libffi/src/sparc/v9.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/sparc/v9.S 2008-04-10 11:10:57.000000000 +0200 @@ -17,7 +17,8 @@ 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 CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + 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. diff -rNu smalltalk-3.0.2/libffi/src/types.c smalltalk-3.0.3/libffi/src/types.c --- smalltalk-3.0.2/libffi/src/types.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/types.c 2008-04-10 11:10:57.000000000 +0200 @@ -14,15 +14,20 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ +/* Hide the basic type definitions from the header file, so that we + can redefine them here as "const". */ +#define LIBFFI_HIDE_BASIC_TYPES + #include #include @@ -33,14 +38,14 @@ char c; \ type x; \ }; \ -ffi_type ffi_type_##name = { \ +const ffi_type ffi_type_##name = { \ sizeof(type), \ offsetof(struct struct_align_##name, x), \ id, NULL \ } /* Size and alignment are fake here. They must not be 0. */ -ffi_type ffi_type_void = { +const ffi_type ffi_type_void = { 1, 1, FFI_TYPE_VOID, NULL }; @@ -57,4 +62,16 @@ FFI_TYPEDEF(float, float, FFI_TYPE_FLOAT); FFI_TYPEDEF(double, double, FFI_TYPE_DOUBLE); + +#ifdef __alpha__ +/* Even if we're not configured to default to 128-bit long double, + maintain binary compatibility, as -mlong-double-128 can be used + at any time. */ +/* Validate the hard-coded number below. */ +# if defined(__LONG_DOUBLE_128__) && FFI_TYPE_LONGDOUBLE != 4 +# error FFI_TYPE_LONGDOUBLE out of date +# endif +const ffi_type ffi_type_longdouble = { 16, 16, 4, NULL }; +#elif FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE FFI_TYPEDEF(longdouble, long double, FFI_TYPE_LONGDOUBLE); +#endif diff -rNu smalltalk-3.0.2/libffi/src/x86/darwin.S smalltalk-3.0.3/libffi/src/x86/darwin.S --- smalltalk-3.0.2/libffi/src/x86/darwin.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/x86/darwin.S 2008-04-10 11:10:57.000000000 +0200 @@ -1,7 +1,8 @@ /* ----------------------------------------------------------------------- - sysv.S - Copyright (c) 1996, 1998, 2001, 2002, 2003, 2005 Red Hat, Inc. - - X86 Foreign Function Interface + darwin.S - Copyright (c) 1996, 1998, 2001, 2002, 2003, 2005 Red Hat, Inc. + Copyright (C) 2008 Free Software Foundation, Inc. + + X86 Foreign Function Interface Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -17,7 +18,8 @@ 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 CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + 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. @@ -60,16 +62,15 @@ call *28(%ebp) - /* Remove the space we pushed for the args */ - movl 16(%ebp),%ecx - addl %ecx,%esp - /* Load %ecx with the return type code */ movl 20(%ebp),%ecx + /* Protect %esi. We're going to pop it in the epilogue. */ + pushl %esi + /* If the return value pointer is NULL, assume no return value. */ cmpl $0,24(%ebp) - jne retint + jne 0f /* Even if there is no space for the return value, we are obliged to handle floating-point values. */ @@ -77,79 +78,102 @@ jne noretval fstp %st(0) - jmp epilogue - -retint: - cmpl $FFI_TYPE_INT,%ecx - jne retfloat - /* Load %ecx with the pointer to storage for the return value */ - movl 24(%ebp),%ecx - movl %eax,0(%ecx) jmp epilogue +0: + .align 4 + call 1f +.Lstore_table: + .long noretval-.Lstore_table /* FFI_TYPE_VOID */ + .long retint-.Lstore_table /* FFI_TYPE_INT */ + .long retfloat-.Lstore_table /* FFI_TYPE_FLOAT */ + .long retdouble-.Lstore_table /* FFI_TYPE_DOUBLE */ + .long retlongdouble-.Lstore_table /* FFI_TYPE_LONGDOUBLE */ + .long retuint8-.Lstore_table /* FFI_TYPE_UINT8 */ + .long retsint8-.Lstore_table /* FFI_TYPE_SINT8 */ + .long retuint16-.Lstore_table /* FFI_TYPE_UINT16 */ + .long retsint16-.Lstore_table /* FFI_TYPE_SINT16 */ + .long retint-.Lstore_table /* FFI_TYPE_UINT32 */ + .long retint-.Lstore_table /* FFI_TYPE_SINT32 */ + .long retint64-.Lstore_table /* FFI_TYPE_UINT64 */ + .long retint64-.Lstore_table /* FFI_TYPE_SINT64 */ + .long retstruct-.Lstore_table /* FFI_TYPE_STRUCT */ + .long retint-.Lstore_table /* FFI_TYPE_POINTER */ + .long retstruct1b-.Lstore_table /* FFI_TYPE_SMALL_STRUCT_1B */ + .long retstruct2b-.Lstore_table /* FFI_TYPE_SMALL_STRUCT_2B */ +1: + pop %esi + add (%esi, %ecx, 4), %esi + jmp *%esi + + /* Sign/zero extend as appropriate. */ +retsint8: + movsbl %al, %eax + jmp retint + +retsint16: + movswl %ax, %eax + jmp retint + +retuint8: + movzbl %al, %eax + jmp retint + +retuint16: + movzwl %ax, %eax + jmp retint retfloat: - cmpl $FFI_TYPE_FLOAT,%ecx - jne retdouble /* Load %ecx with the pointer to storage for the return value */ - movl 24(%ebp),%ecx + movl 24(%ebp),%ecx fstps (%ecx) jmp epilogue retdouble: - cmpl $FFI_TYPE_DOUBLE,%ecx - jne retlongdouble /* Load %ecx with the pointer to storage for the return value */ - movl 24(%ebp),%ecx + movl 24(%ebp),%ecx fstpl (%ecx) jmp epilogue retlongdouble: - cmpl $FFI_TYPE_LONGDOUBLE,%ecx - jne retint64 /* Load %ecx with the pointer to storage for the return value */ - movl 24(%ebp),%ecx + movl 24(%ebp),%ecx fstpt (%ecx) jmp epilogue - -retint64: - cmpl $FFI_TYPE_SINT64,%ecx - jne retstruct1b + +retint64: /* Load %ecx with the pointer to storage for the return value */ - movl 24(%ebp),%ecx + movl 24(%ebp),%ecx movl %eax,0(%ecx) movl %edx,4(%ecx) jmp epilogue - -retstruct1b: - cmpl $FFI_TYPE_SINT8,%ecx - jne retstruct2b + +retstruct1b: /* Load %ecx with the pointer to storage for the return value */ - movl 24(%ebp),%ecx + movl 24(%ebp),%ecx movb %al,0(%ecx) jmp epilogue -retstruct2b: - cmpl $FFI_TYPE_SINT16,%ecx - jne retstruct +retstruct2b: /* Load %ecx with the pointer to storage for the return value */ - movl 24(%ebp),%ecx + movl 24(%ebp),%ecx movw %ax,0(%ecx) jmp epilogue +retint: + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + movl %eax,0(%ecx) + retstruct: - cmpl $FFI_TYPE_STRUCT,%ecx - jne noretval /* Nothing to do! */ - addl $4,%esp - popl %ebp - ret noretval: epilogue: - addl $8,%esp - movl %ebp,%esp - popl %ebp - ret + popl %esi + movl %ebp,%esp + popl %ebp + ret + .LFE1: .ffi_call_SYSV_end: @@ -177,7 +201,15 @@ movl -12(%ebp), %ecx cmpl $FFI_TYPE_INT, %eax je .Lcls_retint - cmpl $FFI_TYPE_FLOAT, %eax + + /* Handle FFI_TYPE_UINT8, FFI_TYPE_SINT8, FFI_TYPE_UINT16, + FFI_TYPE_SINT16, FFI_TYPE_UINT32, FFI_TYPE_SINT32. */ + cmpl $FFI_TYPE_UINT64, %eax + jge 0f + cmpl $FFI_TYPE_UINT8, %eax + jge .Lcls_retint + +0: cmpl $FFI_TYPE_FLOAT, %eax je .Lcls_retfloat cmpl $FFI_TYPE_DOUBLE, %eax je .Lcls_retdouble @@ -185,10 +217,10 @@ je .Lcls_retldouble cmpl $FFI_TYPE_SINT64, %eax je .Lcls_retllong - cmpl $FFI_TYPE_SINT8, %eax - je .Lcls_retstruct1 - cmpl $FFI_TYPE_SINT16, %eax - je .Lcls_retstruct2 + cmpl $FFI_TYPE_SMALL_STRUCT_1B, %eax + je .Lcls_retstruct1b + cmpl $FFI_TYPE_SMALL_STRUCT_2B, %eax + je .Lcls_retstruct2b cmpl $FFI_TYPE_STRUCT, %eax je .Lcls_retstruct .Lcls_epilogue: @@ -211,10 +243,10 @@ movl (%ecx), %eax movl 4(%ecx), %edx jmp .Lcls_epilogue -.Lcls_retstruct1: +.Lcls_retstruct1b: movsbl (%ecx), %eax jmp .Lcls_epilogue -.Lcls_retstruct2: +.Lcls_retstruct2b: movswl (%ecx), %eax jmp .Lcls_epilogue .Lcls_retstruct: @@ -256,6 +288,14 @@ movl CIF_FLAGS_OFFSET(%esi), %eax /* rtype */ cmpl $FFI_TYPE_INT, %eax je .Lrcls_retint + + /* Handle FFI_TYPE_UINT8, FFI_TYPE_SINT8, FFI_TYPE_UINT16, + FFI_TYPE_SINT16, FFI_TYPE_UINT32, FFI_TYPE_SINT32. */ + cmpl $FFI_TYPE_UINT64, %eax + jge 0f + cmpl $FFI_TYPE_UINT8, %eax + jge .Lrcls_retint +0: cmpl $FFI_TYPE_FLOAT, %eax je .Lrcls_retfloat cmpl $FFI_TYPE_DOUBLE, %eax diff -rNu smalltalk-3.0.2/libffi/src/x86/darwin64.S smalltalk-3.0.3/libffi/src/x86/darwin64.S --- smalltalk-3.0.2/libffi/src/x86/darwin64.S 1970-01-01 01:00:00.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/x86/darwin64.S 2008-04-10 11:10:57.000000000 +0200 @@ -0,0 +1,415 @@ +/* ----------------------------------------------------------------------- + darwin64.S - Copyright (c) 2006 Free Software Foundation, Inc. + derived from unix64.S + + x86-64 Foreign Function Interface for Darwin. + + 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 AUTHOR 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. + ----------------------------------------------------------------------- */ + +#ifdef __x86_64__ +#define LIBFFI_ASM +#include +#include + + .file "darwin64.S" +.text + +/* ffi_call_unix64 (void *args, unsigned long bytes, unsigned flags, + void *raddr, void (*fnaddr)()); + + Bit o trickiness here -- ARGS+BYTES is the base of the stack frame + for this function. This has been allocated by ffi_call. We also + deallocate some of the stack that has been alloca'd. */ + + .align 3 + .globl _ffi_call_unix64 + +_ffi_call_unix64: +LUW0: + movq (%rsp), %r10 /* Load return address. */ + leaq (%rdi, %rsi), %rax /* Find local stack base. */ + movq %rdx, (%rax) /* Save flags. */ + movq %rcx, 8(%rax) /* Save raddr. */ + movq %rbp, 16(%rax) /* Save old frame pointer. */ + movq %r10, 24(%rax) /* Relocate return address. */ + movq %rax, %rbp /* Finalize local stack frame. */ +LUW1: + movq %rdi, %r10 /* Save a copy of the register area. */ + movq %r8, %r11 /* Save a copy of the target fn. */ + movl %r9d, %eax /* Set number of SSE registers. */ + + /* Load up all argument registers. */ + movq (%r10), %rdi + movq 8(%r10), %rsi + movq 16(%r10), %rdx + movq 24(%r10), %rcx + movq 32(%r10), %r8 + movq 40(%r10), %r9 + testl %eax, %eax + jnz Lload_sse +Lret_from_load_sse: + + /* Deallocate the reg arg area. */ + leaq 176(%r10), %rsp + + /* Call the user function. */ + call *%r11 + + /* Deallocate stack arg area; local stack frame in redzone. */ + leaq 24(%rbp), %rsp + + movq 0(%rbp), %rcx /* Reload flags. */ + movq 8(%rbp), %rdi /* Reload raddr. */ + movq 16(%rbp), %rbp /* Reload old frame pointer. */ +LUW2: + + /* The first byte of the flags contains the FFI_TYPE. */ + movzbl %cl, %r10d + leaq Lstore_table(%rip), %r11 + movslq (%r11, %r10, 4), %r10 + addq %r11, %r10 + jmp *%r10 + +Lstore_table: + .long Lst_void-Lstore_table /* FFI_TYPE_VOID */ + .long Lst_sint32-Lstore_table /* FFI_TYPE_INT */ + .long Lst_float-Lstore_table /* FFI_TYPE_FLOAT */ + .long Lst_double-Lstore_table /* FFI_TYPE_DOUBLE */ + .long Lst_ldouble-Lstore_table /* FFI_TYPE_LONGDOUBLE */ + .long Lst_uint8-Lstore_table /* FFI_TYPE_UINT8 */ + .long Lst_sint8-Lstore_table /* FFI_TYPE_SINT8 */ + .long Lst_uint16-Lstore_table /* FFI_TYPE_UINT16 */ + .long Lst_sint16-Lstore_table /* FFI_TYPE_SINT16 */ + .long Lst_uint32-Lstore_table /* FFI_TYPE_UINT32 */ + .long Lst_sint32-Lstore_table /* FFI_TYPE_SINT32 */ + .long Lst_int64-Lstore_table /* FFI_TYPE_UINT64 */ + .long Lst_int64-Lstore_table /* FFI_TYPE_SINT64 */ + .long Lst_struct-Lstore_table /* FFI_TYPE_STRUCT */ + .long Lst_int64-Lstore_table /* FFI_TYPE_POINTER */ + + .text + .align 3 +Lst_void: + ret + .align 3 +Lst_uint8: + movzbq %al, %rax + movq %rax, (%rdi) + ret + .align 3 +Lst_sint8: + movsbq %al, %rax + movq %rax, (%rdi) + ret + .align 3 +Lst_uint16: + movzwq %ax, %rax + movq %rax, (%rdi) + .align 3 +Lst_sint16: + movswq %ax, %rax + movq %rax, (%rdi) + ret + .align 3 +Lst_uint32: + movl %eax, %eax + movq %rax, (%rdi) + .align 3 +Lst_sint32: + cltq + movq %rax, (%rdi) + ret + .align 3 +Lst_int64: + movq %rax, (%rdi) + ret + .align 3 +Lst_float: + movss %xmm0, (%rdi) + ret + .align 3 +Lst_double: + movsd %xmm0, (%rdi) + ret +Lst_ldouble: + fstpt (%rdi) + ret + .align 3 +Lst_struct: + leaq -20(%rsp), %rsi /* Scratch area in redzone. */ + + /* We have to locate the values now, and since we don't want to + write too much data into the user's return value, we spill the + value to a 16 byte scratch area first. Bits 8, 9, and 10 + control where the values are located. Only one of the three + bits will be set; see ffi_prep_cif_machdep for the pattern. */ + movd %xmm0, %r10 + movd %xmm1, %r11 + testl $0x100, %ecx + cmovnz %rax, %rdx + cmovnz %r10, %rax + testl $0x200, %ecx + cmovnz %r10, %rdx + testl $0x400, %ecx + cmovnz %r10, %rax + cmovnz %r11, %rdx + movq %rax, (%rsi) + movq %rdx, 8(%rsi) + + /* Bits 12-31 contain the true size of the structure. Copy from + the scratch area to the true destination. */ + shrl $12, %ecx + rep movsb + ret + + /* Many times we can avoid loading any SSE registers at all. + It's not worth an indirect jump to load the exact set of + SSE registers needed; zero or all is a good compromise. */ + .align 3 +LUW3: +Lload_sse: + movdqa 48(%r10), %xmm0 + movdqa 64(%r10), %xmm1 + movdqa 80(%r10), %xmm2 + movdqa 96(%r10), %xmm3 + movdqa 112(%r10), %xmm4 + movdqa 128(%r10), %xmm5 + movdqa 144(%r10), %xmm6 + movdqa 160(%r10), %xmm7 + jmp Lret_from_load_sse + +LUW4: + .align 3 + .globl _ffi_closure_unix64 + +_ffi_closure_unix64: +LUW5: + /* The carry flag is set by the trampoline iff SSE registers + are used. Don't clobber it before the branch instruction. */ + leaq -200(%rsp), %rsp +LUW6: + movq %rdi, (%rsp) + movq %rsi, 8(%rsp) + movq %rdx, 16(%rsp) + movq %rcx, 24(%rsp) + movq %r8, 32(%rsp) + movq %r9, 40(%rsp) + jc Lsave_sse +Lret_from_save_sse: + + movq %r10, %rdi + leaq 176(%rsp), %rsi + movq %rsp, %rdx + leaq 208(%rsp), %rcx + call _ffi_closure_unix64_inner + + /* Deallocate stack frame early; return value is now in redzone. */ + addq $200, %rsp +LUW7: + + /* The first byte of the return value contains the FFI_TYPE. */ + movzbl %al, %r10d + leaq Lload_table(%rip), %r11 + movslq (%r11, %r10, 4), %r10 + addq %r11, %r10 + jmp *%r10 + +Lload_table: + .long Lld_void-Lload_table /* FFI_TYPE_VOID */ + .long Lld_int32-Lload_table /* FFI_TYPE_INT */ + .long Lld_float-Lload_table /* FFI_TYPE_FLOAT */ + .long Lld_double-Lload_table /* FFI_TYPE_DOUBLE */ + .long Lld_ldouble-Lload_table /* FFI_TYPE_LONGDOUBLE */ + .long Lld_int8-Lload_table /* FFI_TYPE_UINT8 */ + .long Lld_int8-Lload_table /* FFI_TYPE_SINT8 */ + .long Lld_int16-Lload_table /* FFI_TYPE_UINT16 */ + .long Lld_int16-Lload_table /* FFI_TYPE_SINT16 */ + .long Lld_int32-Lload_table /* FFI_TYPE_UINT32 */ + .long Lld_int32-Lload_table /* FFI_TYPE_SINT32 */ + .long Lld_int64-Lload_table /* FFI_TYPE_UINT64 */ + .long Lld_int64-Lload_table /* FFI_TYPE_SINT64 */ + .long Lld_struct-Lload_table /* FFI_TYPE_STRUCT */ + .long Lld_int64-Lload_table /* FFI_TYPE_POINTER */ + + .text + .align 3 +Lld_void: + ret + .align 3 +Lld_int8: + movzbl -24(%rsp), %eax + ret + .align 3 +Lld_int16: + movzwl -24(%rsp), %eax + ret + .align 3 +Lld_int32: + movl -24(%rsp), %eax + ret + .align 3 +Lld_int64: + movq -24(%rsp), %rax + ret + .align 3 +Lld_float: + movss -24(%rsp), %xmm0 + ret + .align 3 +Lld_double: + movsd -24(%rsp), %xmm0 + ret + .align 3 +Lld_ldouble: + fldt -24(%rsp) + ret + .align 3 +Lld_struct: + /* There are four possibilities here, %rax/%rdx, %xmm0/%rax, + %rax/%xmm0, %xmm0/%xmm1. We collapse two by always loading + both rdx and xmm1 with the second word. For the remaining, + bit 8 set means xmm0 gets the second word, and bit 9 means + that rax gets the second word. */ + movq -24(%rsp), %rcx + movq -16(%rsp), %rdx + movq -16(%rsp), %xmm1 + testl $0x100, %eax + cmovnz %rdx, %rcx + movd %rcx, %xmm0 + testl $0x200, %eax + movq -24(%rsp), %rax + cmovnz %rdx, %rax + ret + + /* See the comment above Lload_sse; the same logic applies here. */ + .align 3 +LUW8: +Lsave_sse: + movdqa %xmm0, 48(%rsp) + movdqa %xmm1, 64(%rsp) + movdqa %xmm2, 80(%rsp) + movdqa %xmm3, 96(%rsp) + movdqa %xmm4, 112(%rsp) + movdqa %xmm5, 128(%rsp) + movdqa %xmm6, 144(%rsp) + movdqa %xmm7, 160(%rsp) + jmp Lret_from_save_sse + +LUW9: +.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support +EH_frame1: + .set L$set$0,LECIE1-LSCIE1 /* CIE Length */ + .long L$set$0 +LSCIE1: + .long 0x0 /* CIE Identifier Tag */ + .byte 0x1 /* CIE Version */ + .ascii "zR\0" /* CIE Augmentation */ + .byte 0x1 /* uleb128 0x1; CIE Code Alignment Factor */ + .byte 0x78 /* sleb128 -8; CIE Data Alignment Factor */ + .byte 0x10 /* CIE RA Column */ + .byte 0x1 /* uleb128 0x1; Augmentation size */ + .byte 0x10 /* FDE Encoding (pcrel sdata4) */ + .byte 0xc /* DW_CFA_def_cfa, %rsp offset 8 */ + .byte 0x7 /* uleb128 0x7 */ + .byte 0x8 /* uleb128 0x8 */ + .byte 0x90 /* DW_CFA_offset, column 0x10 */ + .byte 0x1 + .align 3 +LECIE1: + .globl _ffi_call_unix64.eh +_ffi_call_unix64.eh: +LSFDE1: + .set L$set$1,LEFDE1-LASFDE1 /* FDE Length */ + .long L$set$1 +LASFDE1: + .long LASFDE1-EH_frame1 /* FDE CIE offset */ + .quad LUW0-. /* FDE initial location */ + .set L$set$2,LUW4-LUW0 /* FDE address range */ + .quad L$set$2 + .byte 0x0 /* Augmentation size */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .set L$set$3,LUW1-LUW0 + .long L$set$3 + + /* New stack frame based off rbp. This is a itty bit of unwind + trickery in that the CFA *has* changed. There is no easy way + to describe it correctly on entry to the function. Fortunately, + it doesn't matter too much since at all points we can correctly + unwind back to ffi_call. Note that the location to which we + moved the return address is (the new) CFA-8, so from the + perspective of the unwind info, it hasn't moved. */ + .byte 0xc /* DW_CFA_def_cfa, %rbp offset 32 */ + .byte 0x6 + .byte 0x20 + .byte 0x80+6 /* DW_CFA_offset, %rbp offset 2*-8 */ + .byte 0x2 + .byte 0xa /* DW_CFA_remember_state */ + + .byte 0x4 /* DW_CFA_advance_loc4 */ + .set L$set$4,LUW2-LUW1 + .long L$set$4 + .byte 0xc /* DW_CFA_def_cfa, %rsp offset 8 */ + .byte 0x7 + .byte 0x8 + .byte 0xc0+6 /* DW_CFA_restore, %rbp */ + + .byte 0x4 /* DW_CFA_advance_loc4 */ + .set L$set$5,LUW3-LUW2 + .long L$set$5 + .byte 0xb /* DW_CFA_restore_state */ + + .align 3 +LEFDE1: + .globl _ffi_closure_unix64.eh +_ffi_closure_unix64.eh: +LSFDE3: + .set L$set$6,LEFDE3-LASFDE3 /* FDE Length */ + .long L$set$6 +LASFDE3: + .long LASFDE3-EH_frame1 /* FDE CIE offset */ + .quad LUW5-. /* FDE initial location */ + .set L$set$7,LUW9-LUW5 /* FDE address range */ + .quad L$set$7 + .byte 0x0 /* Augmentation size */ + + .byte 0x4 /* DW_CFA_advance_loc4 */ + .set L$set$8,LUW6-LUW5 + .long L$set$8 + .byte 0xe /* DW_CFA_def_cfa_offset */ + .byte 208,1 /* uleb128 208 */ + .byte 0xa /* DW_CFA_remember_state */ + + .byte 0x4 /* DW_CFA_advance_loc4 */ + .set L$set$9,LUW7-LUW6 + .long L$set$9 + .byte 0xe /* DW_CFA_def_cfa_offset */ + .byte 0x8 + + .byte 0x4 /* DW_CFA_advance_loc4 */ + .set L$set$10,LUW8-LUW7 + .long L$set$10 + .byte 0xb /* DW_CFA_restore_state */ + + .align 3 +LEFDE3: + .subsections_via_symbols + +#endif /* __x86_64__ */ diff -rNu smalltalk-3.0.2/libffi/src/x86/ffi.c smalltalk-3.0.3/libffi/src/x86/ffi.c --- smalltalk-3.0.2/libffi/src/x86/ffi.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/x86/ffi.c 2008-04-10 11:10:57.000000000 +0200 @@ -1,10 +1,11 @@ /* ----------------------------------------------------------------------- - ffi.c - Copyright (c) 1996, 1998, 1999, 2001 Red Hat, Inc. + ffi.c - Copyright (c) 1996, 1998, 1999, 2001, 2007 Red Hat, Inc. Copyright (c) 2002 Ranjit Mathew Copyright (c) 2002 Bo Thorsen Copyright (c) 2002 Roger Sayle - - x86 Foreign Function Interface + Copyright (C) 2008 Free Software Foundation, Inc. + + x86 Foreign Function Interface Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -17,13 +18,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ #ifndef __x86_64__ @@ -122,6 +124,13 @@ #ifdef X86 case FFI_TYPE_STRUCT: #endif +#if defined(X86) || defined(X86_DARWIN) + case FFI_TYPE_UINT8: + case FFI_TYPE_UINT16: + case FFI_TYPE_SINT8: + case FFI_TYPE_SINT16: +#endif + case FFI_TYPE_SINT64: case FFI_TYPE_FLOAT: case FFI_TYPE_DOUBLE: @@ -137,11 +146,11 @@ case FFI_TYPE_STRUCT: if (cif->rtype->size == 1) { - cif->flags = FFI_TYPE_SINT8; /* same as char size */ + cif->flags = FFI_TYPE_SMALL_STRUCT_1B; /* same as char size */ } else if (cif->rtype->size == 2) { - cif->flags = FFI_TYPE_SINT16; /* same as short size */ + cif->flags = FFI_TYPE_SMALL_STRUCT_2B; /* same as short size */ } else if (cif->rtype->size == 4) { @@ -227,6 +236,10 @@ __attribute__ ((regparm(1))); void FFI_HIDDEN ffi_closure_raw_SYSV (ffi_raw_closure *) __attribute__ ((regparm(1))); +#ifdef X86_WIN32 +void FFI_HIDDEN ffi_closure_STDCALL (ffi_closure *) + __attribute__ ((regparm(1))); +#endif /* This function is jumped to by the trampoline */ @@ -302,27 +315,54 @@ ({ unsigned char *__tramp = (unsigned char*)(TRAMP); \ unsigned int __fun = (unsigned int)(FUN); \ unsigned int __ctx = (unsigned int)(CTX); \ - unsigned int __dis = __fun - ((unsigned int) __tramp + FFI_TRAMPOLINE_SIZE); \ + unsigned int __dis = __fun - (__ctx + 10); \ *(unsigned char*) &__tramp[0] = 0xb8; \ *(unsigned int*) &__tramp[1] = __ctx; /* movl __ctx, %eax */ \ *(unsigned char *) &__tramp[5] = 0xe9; \ *(unsigned int*) &__tramp[6] = __dis; /* jmp __fun */ \ }) +#define FFI_INIT_TRAMPOLINE_STDCALL(TRAMP,FUN,CTX,SIZE) \ +({ unsigned char *__tramp = (unsigned char*)(TRAMP); \ + unsigned int __fun = (unsigned int)(FUN); \ + unsigned int __ctx = (unsigned int)(CTX); \ + unsigned int __dis = __fun - (__ctx + 10); \ + unsigned short __size = (unsigned short)(SIZE); \ + *(unsigned char*) &__tramp[0] = 0xb8; \ + *(unsigned int*) &__tramp[1] = __ctx; /* movl __ctx, %eax */ \ + *(unsigned char *) &__tramp[5] = 0xe8; \ + *(unsigned int*) &__tramp[6] = __dis; /* call __fun */ \ + *(unsigned char *) &__tramp[10] = 0xc2; \ + *(unsigned short*) &__tramp[11] = __size; /* ret __size */ \ + }) /* the cif must already be prep'ed */ ffi_status -ffi_prep_closure (ffi_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*,void*,void**,void*), - void *user_data) +ffi_prep_closure_loc (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data, + void *codeloc) { - FFI_ASSERT (cif->abi == FFI_SYSV); - - FFI_INIT_TRAMPOLINE (&closure->tramp[0], \ - &ffi_closure_SYSV, \ - (void*)closure); + if (cif->abi == FFI_SYSV) + { + FFI_INIT_TRAMPOLINE (&closure->tramp[0], + &ffi_closure_SYSV, + (void*)closure); + } +#ifdef X86_WIN32 + else if (cif->abi == FFI_STDCALL) + { + FFI_INIT_TRAMPOLINE_STDCALL (&closure->tramp[0], + &ffi_closure_STDCALL, + (void*)closure, cif->bytes); + } +#endif + else + { + return FFI_BAD_ABI; + } closure->cif = cif; closure->user_data = user_data; @@ -336,14 +376,17 @@ #if !FFI_NO_RAW_API ffi_status -ffi_prep_raw_closure (ffi_raw_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*,void*,ffi_raw*,void*), - void *user_data) +ffi_prep_raw_closure_loc (ffi_raw_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*,void*,ffi_raw*,void*), + void *user_data, + void *codeloc) { int i; - FFI_ASSERT (cif->abi == FFI_SYSV); + if (cif->abi != FFI_SYSV) { + return FFI_BAD_ABI; + } // we currently don't support certain kinds of arguments for raw // closures. This should be implemented by a separate assembly language @@ -358,7 +401,7 @@ FFI_INIT_TRAMPOLINE (&closure->tramp[0], &ffi_closure_raw_SYSV, - (void*)closure); + codeloc); closure->cif = cif; closure->user_data = user_data; diff -rNu smalltalk-3.0.2/libffi/src/x86/ffi64.c smalltalk-3.0.3/libffi/src/x86/ffi64.c --- smalltalk-3.0.2/libffi/src/x86/ffi64.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/x86/ffi64.c 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------- - ffi.c - Copyright (c) 2002 Bo Thorsen + ffi.c - Copyright (c) 2002, 2007 Bo Thorsen x86-64 Foreign Function Interface @@ -14,13 +14,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ #include @@ -433,10 +434,11 @@ extern void ffi_closure_unix64(void); ffi_status -ffi_prep_closure (ffi_closure* closure, - ffi_cif* cif, - void (*fun)(ffi_cif*, void*, void**, void*), - void *user_data) +ffi_prep_closure_loc (ffi_closure* closure, + ffi_cif* cif, + void (*fun)(ffi_cif*, void*, void**, void*), + void *user_data, + void *codeloc) { volatile unsigned short *tramp; @@ -445,7 +447,7 @@ tramp[0] = 0xbb49; /* mov , %r11 */ *(void * volatile *) &tramp[1] = ffi_closure_unix64; tramp[5] = 0xba49; /* mov , %r10 */ - *(void * volatile *) &tramp[6] = closure; + *(void * volatile *) &tramp[6] = codeloc; /* Set the carry bit iff the function uses any sse registers. This is clc or stc, together with the first byte of the jmp. */ diff -rNu smalltalk-3.0.2/libffi/src/x86/ffitarget.h smalltalk-3.0.3/libffi/src/x86/ffitarget.h --- smalltalk-3.0.2/libffi/src/x86/ffitarget.h 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/x86/ffitarget.h 2008-04-10 11:10:57.000000000 +0200 @@ -1,5 +1,7 @@ /* -----------------------------------------------------------------*-C-*- ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + Copyright (C) 2008 Free Software Foundation, Inc. + Target configuration macros for x86 and x86-64. Permission is hereby granted, free of charge, to any person obtaining @@ -13,13 +15,14 @@ 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 CYGNUS SOLUTIONS 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. + 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. ----------------------------------------------------------------------- */ @@ -68,12 +71,18 @@ /* ---- Definitions for closures ----------------------------------------- */ #define FFI_CLOSURES 1 +#define FFI_TYPE_SMALL_STRUCT_1B (FFI_TYPE_LAST + 1) +#define FFI_TYPE_SMALL_STRUCT_2B (FFI_TYPE_LAST + 2) -#ifdef X86_64 +#if defined (X86_64) || (defined (__x86_64__) && defined (X86_DARWIN)) #define FFI_TRAMPOLINE_SIZE 24 #define FFI_NATIVE_RAW_API 0 #else +#ifdef X86_WIN32 +#define FFI_TRAMPOLINE_SIZE 13 +#else #define FFI_TRAMPOLINE_SIZE 10 +#endif #define FFI_NATIVE_RAW_API 1 /* x86 has native raw api support */ #endif diff -rNu smalltalk-3.0.2/libffi/src/x86/freebsd.S smalltalk-3.0.3/libffi/src/x86/freebsd.S --- smalltalk-3.0.2/libffi/src/x86/freebsd.S 1970-01-01 01:00:00.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/x86/freebsd.S 2008-04-10 11:10:57.000000000 +0200 @@ -0,0 +1,458 @@ +/* ----------------------------------------------------------------------- + freebsd.S - Copyright (c) 1996, 1998, 2001, 2002, 2003, 2005 Red Hat, Inc. + Copyright (c) 2008 Björn König + + X86 Foreign Function Interface for FreeBSD + + 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. +----------------------------------------------------------------------- */ + +#ifndef __x86_64__ + +#define LIBFFI_ASM +#include +#include + +.text + +.globl ffi_prep_args + + .align 4 +.globl ffi_call_SYSV + .type ffi_call_SYSV,@function + +ffi_call_SYSV: +.LFB1: + pushl %ebp +.LCFI0: + movl %esp,%ebp +.LCFI1: + /* Make room for all of the new args. */ + movl 16(%ebp),%ecx + subl %ecx,%esp + + movl %esp,%eax + + /* Place all of the ffi_prep_args in position */ + pushl 12(%ebp) + pushl %eax + call *8(%ebp) + + /* Return stack to previous state and call the function */ + addl $8,%esp + + call *28(%ebp) + + /* Load %ecx with the return type code */ + movl 20(%ebp),%ecx + + /* Protect %esi. We're going to pop it in the epilogue. */ + pushl %esi + + /* If the return value pointer is NULL, assume no return value. */ + cmpl $0,24(%ebp) + jne 0f + + /* Even if there is no space for the return value, we are + obliged to handle floating-point values. */ + cmpl $FFI_TYPE_FLOAT,%ecx + jne noretval + fstp %st(0) + + jmp epilogue + +0: + call 1f + +.Lstore_table: + .long noretval-.Lstore_table /* FFI_TYPE_VOID */ + .long retint-.Lstore_table /* FFI_TYPE_INT */ + .long retfloat-.Lstore_table /* FFI_TYPE_FLOAT */ + .long retdouble-.Lstore_table /* FFI_TYPE_DOUBLE */ + .long retlongdouble-.Lstore_table /* FFI_TYPE_LONGDOUBLE */ + .long retuint8-.Lstore_table /* FFI_TYPE_UINT8 */ + .long retsint8-.Lstore_table /* FFI_TYPE_SINT8 */ + .long retuint16-.Lstore_table /* FFI_TYPE_UINT16 */ + .long retsint16-.Lstore_table /* FFI_TYPE_SINT16 */ + .long retint-.Lstore_table /* FFI_TYPE_UINT32 */ + .long retint-.Lstore_table /* FFI_TYPE_SINT32 */ + .long retint64-.Lstore_table /* FFI_TYPE_UINT64 */ + .long retint64-.Lstore_table /* FFI_TYPE_SINT64 */ + .long retstruct-.Lstore_table /* FFI_TYPE_STRUCT */ + .long retint-.Lstore_table /* FFI_TYPE_POINTER */ + .long retstruct1b-.Lstore_table /* FFI_TYPE_SMALL_STRUCT_1B */ + .long retstruct2b-.Lstore_table /* FFI_TYPE_SMALL_STRUCT_2B */ + +1: + pop %esi + add (%esi, %ecx, 4), %esi + jmp *%esi + + /* Sign/zero extend as appropriate. */ +retsint8: + movsbl %al, %eax + jmp retint + +retsint16: + movswl %ax, %eax + jmp retint + +retuint8: + movzbl %al, %eax + jmp retint + +retuint16: + movzwl %ax, %eax + jmp retint + +retfloat: + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + fstps (%ecx) + jmp epilogue + +retdouble: + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + fstpl (%ecx) + jmp epilogue + +retlongdouble: + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + fstpt (%ecx) + jmp epilogue + +retint64: + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + movl %eax,0(%ecx) + movl %edx,4(%ecx) + jmp epilogue + +retstruct1b: + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + movb %al,0(%ecx) + jmp epilogue + +retstruct2b: + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + movw %ax,0(%ecx) + jmp epilogue + +retint: + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + movl %eax,0(%ecx) + +retstruct: + /* Nothing to do! */ + +noretval: +epilogue: + popl %esi + movl %ebp,%esp + popl %ebp + ret +.LFE1: +.ffi_call_SYSV_end: + .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV + + .align 4 +FFI_HIDDEN (ffi_closure_SYSV) +.globl ffi_closure_SYSV + .type ffi_closure_SYSV, @function + +ffi_closure_SYSV: +.LFB2: + pushl %ebp +.LCFI2: + movl %esp, %ebp +.LCFI3: + subl $40, %esp + leal -24(%ebp), %edx + movl %edx, -12(%ebp) /* resp */ + leal 8(%ebp), %edx + movl %edx, 4(%esp) /* args = __builtin_dwarf_cfa () */ + leal -12(%ebp), %edx + movl %edx, (%esp) /* &resp */ +#if defined HAVE_HIDDEN_VISIBILITY_ATTRIBUTE || !defined __PIC__ + call ffi_closure_SYSV_inner +#else + movl %ebx, 8(%esp) +.LCFI7: + call 1f +1: popl %ebx + addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx + call ffi_closure_SYSV_inner@PLT + movl 8(%esp), %ebx +#endif + movl -12(%ebp), %ecx + cmpl $FFI_TYPE_INT, %eax + je .Lcls_retint + + /* Handle FFI_TYPE_UINT8, FFI_TYPE_SINT8, FFI_TYPE_UINT16, + FFI_TYPE_SINT16, FFI_TYPE_UINT32, FFI_TYPE_SINT32. */ + cmpl $FFI_TYPE_UINT64, %eax + jge 0f + cmpl $FFI_TYPE_UINT8, %eax + jge .Lcls_retint + +0: cmpl $FFI_TYPE_FLOAT, %eax + je .Lcls_retfloat + cmpl $FFI_TYPE_DOUBLE, %eax + je .Lcls_retdouble + cmpl $FFI_TYPE_LONGDOUBLE, %eax + je .Lcls_retldouble + cmpl $FFI_TYPE_SINT64, %eax + je .Lcls_retllong + cmpl $FFI_TYPE_SMALL_STRUCT_1B, %eax + je .Lcls_retstruct1b + cmpl $FFI_TYPE_SMALL_STRUCT_2B, %eax + je .Lcls_retstruct2b + cmpl $FFI_TYPE_STRUCT, %eax + je .Lcls_retstruct +.Lcls_epilogue: + movl %ebp, %esp + popl %ebp + ret +.Lcls_retint: + movl (%ecx), %eax + jmp .Lcls_epilogue +.Lcls_retfloat: + flds (%ecx) + jmp .Lcls_epilogue +.Lcls_retdouble: + fldl (%ecx) + jmp .Lcls_epilogue +.Lcls_retldouble: + fldt (%ecx) + jmp .Lcls_epilogue +.Lcls_retllong: + movl (%ecx), %eax + movl 4(%ecx), %edx + jmp .Lcls_epilogue +.Lcls_retstruct1b: + movsbl (%ecx), %eax + jmp .Lcls_epilogue +.Lcls_retstruct2b: + movswl (%ecx), %eax + jmp .Lcls_epilogue +.Lcls_retstruct: + movl %ebp, %esp + popl %ebp + ret $4 +.LFE2: + .size ffi_closure_SYSV, .-ffi_closure_SYSV + +#if !FFI_NO_RAW_API + +#define RAW_CLOSURE_CIF_OFFSET ((FFI_TRAMPOLINE_SIZE + 3) & ~3) +#define RAW_CLOSURE_FUN_OFFSET (RAW_CLOSURE_CIF_OFFSET + 4) +#define RAW_CLOSURE_USER_DATA_OFFSET (RAW_CLOSURE_FUN_OFFSET + 4) +#define CIF_FLAGS_OFFSET 20 + + .align 4 +FFI_HIDDEN (ffi_closure_raw_SYSV) +.globl ffi_closure_raw_SYSV + .type ffi_closure_raw_SYSV, @function + +ffi_closure_raw_SYSV: +.LFB3: + pushl %ebp +.LCFI4: + movl %esp, %ebp +.LCFI5: + pushl %esi +.LCFI6: + subl $36, %esp + movl RAW_CLOSURE_CIF_OFFSET(%eax), %esi /* closure->cif */ + movl RAW_CLOSURE_USER_DATA_OFFSET(%eax), %edx /* closure->user_data */ + movl %edx, 12(%esp) /* user_data */ + leal 8(%ebp), %edx /* __builtin_dwarf_cfa () */ + movl %edx, 8(%esp) /* raw_args */ + leal -24(%ebp), %edx + movl %edx, 4(%esp) /* &res */ + movl %esi, (%esp) /* cif */ + call *RAW_CLOSURE_FUN_OFFSET(%eax) /* closure->fun */ + movl CIF_FLAGS_OFFSET(%esi), %eax /* rtype */ + cmpl $FFI_TYPE_INT, %eax + je .Lrcls_retint + + /* Handle FFI_TYPE_UINT8, FFI_TYPE_SINT8, FFI_TYPE_UINT16, + FFI_TYPE_SINT16, FFI_TYPE_UINT32, FFI_TYPE_SINT32. */ + cmpl $FFI_TYPE_UINT64, %eax + jge 0f + cmpl $FFI_TYPE_UINT8, %eax + jge .Lrcls_retint +0: + cmpl $FFI_TYPE_FLOAT, %eax + je .Lrcls_retfloat + cmpl $FFI_TYPE_DOUBLE, %eax + je .Lrcls_retdouble + cmpl $FFI_TYPE_LONGDOUBLE, %eax + je .Lrcls_retldouble + cmpl $FFI_TYPE_SINT64, %eax + je .Lrcls_retllong +.Lrcls_epilogue: + addl $36, %esp + popl %esi + popl %ebp + ret +.Lrcls_retint: + movl -24(%ebp), %eax + jmp .Lrcls_epilogue +.Lrcls_retfloat: + flds -24(%ebp) + jmp .Lrcls_epilogue +.Lrcls_retdouble: + fldl -24(%ebp) + jmp .Lrcls_epilogue +.Lrcls_retldouble: + fldt -24(%ebp) + jmp .Lrcls_epilogue +.Lrcls_retllong: + movl -24(%ebp), %eax + movl -20(%ebp), %edx + jmp .Lrcls_epilogue +.LFE3: + .size ffi_closure_raw_SYSV, .-ffi_closure_raw_SYSV +#endif + + .section .eh_frame,EH_FRAME_FLAGS,@progbits +.Lframe1: + .long .LECIE1-.LSCIE1 /* Length of Common Information Entry */ +.LSCIE1: + .long 0x0 /* CIE Identifier Tag */ + .byte 0x1 /* CIE Version */ +#ifdef __PIC__ + .ascii "zR\0" /* CIE Augmentation */ +#else + .ascii "\0" /* CIE Augmentation */ +#endif + .byte 0x1 /* .uleb128 0x1; CIE Code Alignment Factor */ + .byte 0x7c /* .sleb128 -4; CIE Data Alignment Factor */ + .byte 0x8 /* CIE RA Column */ +#ifdef __PIC__ + .byte 0x1 /* .uleb128 0x1; Augmentation size */ + .byte 0x1b /* FDE Encoding (pcrel sdata4) */ +#endif + .byte 0xc /* DW_CFA_def_cfa */ + .byte 0x4 /* .uleb128 0x4 */ + .byte 0x4 /* .uleb128 0x4 */ + .byte 0x88 /* DW_CFA_offset, column 0x8 */ + .byte 0x1 /* .uleb128 0x1 */ + .align 4 +.LECIE1: +.LSFDE1: + .long .LEFDE1-.LASFDE1 /* FDE Length */ +.LASFDE1: + .long .LASFDE1-.Lframe1 /* FDE CIE offset */ +#ifdef __PIC__ + .long .LFB1-. /* FDE initial location */ +#else + .long .LFB1 /* FDE initial location */ +#endif + .long .LFE1-.LFB1 /* FDE address range */ +#ifdef __PIC__ + .byte 0x0 /* .uleb128 0x0; Augmentation size */ +#endif + .byte 0x4 /* DW_CFA_advance_loc4 */ + .long .LCFI0-.LFB1 + .byte 0xe /* DW_CFA_def_cfa_offset */ + .byte 0x8 /* .uleb128 0x8 */ + .byte 0x85 /* DW_CFA_offset, column 0x5 */ + .byte 0x2 /* .uleb128 0x2 */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .long .LCFI1-.LCFI0 + .byte 0xd /* DW_CFA_def_cfa_register */ + .byte 0x5 /* .uleb128 0x5 */ + .align 4 +.LEFDE1: +.LSFDE2: + .long .LEFDE2-.LASFDE2 /* FDE Length */ +.LASFDE2: + .long .LASFDE2-.Lframe1 /* FDE CIE offset */ +#ifdef __PIC__ + .long .LFB2-. /* FDE initial location */ +#else + .long .LFB2 +#endif + .long .LFE2-.LFB2 /* FDE address range */ +#ifdef __PIC__ + .byte 0x0 /* .uleb128 0x0; Augmentation size */ +#endif + .byte 0x4 /* DW_CFA_advance_loc4 */ + .long .LCFI2-.LFB2 + .byte 0xe /* DW_CFA_def_cfa_offset */ + .byte 0x8 /* .uleb128 0x8 */ + .byte 0x85 /* DW_CFA_offset, column 0x5 */ + .byte 0x2 /* .uleb128 0x2 */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .long .LCFI3-.LCFI2 + .byte 0xd /* DW_CFA_def_cfa_register */ + .byte 0x5 /* .uleb128 0x5 */ +#if !defined HAVE_HIDDEN_VISIBILITY_ATTRIBUTE && defined __PIC__ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .long .LCFI7-.LCFI3 + .byte 0x83 /* DW_CFA_offset, column 0x3 */ + .byte 0xa /* .uleb128 0xa */ +#endif + .align 4 +.LEFDE2: + +#if !FFI_NO_RAW_API + +.LSFDE3: + .long .LEFDE3-.LASFDE3 /* FDE Length */ +.LASFDE3: + .long .LASFDE3-.Lframe1 /* FDE CIE offset */ +#ifdef __PIC__ + .long .LFB3-. /* FDE initial location */ +#else + .long .LFB3 +#endif + .long .LFE3-.LFB3 /* FDE address range */ +#ifdef __PIC__ + .byte 0x0 /* .uleb128 0x0; Augmentation size */ +#endif + .byte 0x4 /* DW_CFA_advance_loc4 */ + .long .LCFI4-.LFB3 + .byte 0xe /* DW_CFA_def_cfa_offset */ + .byte 0x8 /* .uleb128 0x8 */ + .byte 0x85 /* DW_CFA_offset, column 0x5 */ + .byte 0x2 /* .uleb128 0x2 */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .long .LCFI5-.LCFI4 + .byte 0xd /* DW_CFA_def_cfa_register */ + .byte 0x5 /* .uleb128 0x5 */ + .byte 0x4 /* DW_CFA_advance_loc4 */ + .long .LCFI6-.LCFI5 + .byte 0x86 /* DW_CFA_offset, column 0x6 */ + .byte 0x3 /* .uleb128 0x3 */ + .align 4 +.LEFDE3: + +#endif + +#endif /* ifndef __x86_64__ */ diff -rNu smalltalk-3.0.2/libffi/src/x86/sysv.S smalltalk-3.0.3/libffi/src/x86/sysv.S --- smalltalk-3.0.2/libffi/src/x86/sysv.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/x86/sysv.S 2008-04-10 11:10:57.000000000 +0200 @@ -17,7 +17,8 @@ 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 CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + 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. @@ -59,16 +60,15 @@ call *28(%ebp) - /* Remove the space we pushed for the args */ - movl 16(%ebp),%ecx - addl %ecx,%esp - /* Load %ecx with the return type code */ movl 20(%ebp),%ecx + /* Protect %esi. We're going to pop it in the epilogue. */ + pushl %esi + /* If the return value pointer is NULL, assume no return value. */ cmpl $0,24(%ebp) - jne retint + jne 0f /* Even if there is no space for the return value, we are obliged to handle floating-point values. */ @@ -78,51 +78,84 @@ jmp epilogue -retint: - cmpl $FFI_TYPE_INT,%ecx - jne retfloat - /* Load %ecx with the pointer to storage for the return value */ - movl 24(%ebp),%ecx - movl %eax,0(%ecx) - jmp epilogue +0: + call 1f + +.Lstore_table: + .long noretval-.Lstore_table /* FFI_TYPE_VOID */ + .long retint-.Lstore_table /* FFI_TYPE_INT */ + .long retfloat-.Lstore_table /* FFI_TYPE_FLOAT */ + .long retdouble-.Lstore_table /* FFI_TYPE_DOUBLE */ + .long retlongdouble-.Lstore_table /* FFI_TYPE_LONGDOUBLE */ + .long retuint8-.Lstore_table /* FFI_TYPE_UINT8 */ + .long retsint8-.Lstore_table /* FFI_TYPE_SINT8 */ + .long retuint16-.Lstore_table /* FFI_TYPE_UINT16 */ + .long retsint16-.Lstore_table /* FFI_TYPE_SINT16 */ + .long retint-.Lstore_table /* FFI_TYPE_UINT32 */ + .long retint-.Lstore_table /* FFI_TYPE_SINT32 */ + .long retint64-.Lstore_table /* FFI_TYPE_UINT64 */ + .long retint64-.Lstore_table /* FFI_TYPE_SINT64 */ + .long retstruct-.Lstore_table /* FFI_TYPE_STRUCT */ + .long retint-.Lstore_table /* FFI_TYPE_POINTER */ + +1: + pop %esi + add (%esi, %ecx, 4), %esi + jmp *%esi + + /* Sign/zero extend as appropriate. */ +retsint8: + movsbl %al, %eax + jmp retint + +retsint16: + movswl %ax, %eax + jmp retint + +retuint8: + movzbl %al, %eax + jmp retint + +retuint16: + movzwl %ax, %eax + jmp retint retfloat: - cmpl $FFI_TYPE_FLOAT,%ecx - jne retdouble /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx fstps (%ecx) jmp epilogue retdouble: - cmpl $FFI_TYPE_DOUBLE,%ecx - jne retlongdouble /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx fstpl (%ecx) jmp epilogue retlongdouble: - cmpl $FFI_TYPE_LONGDOUBLE,%ecx - jne retint64 /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx fstpt (%ecx) jmp epilogue retint64: - cmpl $FFI_TYPE_SINT64,%ecx - jne retstruct /* Load %ecx with the pointer to storage for the return value */ movl 24(%ebp),%ecx movl %eax,0(%ecx) movl %edx,4(%ecx) + jmp epilogue +retint: + /* Load %ecx with the pointer to storage for the return value */ + movl 24(%ebp),%ecx + movl %eax,0(%ecx) + retstruct: /* Nothing to do! */ noretval: epilogue: + popl %esi movl %ebp,%esp popl %ebp ret @@ -162,7 +195,15 @@ movl -12(%ebp), %ecx cmpl $FFI_TYPE_INT, %eax je .Lcls_retint - cmpl $FFI_TYPE_FLOAT, %eax + + /* Handle FFI_TYPE_UINT8, FFI_TYPE_SINT8, FFI_TYPE_UINT16, + FFI_TYPE_SINT16, FFI_TYPE_UINT32, FFI_TYPE_SINT32. */ + cmpl $FFI_TYPE_UINT64, %eax + jge 0f + cmpl $FFI_TYPE_UINT8, %eax + jge .Lcls_retint + +0: cmpl $FFI_TYPE_FLOAT, %eax je .Lcls_retfloat cmpl $FFI_TYPE_DOUBLE, %eax je .Lcls_retdouble @@ -170,6 +211,8 @@ je .Lcls_retldouble cmpl $FFI_TYPE_SINT64, %eax je .Lcls_retllong + cmpl $FFI_TYPE_STRUCT, %eax + je .Lcls_retstruct .Lcls_epilogue: movl %ebp, %esp popl %ebp @@ -190,6 +233,10 @@ movl (%ecx), %eax movl 4(%ecx), %edx jmp .Lcls_epilogue +.Lcls_retstruct: + movl %ebp, %esp + popl %ebp + ret $4 .LFE2: .size ffi_closure_SYSV, .-ffi_closure_SYSV @@ -226,6 +273,14 @@ movl CIF_FLAGS_OFFSET(%esi), %eax /* rtype */ cmpl $FFI_TYPE_INT, %eax je .Lrcls_retint + + /* Handle FFI_TYPE_UINT8, FFI_TYPE_SINT8, FFI_TYPE_UINT16, + FFI_TYPE_SINT16, FFI_TYPE_UINT32, FFI_TYPE_SINT32. */ + cmpl $FFI_TYPE_UINT64, %eax + jge 0f + cmpl $FFI_TYPE_UINT8, %eax + jge .Lrcls_retint +0: cmpl $FFI_TYPE_FLOAT, %eax je .Lrcls_retfloat cmpl $FFI_TYPE_DOUBLE, %eax @@ -376,9 +431,3 @@ #endif #endif /* ifndef __x86_64__ */ - - -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif - diff -rNu smalltalk-3.0.2/libffi/src/x86/unix64.S smalltalk-3.0.3/libffi/src/x86/unix64.S --- smalltalk-3.0.2/libffi/src/x86/unix64.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/x86/unix64.S 2008-04-10 11:10:57.000000000 +0200 @@ -17,7 +17,8 @@ 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 CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + 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. @@ -410,9 +411,3 @@ .LEFDE3: #endif /* __x86_64__ */ - - -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif - diff -rNu smalltalk-3.0.2/libffi/src/x86/win32.S smalltalk-3.0.3/libffi/src/x86/win32.S --- smalltalk-3.0.2/libffi/src/x86/win32.S 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libffi/src/x86/win32.S 2008-04-10 11:10:57.000000000 +0200 @@ -20,7 +20,8 @@ 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 CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + 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. @@ -258,6 +259,22 @@ .ffi_call_STDCALL_end: + .globl _ffi_closure_STDCALL +_ffi_closure_STDCALL: + pushl %ebp + movl %esp, %ebp + subl $40, %esp + leal -24(%ebp), %edx + movl %edx, -12(%ebp) /* resp */ + leal 12(%ebp), %edx /* account for stub return address on stack */ + movl %edx, 4(%esp) /* args */ + leal -12(%ebp), %edx + movl %edx, (%esp) /* &resp */ + call _ffi_closure_SYSV_inner + movl -12(%ebp), %ecx + jmp .Lcls_return_result +.ffi_closure_STDCALL_end: + .globl _ffi_closure_SYSV _ffi_closure_SYSV: pushl %ebp @@ -271,6 +288,7 @@ movl %edx, (%esp) /* &resp */ call _ffi_closure_SYSV_inner movl -12(%ebp), %ecx +.Lcls_return_result: cmpl $FFI_TYPE_INT, %eax je .Lcls_retint cmpl $FFI_TYPE_FLOAT, %eax diff -rNu smalltalk-3.0.2/libgst/ChangeLog smalltalk-3.0.3/libgst/ChangeLog --- smalltalk-3.0.2/libgst/ChangeLog 2008-03-07 11:53:44.000000000 +0100 +++ smalltalk-3.0.3/libgst/ChangeLog 2008-05-14 12:02:33.000000000 +0200 @@ -1,3 +1,23 @@ +2008-05-14 Paolo Bonzini + + * libgst/oop.c: Add ephemerons to buffer before marking their class + (else, if the class actually has to be marked, we won't add them to the + buffer at all). + +2008-03-25 Paolo Bonzini + + * libgst/prims.def: Make #fileIn primitive fail if the filename is bad. + +2008-03-19 Paolo Bonzini + + * libgst/prims.def: Mark VMpr_Process_suspend as a possible + source of interrupts. + +2008-03-19 Paolo Bonzini + + * libgst/files.c: Load BlockClosure before the first closures + are executed (by the JIT). + 2008-03-04 Paolo Bonzini * libgst/prims.def: Avoid mixed declarations and code. diff -rNu smalltalk-3.0.2/libgst/Makefile.am smalltalk-3.0.3/libgst/Makefile.am --- smalltalk-3.0.2/libgst/Makefile.am 2008-03-07 11:53:44.000000000 +0100 +++ smalltalk-3.0.3/libgst/Makefile.am 2008-05-14 12:02:33.000000000 +0200 @@ -7,19 +7,14 @@ AM_CPPFLAGS = -DKERNEL_PATH=\"$(pkgdatadir)/kernel\" \ -DIMAGE_PATH=\"$(imagedir)\" -DMODULE_PATH=\"$(pkglibdir)\" \ -DLIBEXEC_PATH=\"$(libexecdir)/$(PACKAGE)\" \ - -I$(top_srcdir)/lib-src -I$(top_srcdir)/libffi/include \ - -I$(top_builddir)/libffi/include $(INCLIGHTNING) \ - @INCSNPRINTFV@ $(INCSIGSEGV) -I$(top_builddir)/lib-src + -I$(top_srcdir)/lib-src $(INCFFI) $(INCLIGHTNING) \ + $(INCSNPRINTFV) $(INCSIGSEGV) -I$(top_builddir)/lib-src if !HAVE_INSTALLED_LIGHTNING AM_CPPFLAGS += -I$(top_srcdir)/lightning -I$(top_builddir)/lightning \ -I$(top_srcdir) -I$(top_builddir) endif -if HAVE_SIGSEGV -AM_CPPFLAGS += -I$(top_srcdir)/sigsegv/src -I$(top_builddir)/sigsegv/src -endif - include_HEADERS = gstpub.h gst.h lib_LTLIBRARIES = libgst.la EXTRA_PROGRAMS = genprims genbc genvm @@ -28,15 +23,9 @@ # definitions for libgst.la libgst_la_LIBADD=$(top_builddir)/lib-src/library.la \ - $(top_builddir)/libffi/libffi.la @LIBSNPRINTFV@ @LIBREADLINE@ @LIBGMP@ + $(LIBSIGSEGV) $(LIBFFI) $(LIBSNPRINTFV) $(LIBREADLINE) $(LIBGMP) -libgst_la_DEPENDENCIES=$(top_builddir)/lib-src/library.la \ - $(top_builddir)/libffi/libffi.la @LIBSNPRINTFV@ - -if HAVE_SIGSEGV -libgst_la_LIBADD += $(top_builddir)/sigsegv/src/libsigsegv.la -libgst_la_DEPENDENCIES += $(top_builddir)/sigsegv/src/libsigsegv.la -endif +libgst_la_DEPENDENCIES=$(top_builddir)/lib-src/library.la @LIBSNPRINTFV@ libgst_la_LDFLAGS = -version-info $(VERSION_INFO) -no-undefined \ -export-symbols-regex "^gst_.*" diff -rNu smalltalk-3.0.2/libgst/Makefile.in smalltalk-3.0.3/libgst/Makefile.in --- smalltalk-3.0.2/libgst/Makefile.in 2008-03-07 11:54:39.000000000 +0100 +++ smalltalk-3.0.3/libgst/Makefile.in 2008-05-14 12:04:45.000000000 +0200 @@ -41,10 +41,7 @@ @HAVE_INSTALLED_LIGHTNING_FALSE@am__append_1 = -I$(top_srcdir)/lightning -I$(top_builddir)/lightning \ @HAVE_INSTALLED_LIGHTNING_FALSE@ -I$(top_srcdir) -I$(top_builddir) -@HAVE_SIGSEGV_TRUE@am__append_2 = -I$(top_srcdir)/sigsegv/src -I$(top_builddir)/sigsegv/src EXTRA_PROGRAMS = genprims$(EXEEXT) genbc$(EXEEXT) genvm$(EXEEXT) -@HAVE_SIGSEGV_TRUE@am__append_3 = $(top_builddir)/sigsegv/src/libsigsegv.la -@HAVE_SIGSEGV_TRUE@am__append_4 = $(top_builddir)/sigsegv/src/libsigsegv.la subdir = libgst DIST_COMMON = $(dist_noinst_DATA) $(include_HEADERS) $(noinst_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog \ @@ -100,8 +97,7 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) -@HAVE_SIGSEGV_TRUE@am__DEPENDENCIES_1 = \ -@HAVE_SIGSEGV_TRUE@ $(top_builddir)/sigsegv/src/libsigsegv.la +am__DEPENDENCIES_1 = am_libgst_la_OBJECTS = gstpub.lo files.lo gst-parse.lo lex.lo str.lo \ tree.lo byte.lo comp.lo sym.lo dict.lo oop.lo opt.lo save.lo \ cint.lo heap.lo input.lo sysdep.lo callin.lo xlat.lo events.lo \ @@ -182,6 +178,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -194,10 +192,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -212,12 +210,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ --tag=LIBGST @@ -311,21 +311,18 @@ AM_CPPFLAGS = -DKERNEL_PATH=\"$(pkgdatadir)/kernel\" \ -DIMAGE_PATH=\"$(imagedir)\" -DMODULE_PATH=\"$(pkglibdir)\" \ -DLIBEXEC_PATH=\"$(libexecdir)/$(PACKAGE)\" \ - -I$(top_srcdir)/lib-src -I$(top_srcdir)/libffi/include \ - -I$(top_builddir)/libffi/include $(INCLIGHTNING) \ - @INCSNPRINTFV@ $(INCSIGSEGV) -I$(top_builddir)/lib-src \ - $(am__append_1) $(am__append_2) + -I$(top_srcdir)/lib-src $(INCFFI) $(INCLIGHTNING) \ + $(INCSNPRINTFV) $(INCSIGSEGV) -I$(top_builddir)/lib-src \ + $(am__append_1) include_HEADERS = gstpub.h gst.h lib_LTLIBRARIES = libgst.la CLEANFILES = genprims$(EXEEXT) genbc$(EXEEXT) genvm$(EXEEXT) # definitions for libgst.la libgst_la_LIBADD = $(top_builddir)/lib-src/library.la \ - $(top_builddir)/libffi/libffi.la @LIBSNPRINTFV@ @LIBREADLINE@ \ - @LIBGMP@ $(am__append_3) -libgst_la_DEPENDENCIES = $(top_builddir)/lib-src/library.la \ - $(top_builddir)/libffi/libffi.la @LIBSNPRINTFV@ \ - $(am__append_4) + $(LIBSIGSEGV) $(LIBFFI) $(LIBSNPRINTFV) $(LIBREADLINE) $(LIBGMP) + +libgst_la_DEPENDENCIES = $(top_builddir)/lib-src/library.la @LIBSNPRINTFV@ libgst_la_LDFLAGS = -version-info $(VERSION_INFO) -no-undefined \ -export-symbols-regex "^gst_.*" diff -rNu smalltalk-3.0.2/libgst/files.c smalltalk-3.0.3/libgst/files.c --- smalltalk-3.0.2/libgst/files.c 2008-01-22 11:14:32.000000000 +0100 +++ smalltalk-3.0.3/libgst/files.c 2008-05-14 12:02:33.000000000 +0200 @@ -231,14 +231,14 @@ "ProcSched.st\0" "Delay.st\0" "SharedQueue.st\0" - "Behavior.st\0" - "ClassDesc.st\0" - "Class.st\0" - "Metaclass.st\0" "ContextPart.st\0" "MthContext.st\0" "BlkContext.st\0" "BlkClosure.st\0" + "Behavior.st\0" + "ClassDesc.st\0" + "Class.st\0" + "Metaclass.st\0" "Continuation.st\0" "Memory.st\0" "MethodInfo.st\0" diff -rNu smalltalk-3.0.2/libgst/oop.c smalltalk-3.0.3/libgst/oop.c --- smalltalk-3.0.2/libgst/oop.c 2008-02-14 14:26:15.000000000 +0100 +++ smalltalk-3.0.3/libgst/oop.c 2008-05-14 11:24:36.000000000 +0200 @@ -2197,14 +2197,14 @@ } else if UNCOMMON (oop->flags & (F_EPHEMERON | F_WEAK)) { + if (oop->flags & F_EPHEMERON) + _gst_add_buf_pointer (oop); + /* In general, there will be many instances of a class, but only the first time will it be unmarked. So I'm marking this as uncommon. */ if UNCOMMON (!IS_OOP_MARKED (objClass)) TAIL_MARK_OOP (objClass); - - if (oop->flags & F_EPHEMERON) - _gst_add_buf_pointer (oop); } else { diff -rNu smalltalk-3.0.2/libgst/prims.def smalltalk-3.0.3/libgst/prims.def --- smalltalk-3.0.2/libgst/prims.def 2008-03-07 11:53:44.000000000 +0100 +++ smalltalk-3.0.3/libgst/prims.def 2008-05-14 12:02:33.000000000 +0200 @@ -2814,7 +2814,7 @@ } /* Process suspend */ -primitive VMpr_Process_suspend [succeed] +primitive VMpr_Process_suspend [succeed,check_interrupt] { OOP oop1; _gst_primitives_executed++; @@ -5134,9 +5134,10 @@ parse_stream_with_protection (false); _gst_set_undeclared (old); _gst_pop_stream (false); + PRIM_SUCCEEDED; } - PRIM_SUCCEEDED; + PRIM_FAILED; } /* FileDescriptor>>#fileOp..., variadic */ diff -rNu smalltalk-3.0.2/libgst/prims.inl smalltalk-3.0.3/libgst/prims.inl --- smalltalk-3.0.2/libgst/prims.inl 2008-03-07 11:57:51.000000000 +0100 +++ smalltalk-3.0.3/libgst/prims.inl 2008-05-14 12:13:05.000000000 +0200 @@ -6411,9 +6411,10 @@ parse_stream_with_protection (false); _gst_set_undeclared (old); _gst_pop_stream (false); + PRIM_SUCCEEDED; } - PRIM_SUCCEEDED; + PRIM_FAILED; } /* FileDescriptor>>#fileOp..., variadic */ @@ -6421,7 +6422,7 @@ intptr_t VMpr_FileDescriptor_fileOp (int id, volatile int numArgs) -#line 5145 "prims.def" +#line 5146 "prims.def" { char *fileName, *fileName2; gst_file_stream fileStream; @@ -6804,7 +6805,7 @@ intptr_t VMpr_FileDescriptor_socketOp (int id, volatile int numArgs) -#line 5525 "prims.def" +#line 5526 "prims.def" { gst_file_stream fileStream; int fd; @@ -6947,7 +6948,7 @@ intptr_t VMpr_CFuncDescriptor_asyncCall (int id, volatile int numArgs) -#line 5665 "prims.def" +#line 5666 "prims.def" { volatile OOP result = NULL; volatile gst_method_context context; @@ -6988,7 +6989,7 @@ intptr_t VMpr_CFuncDescriptor_call (int id, volatile int numArgs) -#line 5703 "prims.def" +#line 5704 "prims.def" { volatile OOP result = NULL; /* initialize to please GCC */ volatile gst_method_context context; @@ -7046,7 +7047,7 @@ intptr_t VMpr_Object_makeEphemeron (int id, volatile int numArgs) -#line 5758 "prims.def" +#line 5759 "prims.def" { _gst_primitives_executed++; if (NUM_OOPS (OOP_TO_OBJ (STACKTOP ())) == 0) @@ -7060,7 +7061,7 @@ intptr_t VMpr_Namespace_setCurrent (int id, volatile int numArgs) -#line 5769 "prims.def" +#line 5770 "prims.def" { OOP oop1; @@ -7078,7 +7079,7 @@ intptr_t VMpr_ObjectMemory_gcPrimitives (int id, volatile int numArgs) -#line 5789 "prims.def" +#line 5790 "prims.def" { _gst_primitives_executed++; switch (id) @@ -7122,8 +7123,8 @@ } unsigned char -_gst_primitives_md5[16] = { 247, 178, 139, 173, 245, 30, 175, 95, - 44, 114, 251, 197, 199, 209, 127, 98 }; +_gst_primitives_md5[16] = { 135, 65, 0, 114, 126, 249, 231, 75, + 218, 74, 152, 173, 5, 120, 123, 212 }; void _gst_init_primitives() @@ -7638,7 +7639,7 @@ _gst_default_primitive_table[127].id = 0; _gst_default_primitive_table[127].func = VMpr_Semaphore_waitAfterSignalling; _gst_default_primitive_table[128].name = "VMpr_Process_suspend"; - _gst_default_primitive_table[128].attributes = PRIM_SUCCEED; + _gst_default_primitive_table[128].attributes = PRIM_SUCCEED | PRIM_CHECK_INTERRUPT; _gst_default_primitive_table[128].id = 0; _gst_default_primitive_table[128].func = VMpr_Process_suspend; _gst_default_primitive_table[129].name = "VMpr_Process_resume"; diff -rNu smalltalk-3.0.2/lightning/Makefile.in smalltalk-3.0.3/lightning/Makefile.in --- smalltalk-3.0.2/lightning/Makefile.in 2008-03-07 11:54:39.000000000 +0100 +++ smalltalk-3.0.3/lightning/Makefile.in 2008-05-14 12:04:46.000000000 +0200 @@ -141,6 +141,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -153,10 +155,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -171,12 +173,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ diff -rNu smalltalk-3.0.2/main.c smalltalk-3.0.3/main.c --- smalltalk-3.0.2/main.c 2008-03-05 14:38:31.000000000 +0100 +++ smalltalk-3.0.3/main.c 2008-05-14 12:02:33.000000000 +0200 @@ -403,7 +403,7 @@ gst_process_stdin (stdin_prompt); if (snapshot_after_load) - gst_msg_sendf (NULL, "%O snapshot: %O", + gst_msg_sendf (NULL, "%v %o snapshot: %o", gst_class_name_to_oop ("ObjectMemory"), gst_str_msg_send (gst_class_name_to_oop ("File"), "image", NULL)); diff -rNu smalltalk-3.0.2/opcode/Makefile.in smalltalk-3.0.3/opcode/Makefile.in --- smalltalk-3.0.2/opcode/Makefile.in 2008-03-07 11:54:40.000000000 +0100 +++ smalltalk-3.0.3/opcode/Makefile.in 2008-05-14 12:04:46.000000000 +0200 @@ -141,6 +141,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -153,10 +155,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -171,12 +173,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ diff -rNu smalltalk-3.0.2/packages/blox/tk/Makefile.in smalltalk-3.0.3/packages/blox/tk/Makefile.in --- smalltalk-3.0.2/packages/blox/tk/Makefile.in 2008-03-07 11:54:40.000000000 +0100 +++ smalltalk-3.0.3/packages/blox/tk/Makefile.in 2008-05-14 12:04:47.000000000 +0200 @@ -148,6 +148,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -160,10 +162,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -178,12 +180,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ diff -rNu smalltalk-3.0.2/packages/dbd-sqlite/ChangeLog smalltalk-3.0.3/packages/dbd-sqlite/ChangeLog --- smalltalk-3.0.2/packages/dbd-sqlite/ChangeLog 2008-03-07 11:53:44.000000000 +0100 +++ smalltalk-3.0.3/packages/dbd-sqlite/ChangeLog 2008-05-14 12:02:33.000000000 +0200 @@ -1,3 +1,11 @@ +2008-03-19 Paolo Bonzini + + * sqlite3.c: Fix GC problems. + +2008-03-15 Paolo Bonzini + + * sqlite3.c: Never call sqlite3_finalize twice. + 2008-02-14 Paolo Bonzini * ResultSet.st: Unshare rows. diff -rNu smalltalk-3.0.2/packages/dbd-sqlite/Makefile.in smalltalk-3.0.3/packages/dbd-sqlite/Makefile.in --- smalltalk-3.0.2/packages/dbd-sqlite/Makefile.in 2008-03-07 11:54:40.000000000 +0100 +++ smalltalk-3.0.3/packages/dbd-sqlite/Makefile.in 2008-05-14 12:04:47.000000000 +0200 @@ -145,6 +145,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -157,10 +159,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -175,12 +177,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ diff -rNu smalltalk-3.0.2/packages/dbd-sqlite/sqlite3.c smalltalk-3.0.3/packages/dbd-sqlite/sqlite3.c --- smalltalk-3.0.2/packages/dbd-sqlite/sqlite3.c 2008-01-22 11:14:33.000000000 +0100 +++ smalltalk-3.0.3/packages/dbd-sqlite/sqlite3.c 2008-04-10 11:10:57.000000000 +0200 @@ -116,29 +116,33 @@ db = (sqlite3 *) vmProxy->OOPToCObject (h->db); rc = sqlite3_prepare (db, sql, -1, &stmt, 0); - tmpOOP = vmProxy->cObjectToOOP (stmt); - h->stmt = tmpOOP; - if (rc != SQLITE_OK) return rc; - cols = sqlite3_column_count (stmt); + tmpOOP = vmProxy->cObjectToOOP (stmt); + h = (SQLite3StmtHandle) OOP_TO_OBJ (self); + h->stmt = tmpOOP; + cols = sqlite3_column_count (stmt); tmpOOP = vmProxy->intToOOP (cols); h->colCount = tmpOOP; tmpOOP = vmProxy->objectAlloc (vmProxy->arrayClass, cols); + h = (SQLite3StmtHandle) OOP_TO_OBJ (self); h->colTypes = tmpOOP; tmpOOP = vmProxy->objectAlloc (vmProxy->arrayClass, cols); + h = (SQLite3StmtHandle) OOP_TO_OBJ (self); h->colNames = tmpOOP; tmpOOP = vmProxy->objectAlloc (vmProxy->arrayClass, cols); + h = (SQLite3StmtHandle) OOP_TO_OBJ (self); h->returnedRow = tmpOOP; for (i = 0; i < cols; i++) { tmpOOP = vmProxy->stringToOOP (sqlite3_column_name (stmt, i)); + h = (SQLite3StmtHandle) OOP_TO_OBJ (self); vmProxy->OOPAtPut (h->colNames, i, tmpOOP); } @@ -153,8 +157,10 @@ SQLite3StmtHandle h; h = (SQLite3StmtHandle) OOP_TO_OBJ (self); - stmt = (sqlite3_stmt *) vmProxy->OOPToCObject (h->stmt); + if (h->stmt == vmProxy->nilOOP) + return SQLITE_MISUSE; + stmt = (sqlite3_stmt *) vmProxy->OOPToCObject (h->stmt); rc = sqlite3_step (stmt); if (rc == SQLITE_ROW) @@ -191,6 +197,7 @@ "returned type not recognized"); } + h = (SQLite3StmtHandle) OOP_TO_OBJ (self); vmProxy->OOPAtPut (h->returnedRow, i, tmpOOP); } } @@ -217,8 +224,11 @@ SQLite3StmtHandle h; h = (SQLite3StmtHandle) OOP_TO_OBJ (self); - stmt = (sqlite3_stmt *) vmProxy->OOPToCObject (h->stmt); + if (h->stmt == vmProxy->nilOOP) + return 0; + stmt = (sqlite3_stmt *) vmProxy->OOPToCObject (h->stmt); + h->stmt = vmProxy->nilOOP; return sqlite3_finalize (stmt); } diff -rNu smalltalk-3.0.2/packages/digest/Makefile.in smalltalk-3.0.3/packages/digest/Makefile.in --- smalltalk-3.0.2/packages/digest/Makefile.in 2008-03-07 11:54:41.000000000 +0100 +++ smalltalk-3.0.3/packages/digest/Makefile.in 2008-05-14 12:04:48.000000000 +0200 @@ -145,6 +145,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -157,10 +159,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -175,12 +177,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ diff -rNu smalltalk-3.0.2/packages/gdbm/Makefile.in smalltalk-3.0.3/packages/gdbm/Makefile.in --- smalltalk-3.0.2/packages/gdbm/Makefile.in 2008-03-07 11:54:41.000000000 +0100 +++ smalltalk-3.0.3/packages/gdbm/Makefile.in 2008-05-14 12:04:48.000000000 +0200 @@ -145,6 +145,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -157,10 +159,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -175,12 +177,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ diff -rNu smalltalk-3.0.2/packages/gtk/Makefile.in smalltalk-3.0.3/packages/gtk/Makefile.in --- smalltalk-3.0.2/packages/gtk/Makefile.in 2008-03-07 11:54:42.000000000 +0100 +++ smalltalk-3.0.3/packages/gtk/Makefile.in 2008-05-14 12:04:48.000000000 +0200 @@ -169,6 +169,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -181,10 +183,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -199,12 +201,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ diff -rNu smalltalk-3.0.2/packages/httpd/ChangeLog smalltalk-3.0.3/packages/httpd/ChangeLog --- smalltalk-3.0.2/packages/httpd/ChangeLog 2008-01-22 11:14:33.000000000 +0100 +++ smalltalk-3.0.3/packages/httpd/ChangeLog 2008-05-14 12:02:33.000000000 +0200 @@ -1,3 +1,7 @@ +2008-04-09 Paolo Bonzini + + * FileServer.st: Use #nextHunk. + 2007-10-07 Paolo Bonzini * STT.st: Add brackets around compiled methods. diff -rNu smalltalk-3.0.2/packages/httpd/FileServer.st smalltalk-3.0.3/packages/httpd/FileServer.st --- smalltalk-3.0.2/packages/httpd/FileServer.st 2008-02-27 19:03:13.000000000 +0100 +++ smalltalk-3.0.3/packages/httpd/FileServer.st 2008-05-14 12:02:33.000000000 +0200 @@ -280,12 +280,8 @@ nextChunk [ - [request stream isPeerAlive ifFalse: [^'']. - request stream available] - whileFalse: [Processor yield]. - ^(request stream) - fill; - bufferContents + request stream isPeerAlive ifFalse: [^'']. + ^request stream nextHunk ] localFileFor: remoteName [ diff -rNu smalltalk-3.0.2/packages/i18n/Makefile.in smalltalk-3.0.3/packages/i18n/Makefile.in --- smalltalk-3.0.2/packages/i18n/Makefile.in 2008-03-07 11:54:42.000000000 +0100 +++ smalltalk-3.0.3/packages/i18n/Makefile.in 2008-05-14 12:04:49.000000000 +0200 @@ -147,6 +147,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -159,10 +161,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -177,12 +179,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ diff -rNu smalltalk-3.0.2/packages/iconv/Makefile.in smalltalk-3.0.3/packages/iconv/Makefile.in --- smalltalk-3.0.2/packages/iconv/Makefile.in 2008-03-07 11:54:43.000000000 +0100 +++ smalltalk-3.0.3/packages/iconv/Makefile.in 2008-05-14 12:04:49.000000000 +0200 @@ -147,6 +147,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -159,10 +161,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -177,12 +179,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ diff -rNu smalltalk-3.0.2/packages/sport/sport.st smalltalk-3.0.3/packages/sport/sport.st --- smalltalk-3.0.2/packages/sport/sport.st 2008-03-07 11:53:44.000000000 +0100 +++ smalltalk-3.0.3/packages/sport/sport.st 2008-05-14 12:02:33.000000000 +0200 @@ -1234,7 +1234,7 @@ I return true if a read operation will return some number of bytes." - ^self underlyingSocket available + ^self underlyingSocket canRead ] setAddressReuse: aBoolean [ @@ -1261,7 +1261,7 @@ | bad sem timeout socketWait | - self underlyingSocket available ifTrue: [ ^true ]. + self underlyingSocket canRead ifTrue: [ ^true ]. sem := Semaphore new. timeout := [ (Delay forMilliseconds: aNumberOfMilliseconds) wait. sem signal ] @@ -1272,7 +1272,7 @@ [ sem wait ] ensure: [ timeout terminate. socketWait terminate ]. - ^self underlyingSocket available + ^self underlyingSocket canRead ] write: sourceByteArray [ diff -rNu smalltalk-3.0.2/packages/stinst/parser/ChangeLog smalltalk-3.0.3/packages/stinst/parser/ChangeLog --- smalltalk-3.0.2/packages/stinst/parser/ChangeLog 2008-03-07 11:53:44.000000000 +0100 +++ smalltalk-3.0.3/packages/stinst/parser/ChangeLog 2008-05-14 12:02:33.000000000 +0200 @@ -1,3 +1,8 @@ +2008-04-27 Stephen Compall + + * STSymTable.st: Create VariableBindings directly to add to + Undeclared; don't rely on it to convert plain Associations. + 2008-02-08 Stephen Compall * GSTParser.st: Always reverse a #methodsFor: with an diff -rNu smalltalk-3.0.2/packages/stinst/parser/STSymTable.st smalltalk-3.0.3/packages/stinst/parser/STSymTable.st --- smalltalk-3.0.2/packages/stinst/parser/STSymTable.st 2008-01-22 11:14:33.000000000 +0100 +++ smalltalk-3.0.3/packages/stinst/parser/STSymTable.st 2008-05-14 12:02:33.000000000 +0200 @@ -381,7 +381,9 @@ self class insideFilein ifFalse: [^nil]. (symbol at: 1) isUppercase ifFalse: [^nil]. - ^Undeclared associationAt: symbol ifAbsent: [Undeclared add: symbol -> nil] + ^Undeclared associationAt: symbol ifAbsent: + [Undeclared add: (VariableBinding key: symbol value: nil + environment: Undeclared)] ] ] diff -rNu smalltalk-3.0.2/packages/tcp/AbstractSocketImpl.st smalltalk-3.0.3/packages/tcp/AbstractSocketImpl.st --- smalltalk-3.0.2/packages/tcp/AbstractSocketImpl.st 2008-02-27 22:27:55.000000000 +0100 +++ smalltalk-3.0.3/packages/tcp/AbstractSocketImpl.st 2008-05-14 11:48:27.000000000 +0200 @@ -124,8 +124,7 @@ - file isNil ifTrue: [SystemExceptions.FileError signal: 'file closed']. - File checkError. + self checkError. ^nil ] @@ -142,8 +141,7 @@ - file isNil ifTrue: [SystemExceptions.FileError signal: 'file closed']. - File checkError. + self checkError. ^nil ] @@ -160,8 +158,7 @@ - file isNil ifTrue: [SystemExceptions.FileError signal: 'file closed']. - File checkError. + self checkError. ^nil ] @@ -178,8 +175,7 @@ - file isNil ifTrue: [SystemExceptions.FileError signal: 'file closed']. - File checkError. + self checkError. ^nil ] diff -rNu smalltalk-3.0.2/packages/tcp/Buffers.st smalltalk-3.0.3/packages/tcp/Buffers.st --- smalltalk-3.0.2/packages/tcp/Buffers.st 2008-02-27 19:03:15.000000000 +0100 +++ smalltalk-3.0.3/packages/tcp/Buffers.st 2008-04-10 11:10:59.000000000 +0200 @@ -60,6 +60,11 @@ self flush ] + + isFull [ + + ^self position = self collection size + ] ] diff -rNu smalltalk-3.0.2/packages/tcp/ChangeLog smalltalk-3.0.3/packages/tcp/ChangeLog --- smalltalk-3.0.2/packages/tcp/ChangeLog 2008-03-07 11:53:44.000000000 +0100 +++ smalltalk-3.0.3/packages/tcp/ChangeLog 2008-05-14 12:02:33.000000000 +0200 @@ -1,3 +1,12 @@ +2008-04-09 Paolo Bonzini + + * AbstractSocketImpl.st: Use instance-side #checkError. + * Buffers.st: Add WriteBuffer>>#isFull. + * Sockets.st: Add #canRead, #canWrite, #ensureReadable, + #ensureWriteable. Map #available to #canRead (for backwards + compatibility). + * Tests.st: Use #canRead and #nextHunk. + 2008-02-27 Paolo Bonzini * AbstractSocketImpl.st: Make sure fd is not nil when calling diff -rNu smalltalk-3.0.2/packages/tcp/Makefile.in smalltalk-3.0.3/packages/tcp/Makefile.in --- smalltalk-3.0.2/packages/tcp/Makefile.in 2008-03-07 11:54:43.000000000 +0100 +++ smalltalk-3.0.3/packages/tcp/Makefile.in 2008-05-14 12:04:50.000000000 +0200 @@ -145,6 +145,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -157,10 +159,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -175,12 +177,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ diff -rNu smalltalk-3.0.2/packages/tcp/Sockets.st smalltalk-3.0.3/packages/tcp/Sockets.st --- smalltalk-3.0.2/packages/tcp/Sockets.st 2008-03-07 11:53:44.000000000 +0100 +++ smalltalk-3.0.3/packages/tcp/Sockets.st 2008-05-14 12:02:33.000000000 +0200 @@ -159,6 +159,13 @@ self subclassResponsibility ] + ensureWriteable [ + "Suspend the current process until more data can be written on the + socket." + + self implementation ensureWriteable + ] + ensureReadable [ "Suspend the current process until more data is available on the socket." @@ -175,12 +182,27 @@ ] available [ + "Answer whether there is data available on the socket. Same as + #canRead, present for backwards compatibility." + + + ^self canRead + ] + + canRead [ "Answer whether there is data available on the socket." ^self implementation canRead ] + canWrite [ + "Answer whether there is free space in the socket's write buffer." + + + ^self implementation canWrite + ] + close [ "Close the socket represented by the receiver." @@ -707,7 +729,7 @@ one, else answer nil." - self available ifFalse: [^nil]. "Make it non-blocking" + self canRead ifFalse: [^nil]. "Make it non-blocking" ^self primAccept: Socket ] @@ -717,7 +739,7 @@ DatagramSockets." - self available ifFalse: [^nil]. "Make it non-blocking" + self canRead ifFalse: [^nil]. "Make it non-blocking" ^self primAccept: socketClass ] @@ -1079,16 +1101,16 @@ "Suspend the current process until more data is available in the socket's read buffer or from the operating system." - self available ifFalse: [ super ensureReadable ] + self canRead ifFalse: [ super ensureReadable ] ] - available [ + canRead [ "Answer whether more data is available in the socket's read buffer or from the operating system." ^(self hasReadBuffer and: [self readBuffer notEmpty]) - or: [super available] + or: [super canRead] ] bufferContents [ @@ -1275,6 +1297,23 @@ readBuffer := writeBuffer := self noBufferFlag ] + ensureWriteable [ + "Answer whether more data is available in the socket's read buffer + or from the operating system." + + + self canWrite ifFalse: [super ensureWriteable] + ] + + canWrite [ + "Answer whether more data is available in the socket's read buffer + or from the operating system." + + + ^(self hasWriteBuffer and: [self readBuffer isFull not]) + or: [super canWrite] + ] + newReadBuffer: size [ ^(ReadBuffer on: (String new: size)) fillBlock: diff -rNu smalltalk-3.0.2/packages/tcp/Tests.st smalltalk-3.0.3/packages/tcp/Tests.st --- smalltalk-3.0.2/packages/tcp/Tests.st 2008-02-27 19:03:15.000000000 +0100 +++ smalltalk-3.0.3/packages/tcp/Tests.st 2008-04-10 11:10:59.000000000 +0200 @@ -71,9 +71,8 @@ nextPutAll: sendBuf; flush. bytesSent := bytesSent + sendBuf size. - [client available] whileTrue: - [client fill. - bytesReceived := bytesReceived + client bufferContents size]. + [client canRead] whileTrue: + [bytesReceived := bytesReceived + client nextHunk size]. bytesSent >= bytesToSend and: [bytesReceived = bytesSent]] whileFalse]. Transcript @@ -141,9 +140,8 @@ [queueReady wait. client := Socket remote: queue localAddress port: 54321. - [[client available] whileTrue: - [client fill. - bytesReceived := bytesReceived + client bufferContents size]. + [[client canRead] whileTrue: + [bytesReceived := bytesReceived + client nextHunk size]. bytesSent >= bytesToSend and: [bytesReceived = bytesSent]] whileFalse: [Processor yield]. sema signal] @@ -189,7 +187,7 @@ nextPut: datagram; flush. bytesSent := bytesSent + datagram data size. - [client available] + [client canRead] whileTrue: [bytesReceived := bytesReceived + client next data size]. bytesReceived < bytesToSend] whileTrue. diff -rNu smalltalk-3.0.2/packages/vfs/ChangeLog smalltalk-3.0.3/packages/vfs/ChangeLog --- smalltalk-3.0.2/packages/vfs/ChangeLog 2008-01-22 11:14:33.000000000 +0100 +++ smalltalk-3.0.3/packages/vfs/ChangeLog 2008-05-14 12:34:10.000000000 +0200 @@ -1,4 +1,9 @@ -2007-07-03 Paolo Bonzini +2008-03-14 Paolo Bonzini + + * VFS.st: Fix documentation; VFS scripts are searched + for in /usr/local/libexec/smalltalk/vfs. +2007-07-03 Paolo Bonzini + * VFS.st: Move ExternalArchiveFileHandler here from kernel/VFS.st, complying to the new ArchiveFileHandler protocol. diff -rNu smalltalk-3.0.2/packages/vfs/Makefile.am smalltalk-3.0.3/packages/vfs/Makefile.am --- smalltalk-3.0.2/packages/vfs/Makefile.am 2008-01-22 11:14:33.000000000 +0100 +++ smalltalk-3.0.3/packages/vfs/Makefile.am 2008-04-10 11:10:59.000000000 +0200 @@ -1,6 +1,7 @@ EXTRA_DIST = README pkglibexecdir = $(libexecdir)/$(PACKAGE) -dist_pkglibexec_SCRIPTS = deb lslR mailfs patchfs uar \ +vfsdir = $(pkglibexecdir)/vfs +dist_vfs_SCRIPTS = deb lslR mailfs patchfs uar \ urar uzoo ulha ucpio utar uzip diff -rNu smalltalk-3.0.2/packages/vfs/Makefile.in smalltalk-3.0.3/packages/vfs/Makefile.in --- smalltalk-3.0.2/packages/vfs/Makefile.in 2008-03-07 11:54:43.000000000 +0100 +++ smalltalk-3.0.3/packages/vfs/Makefile.in 2008-05-14 12:04:50.000000000 +0200 @@ -37,7 +37,7 @@ build_triplet = @build@ host_triplet = @host@ subdir = packages/vfs -DIST_COMMON = README $(dist_pkglibexec_SCRIPTS) $(srcdir)/Makefile.am \ +DIST_COMMON = README $(dist_vfs_SCRIPTS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/build-aux/bold.m4 \ @@ -80,9 +80,9 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(pkglibexecdir)" -dist_pkglibexecSCRIPT_INSTALL = $(INSTALL_SCRIPT) -SCRIPTS = $(dist_pkglibexec_SCRIPTS) +am__installdirs = "$(DESTDIR)$(vfsdir)" +dist_vfsSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(dist_vfs_SCRIPTS) SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -124,6 +124,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -136,10 +138,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -154,12 +156,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ @@ -249,7 +253,8 @@ target_alias = @target_alias@ EXTRA_DIST = README pkglibexecdir = $(libexecdir)/$(PACKAGE) -dist_pkglibexec_SCRIPTS = deb lslR mailfs patchfs uar \ +vfsdir = $(pkglibexecdir)/vfs +dist_vfs_SCRIPTS = deb lslR mailfs patchfs uar \ urar uzoo ulha ucpio utar uzip all: all-am @@ -284,24 +289,24 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-dist_pkglibexecSCRIPTS: $(dist_pkglibexec_SCRIPTS) +install-dist_vfsSCRIPTS: $(dist_vfs_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(pkglibexecdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibexecdir)" - @list='$(dist_pkglibexec_SCRIPTS)'; for p in $$list; do \ + test -z "$(vfsdir)" || $(mkdir_p) "$(DESTDIR)$(vfsdir)" + @list='$(dist_vfs_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(dist_pkglibexecSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(pkglibexecdir)/$$f'"; \ - $(dist_pkglibexecSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(pkglibexecdir)/$$f"; \ + echo " $(dist_vfsSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(vfsdir)/$$f'"; \ + $(dist_vfsSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(vfsdir)/$$f"; \ else :; fi; \ done -uninstall-dist_pkglibexecSCRIPTS: +uninstall-dist_vfsSCRIPTS: @$(NORMAL_UNINSTALL) - @list='$(dist_pkglibexec_SCRIPTS)'; for p in $$list; do \ + @list='$(dist_vfs_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(pkglibexecdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkglibexecdir)/$$f"; \ + echo " rm -f '$(DESTDIR)$(vfsdir)/$$f'"; \ + rm -f "$(DESTDIR)$(vfsdir)/$$f"; \ done mostlyclean-libtool: @@ -351,7 +356,7 @@ check: check-am all-am: Makefile $(SCRIPTS) installdirs: - for dir in "$(DESTDIR)$(pkglibexecdir)"; do \ + for dir in "$(DESTDIR)$(vfsdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am @@ -396,9 +401,9 @@ info-am: -install-data-am: +install-data-am: install-dist_vfsSCRIPTS -install-exec-am: install-dist_pkglibexecSCRIPTS +install-exec-am: install-info: install-info-am @@ -422,18 +427,18 @@ ps-am: -uninstall-am: uninstall-dist_pkglibexecSCRIPTS uninstall-info-am +uninstall-am: uninstall-dist_vfsSCRIPTS uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dist_pkglibexecSCRIPTS \ + install-data install-data-am install-dist_vfsSCRIPTS \ install-exec install-exec-am install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am uninstall uninstall-am \ - uninstall-dist_pkglibexecSCRIPTS uninstall-info-am + ps ps-am uninstall uninstall-am uninstall-dist_vfsSCRIPTS \ + uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -rNu smalltalk-3.0.2/packages/vfs/VFS.st smalltalk-3.0.3/packages/vfs/VFS.st --- smalltalk-3.0.2/packages/vfs/VFS.st 2008-02-27 19:03:15.000000000 +0100 +++ smalltalk-3.0.3/packages/vfs/VFS.st 2008-05-14 12:02:33.000000000 +0200 @@ -51,11 +51,12 @@ ] ExternalArchiveFileHandler class >> fileSystems [ - "Answer the virtual file systems that can be processed by this subclass. - These are given by the names of the executable files in the `vfs' - subdirectory of the image directory, of the parent of the kernel - directory and (if the image is not the global installed image) - of the `.st' directory in the home directory." + "Answer the virtual file systems that can be processed by this + subclass. These are given by the names of the executable + files in the `vfs' subdirectory of the image directory (if + the image is not the global installed image), in the + `/usr/local/libexec/smalltalk/vfs' directory and in the + `.st/vfs' subdirectory of the home directory." fileTypes := LookupTable new. diff -rNu smalltalk-3.0.2/packages/zlib/Makefile.in smalltalk-3.0.3/packages/zlib/Makefile.in --- smalltalk-3.0.2/packages/zlib/Makefile.in 2008-03-07 11:54:44.000000000 +0100 +++ smalltalk-3.0.3/packages/zlib/Makefile.in 2008-05-14 12:04:50.000000000 +0200 @@ -145,6 +145,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -157,10 +159,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -175,12 +177,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ diff -rNu smalltalk-3.0.2/scripts/Convert.st smalltalk-3.0.3/scripts/Convert.st --- smalltalk-3.0.2/scripts/Convert.st 2008-02-24 18:11:33.000000000 +0100 +++ smalltalk-3.0.3/scripts/Convert.st 2008-05-12 14:37:55.000000000 +0200 @@ -231,7 +231,7 @@ node comments isEmpty ifFalse: [ stuffToEmit add: (EmittedComments comments: node comments source: node source) ]. - ^super evaluate: node + ^super evaluate: rewritten ] addRule: searchString [ @@ -511,9 +511,11 @@ outFile close ] on: Notification do: [ :ex | - verbose ifTrue: [ stderr nextPutAll: 'gst-convert: ', ex messageText; nl; flush ] ] + verbose ifTrue: [ stderr nextPutAll: 'gst-convert: ', ex messageText; nl; flush ]. + ex resume ] on: Warning do: [ :ex | - quiet ifFalse: [ stderr nextPutAll: 'gst-convert: warning: ', ex messageText; nl; flush ] ] + quiet ifFalse: [ stderr nextPutAll: 'gst-convert: warning: ', ex messageText; nl; flush ]. + ex resume ] on: Error do: [ :ex | stderr nextPutAll: 'gst-convert: error: ', ex messageText; nl; flush. outFile = stdout ifFalse: [ diff -rNu smalltalk-3.0.2/scripts/Load.st smalltalk-3.0.3/scripts/Load.st --- smalltalk-3.0.2/scripts/Load.st 2008-03-07 11:53:44.000000000 +0100 +++ smalltalk-3.0.3/scripts/Load.st 2008-05-14 12:02:34.000000000 +0200 @@ -50,6 +50,7 @@ -f --force reload package if already loaded -n --dry-run don''t save the image after loading -t --test run SUnit tests if available + -i --rebuild-image load into a newly-created image -I --image-file=FILE load into the specified image --kernel-dir=PATH use the specified kernel directory -h --help show this message @@ -59,7 +60,8 @@ "Parse the command-line arguments." Smalltalk arguments: '-h|--help --version -q|--quiet -v|-V|--verbose -n|--dry-run - -f|--force -t|--test -I|--image-file: --kernel-directory:' + -f|--force -t|--test -I|--image-file: --kernel-directory: + -i|--rebuild-image' do: [ :opt :arg | opt = 'help' ifTrue: [ diff -rNu smalltalk-3.0.2/tests/Makefile.in smalltalk-3.0.3/tests/Makefile.in --- smalltalk-3.0.2/tests/Makefile.in 2008-03-07 11:54:44.000000000 +0100 +++ smalltalk-3.0.3/tests/Makefile.in 2008-05-14 12:04:51.000000000 +0200 @@ -122,6 +122,8 @@ ENABLE_DISASSEMBLER_FALSE = @ENABLE_DISASSEMBLER_FALSE@ ENABLE_DISASSEMBLER_TRUE = @ENABLE_DISASSEMBLER_TRUE@ EXEEXT = @EXEEXT@ +FFI_CFLAGS = @FFI_CFLAGS@ +FFI_LIBS = @FFI_LIBS@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ @@ -134,10 +136,10 @@ GTK_LIBS = @GTK_LIBS@ HAVE_INSTALLED_LIGHTNING_FALSE = @HAVE_INSTALLED_LIGHTNING_FALSE@ HAVE_INSTALLED_LIGHTNING_TRUE = @HAVE_INSTALLED_LIGHTNING_TRUE@ -HAVE_SIGSEGV_FALSE = @HAVE_SIGSEGV_FALSE@ -HAVE_SIGSEGV_TRUE = @HAVE_SIGSEGV_TRUE@ ICON = @ICON@ +INCFFI = @INCFFI@ INCLTDL = @INCLTDL@ +INCSIGSEGV = @INCSIGSEGV@ INCSNPRINTFV = @INCSNPRINTFV@ INCTCLTK = @INCTCLTK@ INSTALL_DATA = @INSTALL_DATA@ @@ -152,12 +154,14 @@ LIBADD_DL = @LIBADD_DL@ LIBC_SO_DIR = @LIBC_SO_DIR@ LIBC_SO_NAME = @LIBC_SO_NAME@ +LIBFFI = @LIBFFI@ LIBGMP = @LIBGMP@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBREADLINE = @LIBREADLINE@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ LIBSNPRINTFV = @LIBSNPRINTFV@ LIBTCLTK = @LIBTCLTK@ LIBTOOL = @LIBTOOL@ diff -rNu smalltalk-3.0.2/tests/package.m4 smalltalk-3.0.3/tests/package.m4 --- smalltalk-3.0.2/tests/package.m4 2008-03-07 11:53:44.000000000 +0100 +++ smalltalk-3.0.3/tests/package.m4 2008-05-14 14:53:39.000000000 +0200 @@ -1,6 +1,6 @@ # Signature of the current package. m4_define([AT_PACKAGE_NAME], [GNU Smalltalk]) m4_define([AT_PACKAGE_TARNAME], [smalltalk]) -m4_define([AT_PACKAGE_VERSION], [3.0.2]) -m4_define([AT_PACKAGE_STRING], [GNU Smalltalk 3.0.2]) +m4_define([AT_PACKAGE_VERSION], [3.0.3]) +m4_define([AT_PACKAGE_STRING], [GNU Smalltalk 3.0.3]) m4_define([AT_PACKAGE_BUGREPORT], [help-smalltalk@gnu.org]) diff -rNu smalltalk-3.0.2/tests/testsuite smalltalk-3.0.3/tests/testsuite --- smalltalk-3.0.2/tests/testsuite 2008-03-07 11:53:44.000000000 +0100 +++ smalltalk-3.0.3/tests/testsuite 2008-05-14 14:53:48.000000000 +0200 @@ -967,7 +967,7 @@ # List of tests. if $at_list_p; then cat <<_ATEOF -GNU Smalltalk 3.0.2 test suite test groups: +GNU Smalltalk 3.0.3 test suite test groups: NUM: FILE-NAME:LINE TEST-GROUP-NAME KEYWORDS @@ -991,7 +991,7 @@ exit 0 fi if $at_version_p; then - echo "$as_me (GNU Smalltalk 3.0.2)" + echo "$as_me (GNU Smalltalk 3.0.3)" cat <<\_ACEOF Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software @@ -1075,13 +1075,13 @@ # Banners and logs. cat <<\_ASBOX ## ------------------------------- ## -## GNU Smalltalk 3.0.2 test suite. ## +## GNU Smalltalk 3.0.3 test suite. ## ## ------------------------------- ## _ASBOX { cat <<\_ASBOX ## ------------------------------- ## -## GNU Smalltalk 3.0.2 test suite. ## +## GNU Smalltalk 3.0.3 test suite. ## ## ------------------------------- ## _ASBOX echo @@ -9722,7 +9722,7 @@ echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help:" echo echo " To: " - echo " Subject: [GNU Smalltalk 3.0.2] $as_me:$at_fail_list${at_fail_list:+ failed${at_xpass_list:+,}}$at_xpass_list${at_xpass_list:+ passed unexpectedly}" + echo " Subject: [GNU Smalltalk 3.0.3] $as_me:$at_fail_list${at_fail_list:+ failed${at_xpass_list:+,}}$at_xpass_list${at_xpass_list:+ passed unexpectedly}" echo if test $at_debug_p = false; then echo