Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

yes, for `scope(exit)`. Here's the assembler generated:

                push    RBP
                mov     RBP,RSP
                sub     RSP,020h
                mov     -020h[RBP],RBX
                mov     -018h[RBP],R12
                mov     -010h[RBP],R13
                mov     -8[RBP],EDI
                mov     EBX,-8[RBP]
                mov     EDI,EBX
                call      _D5test312do_somethingFiZi@PC32
                test    EAX,EAX
                jne     L2F
                xor     R13D,R13D
                mov     EBX,1
                jmp short       L79
    L2F:        mov     EDI,EBX
                call      _D5test310init_stuffFiZi@PC32
                test    EAX,EAX
                jne     L4A
                xor     R13D,R13D
                mov     R12D,4
                mov     EBX,4
                jmp short       L68
    L4A:        mov     -8[RBP],EBX
                mov     EDI,-8[RBP]
                call      _D5test312do_the_thingFiZPi@PC32
                mov     R13,RAX
                mov     R12D,7
                mov     EBX,7
                call      _D5test38cleanup3FZv@PC32
    L68:        call      _D5test38cleanup2FZv@PC32
                cmp     R12D,4
                je      L79
                cmp     R12D,7
                jne     L8B
    L79:        call      _D5test38cleanup1FZv@PC32
                cmp     EBX,1
                je      L8B
                cmp     EBX,4
                je      L8B
                cmp     EBX,7
    L8B:        mov     RAX,R13
                mov     RBX,-020h[RBP]
                mov     R12,-018h[RBP]
                mov     R13,-010h[RBP]
                mov     RSP,RBP
                pop     RBP
                ret


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: