Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!paperboy!meissner From: meissner@osf.org (Michael Meissner) Newsgroups: comp.arch Subject: Re: Instruction Scheduling Message-ID: Date: 17 Apr 91 14:50:09 GMT References: <32097@shamash.cdc.com> <1991Apr8.224717.14402@aero.org> <1991Apr10.131341.26357@b11.ingr.com> <20632@cbmvax.commodore.com> <24130@as0c.sei.cmu.edu> Sender: news@OSF.ORG Organization: Open Software Foundation Lines: 37 In-reply-to: firth@sei.cmu.edu's message of 16 Apr 91 18:43:15 GMT In article <24130@as0c.sei.cmu.edu> firth@sei.cmu.edu (Robert Firth) writes: | In article meissner@osf.org (Michael Meissner) writes: | | [linker optimisation of function calls] | | >Except of course if you are using object oriented techniques, and are | >calling through a function pointer. In which case, the linker has to | >fall back to the normal case of using fixed defaults. | | I don't understand the logic here. Object oriented techniques are ways | of designing code, not of implementing it. I know of no evidence that | OOD leads to code with greater dynamic functional variability than other | techniques. I'm thinking of virtual functions in C++, sending generalized messages in Objective C, and callbacks in X. At least in perusing the object oriented literture, great play is made of the ability to superclass an object, and replace it's handler. | Even if, for some reason, the prototyping tools use function pointers | to increase development efficiency, the production code will probably | use constant pointers (or write-once pointers, as the case may be). | Propagating the constant value to the call sites is one of the simplest | global optimisations a linker can do, and of couse the door is then | opened to all the other neat tricks. Not in a lot of code that I see. Calling shared libraries, and dynamically loaded executables is another way of calling through pointers. Take off those Fortran colored glasses :-) -- Michael Meissner email: meissner@osf.org phone: 617-621-8861 Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142 Considering the flames and intolerance, shouldn't USENET be spelled ABUSENET?