DIP 45 - approval discussion
Daniel Murphy
yebblies at nospamgmail.com
Sun Nov 17 21:25:34 PST 2013
"Walter Bright" <newshound2 at digitalmars.com> wrote in message
news:l6c7gt$27fc$1 at digitalmars.com...
>>
>> Right, I was saying the indirection still exists.
>>
>>
>
> No, not really, at least not on Windows. Try calling a function in the
> Windows API and disassemble it. You'll see a direct call.
You sure about that?
src:
import core.sys.windows.windows;
void main()
{
auto x = GetModuleHandleA(null);
}
obj:
__Dmain PROC NEAR
; COMDEF __Dmain
push 0 ; 0000 _ 6A, 00
call dword ptr [__imp__GetModuleHandleA at 4] ; 0002 _ FF. 15,
00000000(segrel)
xor eax, eax ; 0008 _ 31. C0
ret ; 000A _ C3
__Dmain ENDP
exe:
?_0072 LABEL NEAR
push 0 ; 00402010 _ 6A, 00
call dword ptr [?_0067] ; 00402012 _ FF. 15,
00401794(d)
xor eax, eax ; 00402018 _ 31. C0
ret ; 0040201A _ C3
More information about the Digitalmars-d
mailing list