swarm-support
[Top][All Lists]
Advanced

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

Re: Suggested improvement to gcc


From: Scott Christley
Subject: Re: Suggested improvement to gcc
Date: Fri, 23 Jan 1998 16:56:18 -0800 (PST)

I've heard this one before; I don't remember if it was here on the Swarm
list or maybe the GNUstep list...

> It might be hard to write, depending on how hard it is to fish that
> information out of the stack in gcc. The alternative would be to pass
> it along magically with the other arguments to the method (including
> the pointer "self" for the receiving object). But that would be a
> majorly incompatible change to the binaries.

The stack method is definitely a no-no; two many differences between
platforms; we would have to put half of GDB in objc to get it to work, all
at runtime even!  The only way to do this efficiently is with the
alternate method of passing another parameter.

In reality such a change is not difficult to do but as Nelson points out,
highly incompatible.  There is also the odd situation like:

main()
{
        [anObj doSomething];
}

where there is no sender, because its a C function.  If you think about it
some more, you can come up with other situations where having this done by
the compiler is less flexible than explicitly designing your methods (to
require a sender parameter) appropriately. 

But it is definitely an interesting concept, especially if you make an
analogy with the internet.  You can have object firewalls and method
proxies; though actually we have proxies already.

cheers
Scott



                  ==================================
   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.
                  ==================================


reply via email to

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