Skip to content

Instantly share code, notes, and snippets.

@luhenry
Created May 21, 2014 14:26
Show Gist options
  • Save luhenry/884b1d5820d07c395727 to your computer and use it in GitHub Desktop.
Save luhenry/884b1d5820d07c395727 to your computer and use it in GitHub Desktop.
converting method Driver:Benchmark ()
creating vars
creating locals
created temp 0 (R16) of type System.Int32
created temp 1 (R17) of type System.Int32
created temp 2 (R18) of type Driver
created temp 3 (R19) of type System.Diagnostics.Stopwatch
created temp 4 (R20) of type System.Diagnostics.Stopwatch
created temp 5 (R21) of type System.Int32
created temp 6 (R22) of type System.Func<System.Int32>
created temp 7 (R23) of type System.Diagnostics.Stopwatch
locals done
method to IR Driver:Benchmark ()
converting (in B2: stack: 0) IL_0000: ldc.i4 5000000
converting (in B2: stack: 1) IL_0005: stloc.1
converting (in B2: stack: 0) IL_0006: newobj 0x06000001
INLINE START 0x7ff4ba845e58 Driver:Benchmark () -> Driver:.ctor ()
method to IR Driver:.ctor ()
created temp 8 (R28) of type System.Object
converting (in B10: stack: 0) IL_0000: ldarg.0
converting (in B10: stack: 1) IL_0001: call 0x0a000008
converting (in B10: stack: 0) IL_0006: ret
INLINE END Driver:Benchmark () -> Driver:.ctor ()
converting (in B2: stack: 1) IL_000b: stloc.2
converting (in B2: stack: 0) IL_000c: call 0x0a000001
converting (in B2: stack: 1) IL_0011: stloc.3
converting (in B2: stack: 0) IL_0012: ldloc.3
converting (in B2: stack: 1) IL_0013: callvirt 0x0a000002
converting (in B2: stack: 0) IL_0018: call 0x0a000001
converting (in B2: stack: 1) IL_001d: stloc.s 4
converting (in B2: stack: 0) IL_001f: ldc.i4.0
converting (in B2: stack: 1) IL_0020: stloc.0
converting (in B2: stack: 0) IL_0021: ldc.i4.0
converting (in B2: stack: 1) IL_0022: stloc.s 5
converting (in B2: stack: 0) IL_0024: br IL_0048
converting (in B5: stack: 0) IL_0029: ldloc.2
converting (in B5: stack: 1) IL_002a: dup
created temp 9 (R37) of type System.Object
converting (in B5: stack: 2) IL_002b: ldvirtftn 0x06000003
CEE_LDVIRTFTN
converting (in B5: stack: 2) IL_0031: newobj 0x0a000003
invoke_impl = 0x108556ee8 method_ptr = 0x0
converting (in B5: stack: 2) IL_0036: stloc.s 6
converting (in B5: stack: 1) IL_0038: ldloc.0
converting (in B5: stack: 2) IL_0039: ldloc.s 6
converting (in B5: stack: 3) IL_003b: callvirt 0x0a000004
converting (in B5: stack: 3) IL_0040: add
converting (in B5: stack: 2) IL_0041: stloc.0
converting (in B5: stack: 1) IL_0042: ldloc.s 5
converting (in B5: stack: 2) IL_0044: ldc.i4.1
converting (in B5: stack: 3) IL_0045: add
converting (in B5: stack: 2) IL_0046: stloc.s 5
1 item(s) on exit from B5
created temp 10 (R57) of type System.Object
storing 0 to temp 10
loading 0 from temp 10
converting (in B4: stack: 1) IL_0048: ldloc.s 5
converting (in B4: stack: 2) IL_004a: ldloc.1
converting (in B4: stack: 3) IL_004b: blt IL_0029
1 item(s) on exit from B4
storing 0 to temp 10
loading 0 from temp 10
converting (in B6: stack: 1) IL_0050: ldloc.s 4
converting (in B6: stack: 2) IL_0052: callvirt 0x0a000002
converting (in B6: stack: 1) IL_0057: call 0x0a000001
converting (in B6: stack: 2) IL_005c: stloc.s 7
converting (in B6: stack: 1) IL_005e: ldloc.s 7
converting (in B6: stack: 2) IL_0060: callvirt 0x0a000002
converting (in B6: stack: 1) IL_0065: call 0x0a000005
converting (in B6: stack: 2) IL_006a: ldstr "s0 {0} s1 {1} s2 {2} r {3}"
converting (in B6: stack: 3) IL_006f: ldc.i4.4
converting (in B6: stack: 4) IL_0070: newarr 0x01000005
converting (in B6: stack: 4) IL_0075: dup
created temp 11 (R71) of type System.Object
converting (in B6: stack: 5) IL_0076: ldc.i4.0
converting (in B6: stack: 6) IL_0077: ldloc.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment