Re: FastCode RTL Replacement v0.20 Released!



John O'Harrow wrote:
> "Dennis" <marianndkc@xxxxxxxxxxxxxxx> wrote in message
> news:434a95bc@xxxxxxxxxxxxxxxxxxxxxxxxx
>> Hi John
>>
>> Does this involve a function pointer and adds one level of
>> indirection?
>
> No, this does not set up a function pointer or add any level of
> indirection. In fact it adds no code whatsover. The compiler simply
> maps one functions call address to another.

Don't know about later versions of Delphi, but in D5 this works, but
generates

call dword ptr [a]
call dword ptr [b]
call dword ptr [c]

which *is* one extra level of indirection, not a direct call to the same
adress. I don't know if it matters at all speedwise (but it is at least one
more memory reference), I'm not that fluent with the X86 instruction set.

--
Anders Isaksson, Sweden
BlockCAD: http://web.telia.com/~u16122508/proglego.htm
Gallery: http://web.telia.com/~u16122508/gallery/index.htm


.



Relevant Pages

  • Re: FastCode RTL Replacement v0.20 Released!
    ... > John O'Harrow wrote: ... >>> indirection? ... this does not set up a function pointer or add any level of ... > call dword ptr ...
    (borland.public.delphi.language.basm)
  • Re: quik popularized by ANSI C
    ... >> dereferencing a function pointer is not exactly meaningful. ... designate the same object with the same number of levels of indirection. ... then 'sizeof fptr' yields the size of the ... As array names do not decay to array pointers, ...
    (comp.lang.c)
  • External structure debugging
    ... Any tips for finding what is presumably a problem of too much or too little indirection? ... I am making progress, ... High on the suspect list is an external structure with fields for a function pointer and void pointer. ... Interestingly, if I set a breakpoint in the callback (specified by the function pointer), there are side effects that become visible, and their limits _might_ be a clue. ...
    (comp.lang.smalltalk.dolphin)
  • Re: FastCode RTL Replacement v0.20 Released!
    ... > Hi John ... this does not set up a function pointer or add any level of indirection. ... > library design. ...
    (borland.public.delphi.language.basm)
  • Re: sbliveos2 & > 2gb RAM?
    ... "CALL DWORD PTR" calls a far routine indirectly through the function pointer saved in the address passed to the call (which is correct since the devhelps use a function pointer) while "CALL FAR PTR" calls a far routine directly, that is, the address passed to the call is the far routine address. ...
    (comp.os.os2.programmer.misc)