Why does casting a function generate a run-time abort?

Kai Henningsen kaih@khms.westfalen.de
Sat Jun 19 16:57:00 GMT 2004


zlaski@apple.com (Ziemowit Laski)  wrote on 18.06.04 in <26F65C92-C18C-11D8-B4C5-00039390FFE2@apple.com>:

> trick I came up with?  I am, of course, asking for technical
> arguments, not aesthetic ones.

That's a false dichotomy. Most aesthetic arguments in programming *are*  
technical.

Personally, I tend to think that aesthetical technical arguments should  
nearly always trump non-aesthetical technical arguments. Doing it the  
other way around gets you ugly, unmaintainable code. Like those thousands- 
of-lines routines in gcc that nobody wants to touch.


In this specific case, I think the real question is "do the GIMPLE-based  
optimizers need to know anything about how Objective C method calls work?"  
- and it seems to me the answer is NO - there's nothing there to optimize  
at that level. (Is there? Could you, for example, look up a method once  
and call it often? In which case it would make sense to have both a  
LOOKUPMETHOD and a CALLMETHOD. Note that that's a common manual  
optimization in GNUstep ...)

RTL, of course, *does* need to know.

MfG Kai



More information about the Gcc-patches mailing list