How to overload member function pointer and a regualr member function
Ali Çehreli via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Apr 25 11:58:58 PDT 2017
On 04/25/2017 11:54 AM, Ali Çehreli wrote:
> _Dmain:
> push RBP
> mov RBP,RSP
> sub RSP,010h
> mov RAX,_D6deneme4funcFifZv at GOTPCREL[RIP]
> mov -010h[RBP],RAX
> movss XMM0,FLAT:.rodata[00h][RIP]
> movss -8[RBP],XMM0
> lea RDX,_TMP0 at PC32[RIP]
> mov EDI,0Eh
> mov RSI,RDX
> movss XMM0,-8[RBP]
> call _D3std5stdio17__T8writeflnTaTfZ8writeflnFNfxAafZv at PLT32
> mov EAX,02Ah
> movss XMM1,FLAT:.rodata[00h][RIP]
> movss -4[RBP],XMM1
> mov RDI,RAX
> movss XMM0,-4[RBP]
> call qword ptr -010h[RBP]
> xor EAX,EAX
> leave
> ret
> add [RAX],AL
> .text._Dmain ends
>
> The call to jumbled writefln() is a direct call inside func():
>
> call _D3std5stdio17__T8writeflnTaTfZ8writeflnFNfxAafZv at PLT32
My analysis is wrong because that writefln() is for the bar(float)
overload but I still think what you want is achieved.
Ali
More information about the Digitalmars-d-learn
mailing list