[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What's all this about Swarm modifying the runtime?
From: |
W . Northcott |
Subject: |
Re: What's all this about Swarm modifying the runtime? |
Date: |
Tue, 1 Oct 2002 12:10:20 +1000 |
Paul wrote
> I don't even really know what "runtime" means, so take this with a grain
> of salt.
Basically the runtime is a set of C functions which implement the nitty
gritty of objects messages etc.
The runtime in GNU is libobjc. Swarm builds its own from the source files
in the libobjc directory. The standard GNU runtime is part of the gcc
package and will typicaly be installed in /usr/lib with symlinks from
elsewhere. I think the Apple runtime is libobjc4.dylib. The Darwin
project is certainly libobjc4.
> Does Swarm really use a different runtime?
Yes really. To convince yourself, alter the linking specifications in the
build scripts to link to the standard GNU library. You will get a heap of
missing symbols.
This is a major portability issue. If Swarm used the GNU runtime , it
would be trivial to recompile the code on MacOS X using the Apple runtime
which is essentially identical at the Objective-C API level although
totally different at the C function or binary level.
> Swarm can be built with the stock gcc. There is an optional patch we
> make to gcc to allow method functions, but it is not necessary. I
> suspect that since gcc 3.2 has many optimizations incorporated from the
> Apple research team (they claim messaging is now orders of magnitudes
> faster) perhaps we don't even benefit from that one little gcc patch.
The method functions as you say can be patched around. However the show
stopper is the system of phases for objects. (createbegin createend etc)
Currently this is implemented via the modified runtime, which from an OO
perspective is unspeakably nasty. In principle, it should be possible to
achieve a similar effect on the standard runtime, but it would require
large amounts of the Swarm code to be rewritten. Scott Christley, who
understands this much better than I, has written quite a bit about this.
> If you get a gcc snapshot on or after 2002-09-09 (not 3.2, but rather
I am desperately trying to make Swarm easier to install. At the moment
there is a long list of libraries and tools that need to be installed on
any system to get Swarm to compile.
So I stick to using Apple compilers. AFAIK the last update to the Apple
sources from the FSF tree was done on 25 August. However, there is
probably neglible functional difference between what you refer to as 3.2
snapshot and the current Apple surces.
<RANT>MacOS X should be the best and easiest platform on which to install
and use Swarm. It is derived directly from the NextStep platform which I
believe was used for the original Swarm development. Also like Swarm it
is Objective-C based. It comes out of the box with an excellent ObjC IDE
replete with compiler, debuggers, profilers, cvs and a host of other
tools. All the required libraries compile and run with little if any
modification. Although MacOS X is proprietry, all of it which is of
interest to Swarm programmers is opensource. Apple are investing very
heavily in this opensource code including the compilers and runtime. More
than that, they are very responsive to the needs of the opensource
community. Within days of Marcus sending them a clear explanation of the
nested functions issue, they fixed the compiler code. However, neither
Apple nor the FSF are ging to change their runtime libraries or compilers
to incorporate Swarm weirdness. </RANT>
> updates that come after it), you can build Swarm if you apply 3 small
> patches to Swarm itself. (I can give you those patches.)
The best place for the patches would be on the Savannah site. If you want
to send them to me, I will put them up.
> Doesn't that mean we are using the GNU runtime?
As above, NO.
Bill Northcott
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.