Skip to content

Instantly share code, notes, and snippets.

@benaadams
Created October 19, 2017 08:05
Show Gist options
  • Select an option

  • Save benaadams/9737ca2b92f591f44272fbc36c32cf4a to your computer and use it in GitHub Desktop.

Select an option

Save benaadams/9737ca2b92f591f44272fbc36c32cf4a to your computer and use it in GitHub Desktop.
Inlines into 06000010 <IntermediateAsync>d__3:MoveNext():this
[0 IL=0016 TR=000063 06000003] [FAILED: unprofitable inline] Program:DelayedAsync(int):ref
[1 IL=0021 TR=000067 06002329] [below ALWAYS_INLINE size] Task:GetAwaiter():struct:this
[2 IL=0001 TR=000140 060044FC] [below ALWAYS_INLINE size] TaskAwaiter:.ctor(ref):this
[3 IL=0029 TR=000077 060044FD] [below ALWAYS_INLINE size] TaskAwaiter:get_IsCompleted():bool:this
[4 IL=0006 TR=000162 060022FE] [below ALWAYS_INLINE size] Task:get_IsCompleted():bool:this
[5 IL=0010 TR=000174 060022FF] [below ALWAYS_INLINE size] Task:IsCompletedMethod(int):bool
[6 IL=0061 TR=000107 060044D6] [below ALWAYS_INLINE size] AsyncTaskMethodBuilder:AwaitUnsafeOnCompleted(byref,byref):this
[0 IL=0008 TR=000195 060044E1] [FAILED: too many il bytes] AsyncTaskMethodBuilder`1:AwaitUnsafeOnCompleted(byref,byref):this
[7 IL=0098 TR=000044 06004500] [below ALWAYS_INLINE size] TaskAwaiter:GetResult():this
[8 IL=0006 TR=000207 06004501] [aggressive inline attribute] TaskAwaiter:ValidateEnd(ref)
[9 IL=0001 TR=000213 060022E2] [aggressive inline attribute] Task:get_IsWaitNotificationEnabledOrNotRanToCompletion():bool:this
[0 IL=0009 TR=000223 06004502] [FAILED: noinline per IL/cached result] TaskAwaiter:HandleNonSuccessAndDebuggerNotification(ref):ref
[10 IL=0019 TR=000235 06003BAD] [aggressive inline attribute] ExceptionDispatchInfo:Throw():this
[0 IL=0007 TR=000261 0600039E] [FAILED: noinline per IL/cached result] Exception:RestoreExceptionDispatchInfo(ref):this
[0 IL=0121 TR=000128 060044D9] [FAILED: within catch region] AsyncTaskMethodBuilder:SetException(ref):this
[11 IL=0142 TR=000055 060044D8] [profitable inline] AsyncTaskMethodBuilder:SetResult():this
[12 IL=0011 TR=000282 060044EA] [profitable inline] AsyncTaskMethodBuilder`1:SetResult(ref):this
[0 IL=0026 TR=000304 060044E8] [FAILED: noinline per IL/cached result] AsyncTaskMethodBuilder`1:SetExistingTaskResult(struct):this
Budget: initialTime=504, finalTime=732, initialBudget=5040, currentBudget=5040
Budget: discretionary inline caused a force inline
Budget: initialSize=3505, finalSize=3969
; Assembly listing for method <IntermediateAsync>d__3:MoveNext():this
; Emitting BLENDED_CODE for X64 CPU with AVX
; optimized code
; rbp based frame
; fully interruptible
; Final local variable assignments
;
; V00 this [V00,T00] ( 18, 15 ) byref -> [rbp+0x10] do-not-enreg[H] this
; V01 loc0 [V01,T09] ( 2, 2 ) int -> rcx
; V02 loc1 [V02 ] ( 6, 6 ) struct ( 8) [rbp-0x10] do-not-enreg[XS] must-init addr-exposed ld-addr-op
;* V03 loc2 [V03 ] ( 0, 0 ) ref -> zero-ref class-hnd
;* V04 tmp0 [V04 ] ( 0, 0 ) int -> zero-ref
; V05 tmp1 [V05,T12] ( 2, 0 ) ref -> rdx class-hnd
; V06 tmp2 [V06,T02] ( 3, 6 ) ref -> rax class-hnd
;* V07 tmp3 [V07 ] ( 0, 0 ) struct ( 8) zero-ref
; V08 tmp4 [V08,T05] ( 2, 4 ) ref -> rdx ld-addr-op class-hnd
; V09 tmp5 [V09,T10] ( 2, 2 ) int -> rdx
; V10 tmp6 [V10,T06] ( 2, 4 ) byref -> rcx
; V11 tmp7 [V11,T03] ( 3, 5 ) ref -> rcx ld-addr-op class-hnd
; V12 tmp8 [V12,T04] ( 8, 4 ) ref -> rsi class-hnd
;* V13 tmp9 [V13 ] ( 0, 0 ) ref -> zero-ref ld-addr-op class-hnd
; V14 tmp10 [V14,T07] ( 2, 4 ) byref -> rsi
; V15 tmp11 [V15,T01] ( 4, 8 ) byref -> rsi
; V16 tmp12 [V16,T11] ( 2, 2 ) struct ( 8) [rbp-0x18] do-not-enreg[SF] must-init ld-addr-op
; V17 tmp13 [V17,T08] ( 2, 4 ) ref -> rdx class-hnd
; V18 tmp14 [V18 ] ( 6, 6 ) ref -> [rbp-0x10] do-not-enreg[X] addr-exposed V02.m_task(offs=0x00) P-DEP
;* V19 tmp15 [V19 ] ( 0, 0 ) ref -> zero-ref V07.m_task(offs=0x00) P-INDEP
; V20 OutArgs [V20 ] ( 1, 1 ) lclBlk (32) [rsp+0x00]
; V21 PSPSym [V21 ] ( 1, 1 ) long -> [rbp-0x20] do-not-enreg[X] addr-exposed
;* V22 tmp18 [V22 ] ( 0, 0 ) byref -> zero-ref
;
; Lcl frame size = 56
G_M53133_IG01:
55 push rbp
56 push rsi
4883EC38 sub rsp, 56
488D6C2440 lea rbp, [rsp+40H]
33C0 xor rax, rax
488945F0 mov qword ptr [rbp-10H], rax
488945E8 mov qword ptr [rbp-18H], rax
488965E0 mov qword ptr [rbp-20H], rsp
48894D10 mov bword ptr [rbp+10H], rcx
G_M53133_IG02:
488B4D10 mov rcx, bword ptr [rbp+10H]
8B09 mov ecx, dword ptr [rcx]
G_M53133_IG03:
85C9 test ecx, ecx
745A je SHORT G_M53133_IG04
488B4D10 mov rcx, bword ptr [rbp+10H]
8B4904 mov ecx, dword ptr [rcx+4]
E825DCFFFF call Program:DelayedAsync(int):ref
8B10 mov edx, dword ptr [rax]
488945F0 mov gword ptr [rbp-10H], rax
488B55F0 mov rdx, gword ptr [rbp-10H]
8B5234 mov edx, dword ptr [rdx+52]
F7C200006001 test edx, 0x1600000
7559 jne SHORT G_M53133_IG05
488B5510 mov rdx, bword ptr [rbp+10H]
33C9 xor ecx, ecx
890A mov dword ptr [rdx], ecx
488B5510 mov rdx, bword ptr [rbp+10H]
488D4A10 lea rcx, bword ptr [rdx+16]
488B55F0 mov rdx, gword ptr [rbp-10H]
E80F35A85F call CORINFO_HELP_CHECKED_ASSIGN_REF
488B5510 mov rdx, bword ptr [rbp+10H]
3912 cmp dword ptr [rdx], edx
488B5510 mov rdx, bword ptr [rbp+10H]
488D4A08 lea rcx, bword ptr [rdx+8]
488D55F0 lea rdx, bword ptr [rbp-10H]
4C8B4510 mov r8, bword ptr [rbp+10H]
E8CCF4FFFF call AsyncTaskMethodBuilder`1:AwaitUnsafeOnCompleted(byref,byref):this
E9B2000000 jmp G_M53133_IG08
G_M53133_IG04:
488B4D10 mov rcx, bword ptr [rbp+10H]
488B4910 mov rcx, gword ptr [rcx+16]
48894DF0 mov gword ptr [rbp-10H], rcx
488B4D10 mov rcx, bword ptr [rbp+10H]
33C0 xor rax, rax
48894110 mov qword ptr [rcx+16], rax
488B4D10 mov rcx, bword ptr [rbp+10H]
C701FFFFFFFF mov dword ptr [rcx], -1
G_M53133_IG05:
488B4DF0 mov rcx, gword ptr [rbp-10H]
8B4134 mov eax, dword ptr [rcx+52]
2500000011 and eax, 0x11000000
3D00000001 cmp eax, 0x1000000
7425 je SHORT G_M53133_IG06
E8BFE2FFFF call TaskAwaiter:HandleNonSuccessAndDebuggerNotification(ref):ref
488BF0 mov rsi, rax
4885F6 test rsi, rsi
7418 je SHORT G_M53133_IG06
488B4E08 mov rcx, gword ptr [rsi+8]
488BD6 mov rdx, rsi
3909 cmp dword ptr [rcx], ecx
E8113CFDFF call Exception:RestoreExceptionDispatchInfo(ref):this
488B4E08 mov rcx, gword ptr [rsi+8]
E82832A35F call CORINFO_HELP_THROW
CC int3
G_M53133_IG06:
488B4D10 mov rcx, bword ptr [rbp+10H]
C701FEFFFFFF mov dword ptr [rcx], -2
488B4D10 mov rcx, bword ptr [rbp+10H]
3909 cmp dword ptr [rcx], ecx
488B4D10 mov rcx, bword ptr [rbp+10H]
488D7108 lea rsi, bword ptr [rcx+8]
48B920307A0CF97F0000 mov rcx, 0x7FF90C7A3020
BA3A050000 mov edx, 0x53A
E8DB4DA85F call CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE
48BA60229970E2010000 mov rdx, 0x1E270992260
488B12 mov rdx, gword ptr [rdx]
48833E00 cmp gword ptr [rsi], 0
750A jne SHORT G_M53133_IG07
488BCE mov rcx, rsi
E85034A85F call CORINFO_HELP_CHECKED_ASSIGN_REF
EB11 jmp SHORT G_M53133_IG08
G_M53133_IG07:
C645E800 mov byte ptr [rbp-18H], 0
488BCE mov rcx, rsi
480FBE55E8 movsx rdx, byte ptr [rbp-18H]
E835E8FFFF call AsyncTaskMethodBuilder`1:SetExistingTaskResult(struct):this
G_M53133_IG08:
90 nop
G_M53133_IG09:
488D65F8 lea rsp, [rbp-08H]
5E pop rsi
5D pop rbp
C3 ret
G_M53133_IG10:
55 push rbp
56 push rsi
4883EC28 sub rsp, 40
488B6920 mov rbp, qword ptr [rcx+32]
48896C2420 mov qword ptr [rsp+20H], rbp
488D6D40 lea rbp, [rbp+40H]
G_M53133_IG11:
488B4D10 mov rcx, bword ptr [rbp+10H]
C701FEFFFFFF mov dword ptr [rcx], -2
488B4D10 mov rcx, bword ptr [rbp+10H]
3909 cmp dword ptr [rcx], ecx
488B4D10 mov rcx, bword ptr [rbp+10H]
4883C108 add rcx, 8
E895E2FFFF call AsyncTaskMethodBuilder:SetException(ref):this
488D05C1FFFFFF lea rax, G_M53133_IG08
G_M53133_IG12:
4883C428 add rsp, 40
5E pop rsi
5D pop rbp
C3 ret
; Total bytes of code 377, prolog size 29 for method <IntermediateAsync>d__3:MoveNext():this
; ============================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment