This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

[reordered]
>    (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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]