bug-gnustep
[Top][All Lists]
Advanced

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

[bug #36706] performSelector: not working with message fowarding


From: Niels Grewe
Subject: [bug #36706] performSelector: not working with message fowarding
Date: Fri, 29 Jun 2012 15:36:09 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1171.0 Safari/537.1

Follow-up Comment #5, bug #36706 (project gnustep):

Hi Fred,

It seems like you're correct. At least, Apple runtime reference documentation
explicitly states that class_getMessageImplementation() might return a pointer
to `a part of the runtime's message forwarding machinery'. So we technically
would need to modify the behaviour of our runtime to be compatible with the
Apple implementation. 

Since that is a bit tedious (since it means juggling around with varargs and
various places where the return value might end up), my is a take on this
issue is that we should, in the meantime, do two things:

a) Don't raise an exception in gs_objc_msg_forward2(), just return NULL if we
cannot get a signature to construct a cframe for. The function is a hook for
the runtime, which should tolerate if the forwarding mechanism doesn't come up
with a sensible match.

b) Amend our implementation of `-performSelector:' to just use
objc_msg_lookup() and call the returned IMP. This is what a message send
compiles to anyways, which (I think) should be more robust than the present
code that calls class_getMethodImplementation(). But then again I might be
missing the reason why we did it that way in the first place...

Cheers,

Niels

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?36706>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

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