[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PATCH: Merge objc-improvements-branch to mainline

From: Alexander Malmberg
Subject: Re: PATCH: Merge objc-improvements-branch to mainline
Date: Wed, 24 Sep 2003 19:48:54 +0200

Ziemowit Laski wrote:
> Well, the time has come. :-)  To review, here is the goodness being
> brought over from Apple:

>    (1) Bug fixes (as evidenced by the numerous new test cases vs.
> mainline)

This is good.

>    (3) Retrofit of DejaGNU ObjC test suite so that most tests are usable
> with
>        both NeXT and GNU runtimes.

This is good.

>    (4) Very humble beginnings of Objective-C++ support (e.g.,
> stub-objc.c, more
>        #ifdef OBJCPLUS fragments in objc-act.c).

Well, I think objective-c++ is very ugly, but it does have uses. :)

>    (2) Support for new Mac OS X (NeXT) runtime features, accessible via
> -fno-nil-receivers

> -fzero-link
> -freplace-objc-classes 

The documentation for these does not seem to be correct, or at least not
consistent with the implementation. It seems that -fzero-link does what
-freplace-objc-classes is documented to do, and -freplace-objc-classes
emits a marker that tells the runtime that the implementations in the
file should override any earlier implementations.

Anyway, all that is ok. However, ...

> -fobjc-exceptions

... this is not. This is just a bunch of syntactic sugar; making
language extensions and new keywords out of functionality that is
currently implemented in libraries.

The extensions (exceptions and synchronization) have nothing directly to
do with the rest of objective-c (which is about message passing and
objects). They take a small, clean, and powerful language and make it
bigger and less clean without adding any power. They bloat the compiler
and the runtime, and would impede the development of (new and existing)
alternative solutions to these problems (implemented in libraries).

I see no reason why this part is worth the trouble it causes. In my
opinion, this part should not be merged. If necessary, I can clean up
the patch by removing these parts.

(Additionally, the documentation for @synchronize is very vague.)

> The only "known defect" of the patch is that not all of the
> -fobjc-exceptions stuff
> is as platform-independent as it could/should be.

Indeed. It seems that it's even hard-coding the size of libc structures
(jmp_buf), which is a bug problem for portability. (Are we even
guaranteed that the size is constant for a system and doesn't vary with
different libc:s?)

- Alexander Malmberg

reply via email to

[Prev in Thread] Current Thread [Next in Thread]