Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Excerpt from Assembler output from previous Gist - C++ version of code from Eric Lippert's blog post "Construction destruction" http://ericlippert.com/2013/06/10/construction-destruction/
; Function compile flags: /Ogtp
; File c:\users\jamesc\documents\visual studio 2012\projects\ctordtor\ctordtor\ctordtor.cpp
; COMDAT _wmain
_TEXT SEGMENT
_argc$ = 8 ; size = 4
_argv$ = 12 ; size = 4
_wmain PROC ; COMDAT
; 43 : {
push esi
; 9 : static void Alpha() { printf("Alpha\n"); }
mov esi, DWORD PTR __imp__printf
push OFFSET ??_C@_06ELGDOHND@Alpha?6?$AA@
call esi
; 10 : static void Bravo() { printf("Bravo\n");}
push OFFSET ??_C@_06KEIPCNDB@Bravo?6?$AA@
call esi
; 11 : static void Charlie() { printf("Charlie\n"); }
push OFFSET ??_C@_08DINDEHIC@Charlie?6?$AA@
call esi
add esp, 12 ; 0000000cH
; 44 : SideEffects::M();
; 45 :
; 46 : return 0;
xor eax, eax
pop esi
; 47 : }
ret 0
_wmain ENDP
_TEXT ENDS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.