summaryrefslogtreecommitdiff
path: root/doc/CHANGES-2007
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2007-09-03 13:36:28 +0000
committerobache <obache@pkgsrc.org>2007-09-03 13:36:28 +0000
commitf667a7e4a053d4e94149060db4ac8c51b3eda67b (patch)
tree36e48402faa4f20ea5747689feea10c3ec405db2 /doc/CHANGES-2007
parentaedc6cda77a42dfca28389de0e4094dcf475c3d3 (diff)
downloadpkgsrc-f667a7e4a053d4e94149060db4ac8c51b3eda67b.tar.gz
Update smalltalk to 2.3.5.
List of user-visible changes in GNU Smalltalk NEWS FROM 2.3.4 TO 2.3.5 o Added more examples of continuations. o Fixed a floating-point accuracy problem in the test suite. o Fixed a 64-bit cleanliness problem in the GDBM bindings. o Generational GC enabled on x86_64. o Support for writing a block with arguments and no statements as [ :a :b ] in addition to [ :a :b | ]. o The StreamFilter.st example, which provided lookahead, filtering, concatenation and other kinds of manipulation for Streams, has been promoted into the default image. ----------------------------------------------------------------------------- NEWS FROM 2.3.3 TO 2.3.4 o Behavior>>#evaluate: and MethodDictionary>>#removeAt:ifAbsent: would cause the method dictionary's size to double. This caused sometimes spurious failures in floatmath.st. o Fixed bug in LargeInteger division on systems not equipped with GMP. o Fixed bug in socket #nextHunk implementation, which lost the first or second byte in the input buffer. o Fixed paths in the image when "make DESTDIR" was used. o Fixed implementation of Dictionary>>#addAll:, and fixed Integer>>#binomial: when the argument is 0 or self. o Fixed various minor bugs and imprecisions in the documentation. o Improvements to the ancillary scripts gst-load and gst-sunit. In particular, a package can describe the classes that constitute its testsuite, and gst-sunit allows to quickly run the testsuite for a package. o Improvements to the test suite. Several of the modules included with GNU Smalltalk are tested. The testsuite is now written using Autotest. o Some libffi files (for IA64 and PA) were missing from the distribution. o Upgraded libsigsegv, for improved Mac OS X on Intel support o zlib bindings provided in package ZLib. ----------------------------------------------------------------------------- NEWS FROM 2.3.2 TO 2.3.3 o Introduced the --with-imagedir configure option to specify the directory used for the image. o The manual was not properly generated in version 2.3.2. o Removed text relocations from the virtual machine's shared library. ----------------------------------------------------------------------------- NEWS FROM 2.3.1 TO 2.3.2 o #copyFrom:to: is uniformly 0-based for all Streams (unlike in Collections), because a Stream has 0-based #position and #position: methods. o Fixed many floating point rounding bugs in LargeIntegers and Fractions, thanks to Nicolas Cellier. ----------------------------------------------------------------------------- NEWS FROM 2.3 TO 2.3.1 o configure does not lock up when the system emacs is XEmacs and does not include both the comint package and the package's source code. o Fixed a garbage collection bug that typically occurred when installing GNU Smalltalk, or when launching the installed image. o gst-package honors the INSTALL command found by configure. o gst-config does not "forget" to prefix the library directories with -L. o Segmentation violations on large integer operations (on 64-bit hosts) were fixed. ----------------------------------------------------------------------------- NEWS FROM 2.2 TO 2.3 IMPORTANT: GNU Smalltalk now adds an explicit exception to the GNU GPL license, allowing the programs running under the virtual machine to use a GPL-incompatible license. This exception is used both by the virtual machine and by the library bindings included in GNU Smalltalk. This clears gray areas when a Smalltalk program is using functions in the external library bindings via dynamic linking and the foreign function call interface (C call-outs). o C call-outs returning #void now return self rather than nil. Performance of code heavily using C call-outs has improved. o FileStreams can now use pwrite for more efficient operation on files opened for read/write, and will do many less gratuitous lseek operations. pread will also be used by FileStream>>#copyFrom:to:. The number of system calls issued when generating the documentation, for example, is reduced by a third. o Fixed bug in methods containing both -0.0 and 0.0 (positive and negative floating-point zero). o Fixed bug in Directory class>>#create:, that could not create a directory relative to the current directory. o Fixed bug in File>>#touch, which did not work really. There are also methods to modify a file's atime and mtime. o Fixed bug in SortedCollection. After #removeAtIndex:, adds would leave the collection unordered. o Fixed many more bugs. o Introduced a method to efficiently convert a WriteStream into a ReadStream. It is called #readStream and makes WriteStream more polymorphic with String. o Introduced two more class shapes, #character and #utf32, that can be used for String and UnicodeString. o More reliable detection of at-end-of-file condition for pipes, TTYs, and so on (especially on Mac OS X), and of sockets closed by the peer. Due to incompatibilities between various OSes, you are advised to test end-of-stream conditions *before* rather than after reading a character from stdin. In 2.2, either way would work, but serious bugs were found on Mac OS X unless stdin was redirected from a file. o Moved gdk_draw_ functions to GdkDrawable. o New goodie to parse the command line. Look at the documentation for the Getopt class and for SystemDictionary>>#arguments:do:. o New example, lazy collections. When loaded, #select:, #reject: and #collect: do not create a new collection unless necessary. Idioms like (a select: [ :each | ... ]) do: [ : each | ... ] or a := a select: [ :each | ... ]. a := a reject: [ :each | ... ]. a := a select: [ :each | ... ]. ^a size can be much faster when this example is loaded. o Regular expressions are now included in the default image. The interface is now definitive and is similar to 2.2. The concrete classes for RegexResults are in a private namespace (since the user need not instantiate them anyway). Right now, regular expressions are only usable for String objects (see Unicode support below). This may change in the future. o The backtraces now omit again the internal methods in the exception handling system. o The class above which super-send bytecodes start searching is now embedded in the bytecode stream. This provides the infrastructure to implement 'here' as in Smalltalk/X or 'self.Foo b' to execute the Foo>>#b method (these possible extensions have not been implemented). o The header files compile cleanly with a C++ compiler. For the occasion, the preferred name of the old `mst_Object' has changed to `gst_object'. o Various speedups. Unicode support: o Characters above 127 are no longer used to represent extended ASCII characters. Instead, they are only used to represent a byte in the encoding of the Unicode characters from 128 on. To create them use the Blue Book method Character class>>#value:. To represent Unicode characters above 127 use the (ANSI Smalltalk) Character class>>#codePoint: method. Note that these characters *cannot* be shown on a stream with #nextPut: (use #display: instead) nor compared with #== (use #= instead). Character literals like $+ or $A are guaranteed to create normal "Character" objects, for which you can safely use #nextPut:. Right now, these are valid only for characters between 0 and 127. To create Character literals for unicode characters, use the new syntax to express characters using their Unicode code point. This may be extended in the future to support Unicode character literals. A ``safe'' way to obtain the character whose encoding is between 128 and 255 is this (which requires the Iconv module to be loaded): ##('<your character>' asUnicodeString first) (This snippet has no shortcut by design because, in general, converting a Character to a UnicodeCharacter is not a well-defined operation). o New UnicodeCharacter and UnicodeString classes. These new classes can also be passed to and received from C functions. See the manual for more information. o New syntax $<13> to express characters using their Unicode code point. As anticipated, this syntax will create instances of the new UnicodeCharacter class when the number is > 127. o Part of the I18N module was separated into the Iconv module, which provides support for printing Unicode characters and strings correctly. Other goodies: o NCurses bindings, contributed by Brad Watson. ----------------------------------------------------------------------------- NEWS FROM 2.1.12 TO 2.2 Scripting improvements: o A sharp-bang sequence at the beginning of a file is parsed as a one-line comment. o Provides an "-f" option (long option "--file") to be used in a #! line, as in "#! /usr/bin/env gst -f", which has the same effect of -Q, processing the file indicated by the option's argument, and passing the rest of the command line to GNU Smalltalk. In other words, the two invocations that follow are equivalent: gst -f script.st ARG1 ARG2 gst script.st -Qa ARG1 ARG2 o Load.st installed as gst-load, Reload.st installed as gst-reload, Test.st installed as gst-sunit. VM changes: o Can define subclasses of CompiledMethod and have a method invoked on the instances whenever the method is called. o Can pass a "void **" to C using the #cObjectPtr parameter specifier (previously undocumented and broken). o The #class method can be overridden. This is useful for example for debuggers and proxies. o Code for decoding/interpreting the bytecode set is for the most part automatically generated. Take a look at the ``genbc'' and ``genvm'' programs if you are going to write an high performance interpreter, and write to the mailing list for any information on them or on the other program ``superops'' (this one is much more specialized). o CompiledBlocks and CompiledMethods are read-only. o Dollars are allowed in the middle of identifiers and method names. This is unportable, so do not abuse it. As with underscores, it is not possible to use them at the beginning of an identifier or method name. o Fixed bug that caused the compiler to accept duplicate argument or temporary names. o GCC needed to compile GNU Smalltalk. o gst_smalltalk_args accepts a const char **. o Improved clarity and portability using intptr_t, size_t and ptrdiff_t more widely and wisely. o Indexed instance variables can be 8-bit and 16-bit, signed and unsigned integers; or they can be 32-bit and 64-bit, signed integers and unsigned integers and floating point values; or objects of course. Previously the only three possibilities were objects, 8-bit unsigned ints, and pointer-sized unsigned ints. o Instance variables are scanned backwards: if a subclass declares an instance variable with the same name of the superclass, it wins when compiling code in the subclass (fixes the so-called "fragile subclass" problem). o Keywords and parameters need not be separated by a space (as in `self x: y z:w'). o New bytecode set. This is a significant departure from the Blue Book's instruction set, and it improves performance by ~20%. Over 150 common bytecode sequences are optimized, saving on dispatching overhead and minimizing the cost of decoding arguments. o Options -l and -L (--log-changes and --log-file) are no more. The change log is not useful outside the GUI, while inside the GUI it ought to be maintained by the GUI itself. o Option -s is no more. It was made the default in 2.1.5. o Passing floating-point arguments to C works. o Prefetching instructions are used wherever supported (Alpha, SPARC, PPC, AMD K6 or newer, Intel PIII or newer, all with GCC 3.2). This speeds up the startup by up to 20%. o Instances of subclasses of CompiledBlock and CompiledMethod can be created using the same primitive that creates CompiledBlocks and CompiledMethods, but sent to the subclass. o Several important bug fixes in event handling and asynchronous file input/output. o Subclasses of MethodInfo can be used as the descriptors for CompiledMethod objects. o Two-character binary messages ending with a minus are scanned differently if followed by a number: "1+-2" is now read as "1 + -2", not "1 +- 2". This is what you would usually expect; however, including spaces explicitly is recommended. o When GCC 3.3 or later is used, a shared library is also built. The code has been to some extent optimized to make this less expensive, but the shared library still has a 5-10% performance hit. Note that the x86 shared library is undebuggable (-fomit-frame-pointer) with GCC < 4.0 because of the dearth of registers. The installed virtual machine is not linked to the shared library for optimal speed. o Wider set of operations available to modules that plug into GNU Smalltalk, including access to system classes, queries on the method dictionaries, and access to indexed instance variables. Smalltalk changes: o CLongDouble class allows one to access long doubles; long doubles are supported by CStruct, Memory and ByteArray as well. o CompiledCode>>#literalsDo: does what CompiledCode>>#allLiteralsDo: used to do. CompiledCode>>#allLiteralsDo: recurses into literal arrays. o Glorp, a layer for mapping objects to relational databases, is provided and integrated with the MySQL driver. o GNU Smalltalk includes a mechanism for defining security policies on a class-by-class basis. See below for more information. o Interval can return a #first and #last even if the Interval is empty. These are the start and stop object that it was created with. The private methods #start, #stop and #step have thus been superseded by #first, #last and #increment. o #min: and #max: always return a NaN when one of the two operands is a NaN; previously they would always return the other operand. o New syntax for C call-outs, can be transparently filed out from the image and then filed back in. See the documentation or the kernel/CFuncs.st file for more information. o PackageLoader can be told the namespace in which to load the package. Most package loading scripts are now no longer necessary or can be reduced to simple initialization duties. o #raisedToInteger: is better optimized and does the minimum number of multiplications for exponents up to 256. o SequenceableCollection has a more efficient implementation of #fold:, as well as #second, #third, and #fourth (and I'm going to stop here!). o #return and #return: now reinstate exception handlers, which will therefore be active while executing pending #ensure: or #ifCurtailed: blocks. o Stored CompiledBlocks into the method's literal frame for non-clean blocks, and turned #blockCopy: into a `make dirty block' bytecode without introducing a method of unclear utility. This is a little faster and (consistently) saves around 1% on image files. o The syntax for primitives has been generalized into a "method attribute" mechanism; pragmas are accessible through methods in CompiledMethod. o The thisContext variable is compiled as a message send like "ContextPart thisContext". o When a send to super fails, #doesNotUnderstand: is also sent to super and not to self. This change is experimental; these semantics look more coherent to me. As a result (think about it...) sends to super from a root class are now forbidden. o When a non-existing message is sent with the wrong number of arguments (using #perform:), #doesNotUnderstand: is invoked. In the past, the wrong number of arguments error would have been printed. The reason for this is to allow selector names that would be invalid for the Smalltalk language. Work in progress: o Blox-GTK interface, to use the browser under Gtk+. Currently, only the browser works; to try it, configure with --enable-gtk=blox or load the BloxGTK package. Thanks to Robert Collins. o GNU Smalltalk now supports executing (some) Java programs. See the info documentation for more information. The class library is based on GCJ 3.4, but should be reasonably upwards-compatible. There is no AWT nor JNI support, and it is not planned; networking, reflection and serialization are not there but should be added in the future. Overview of the security mechanism: o Implemented class-level permissions. Each class can have its own permission set, and if this is not trivial (all-allowed) the class is marked untrusted; then instances of that class, as well as contexts that have at least an untrusted object as the receiver in the sender chain, are considered untrusted. In the future, security checks will be made for untrusted objects in such methods as C call-outs [#memoryAccess] CObject class>>#alloc: [#memoryAccess] CObject class>>#alloc:type: [#memoryAccess] CObject>>#free [#memoryAccess] CObject>>#at: [#memoryAccess] CObject>>#at:put: [#memoryAccess] Memory>>#at: [#memoryAccess] Memory>>#at:put: [#memoryAccess] FileDescriptor>>#fileOp:... [#io] ObjectMemory>>#snapshot: [#io] ObjectMemory>>#quit: [#system] ObjectMemory>>#abort [#system] ObjectMemory>>#setSpaceGrowRate: [#system] ObjectMemory>>#setSmoothingFactor: [#system] ObjectMemory>>#setGrowThresholdPercent: [#system] ObjectMemory>>#setBigObjectThreshold: [#system] ObjectMemory>>#growTo: [#system] Object>>#makeUntrusted: [#securityManagement] Object>>#instVarAt: [#debugging] Object>>#instVarAt:put: [#debugging] Object>>#perform:... [#debugging] Object>>#changeClassTo: [#debugging] Process>>#suspend [#processManagement] Process>>#resume [#processManagement] UndefinedObject>>#subclass:... etc... [#system] Class>>#subclass:... etc... (mutation) [#system] Metaclass>>#instanceVariableNames: [#system] MethodDictionary>>#at:put: [#system] o Instance variables of an untrusted class that are declared by a trusted class are read-only. This is necessary to avoid that a misbehaving class method screws up the instance variables of Behavior that are known to the VM. o Methods are verified. o Permissions can be granted by a method to its callees if the method's definition class owns those permissions. This can be used to invoke trusted C call-outs. o Primitives cannot be declared for untrusted objects (this might be fine-grained in the future). ----------------------------------------------------------------------------- NEWS IN 2.1.12 This is a bugfix release. It fixes several problems on 64-bit systems. ----------------------------------------------------------------------------- NEWS IN 2.1.11 This is a bugfix release. ----------------------------------------------------------------- NEWS IN 2.1.10 This is a bugfix release, but with this visible change: o PackageLoader supports loading package source code from multiple directories. Directory packages.xml is in Directories looked in /usr/share/smalltalk /usr/share/smalltalk parent of local kernel directory, if any image directory parent of local kernel directory parent of local kernel directory image directory image directory image directory o Directory>>#append:to: supports passing an absolute path as the file name (first argument). In this case, the file name itself is returned. This release works under MacOS X 10.3 and 10.4 as well. It also works around bugs in MacOS X Tiger's poll function.
Diffstat (limited to 'doc/CHANGES-2007')
0 files changed, 0 insertions, 0 deletions