[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-smalltalk] GNU Smalltalk 2.2 release announcement
From: |
Paolo Bonzini |
Subject: |
[Help-smalltalk] GNU Smalltalk 2.2 release announcement |
Date: |
Mon, 21 Nov 2005 17:16:00 +0100 |
User-agent: |
Mozilla Thunderbird 0.9 (Macintosh/20041103) |
GNU Smalltalk 2.2 will be available in a few minutes from
ftp://ftp.gnu.org/gnu/smalltalk.
It is also already available on the GNU arch repository
http://mirrors.sourcecontrol.net/address@hidden in the
smalltalk--stable--2.2 version.
Changes from the last prerelease include:
- a bug fix in the file stat functions (timezone not set on the file
times),
- a bug fix in signal handling, which
- a new feature of the package loader, which allows (for example) the
browser to recognize that Blox/GTK has been loaded even if the default
Blox implementation is Blox/Tk.
- some GTK+ bug fixes
- as announced, the default Blox implementation is still Blox/Tk for
stable releases.
There are a lot of changes from GNU Smalltalk 2.1.12 to the new release:
===============================================
Scripting improvements:
- A sharp-bang sequence at the beginning of a file is parsed as a
one-line comment.
- 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
- Load.st installed as gst-load, Reload.st installed as gst-reload,
Test.st installed as gst-sunit.
===============================================
VM changes:
- Can define subclasses of CompiledMethod and have a method invoked on
the instances whenever the method is called.
- Can pass a "void **" to C using the #cObjectPtr parameter specifier
(previously undocumented and broken).
- The #class method can be overridden. This is useful for example for
debuggers and proxies.
- 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).
- CompiledBlocks and CompiledMethods are read-only.
- 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.
- Fixed bug that caused the compiler to accept duplicate argument or
temporary names.
- GCC needed to compile GNU Smalltalk.
- gst_smalltalk_args accepts a const char **.
- Improved clarity and portability using intptr_t, size_t and ptrdiff_t
more widely and wisely.
- 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.
- 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).
- Keywords and parameters need not be separated by a space (as in `self
x: y z:w').
- 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.
- 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.
- Option -s is no more. It was made the default in 2.1.5.
- Passing floating-point arguments to C works.
- 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%.
- Instances of subclasses of CompiledBlock and CompiledMethod can be
created using the same primitive that creates CompiledBlocks and
CompiledMethods, but sent to the subclass.
- Several important bug fixes in event handling and asynchronous file
input/output.
- Subclasses of MethodInfo can be used as the descriptors for
CompiledMethod objects.
- 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.
- 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.
- 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:
- CLongDouble class allows one to access long doubles; long doubles are
supported by CStruct, Memory and ByteArray as well.
- CompiledCode>>#literalsDo: does what CompiledCode>>#allLiteralsDo:
used to do. CompiledCode>>#allLiteralsDo: recurses into literal arrays.
- Glorp, a layer for mapping objects to relational databases, is
provided and integrated with the MySQL driver.
- GNU Smalltalk includes a mechanism for defining security policies on a
class-by-class basis. See below for more information.
- 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.
- #min: and #max: always return a NaN when one of the two operands is a
NaN; previously they would always return the other operand.
- 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.
- 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.
- #raisedToInteger: is better optimized and does the minimum number of
multiplications for exponents up to 256.
- SequenceableCollection has a more efficient implementation of #fold:,
as well as #second, #third, and #fourth (and I'm going to stop here!).
- #return and #return: now reinstate exception handlers, which will
therefore be active while executing pending #ensure: or #ifCurtailed:
blocks.
- 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.
- The syntax for primitives has been generalized into a "method
attribute" mechanism; pragmas are accessible through methods in
CompiledMethod.
- The thisContext variable is compiled as a message send like
"ContextPart thisContext".
- 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.
- 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:
- 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.
- 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:
- 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 ``dangerous'' methods.
- 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.
- Methods are verified.
- 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.
- Primitives cannot be declared for untrusted objects (this might be
fine-grained in the future).
Paolo
- [Help-smalltalk] GNU Smalltalk 2.2 release announcement,
Paolo Bonzini <=