Skip to content

Instantly share code, notes, and snippets.

@mterwoord
Created November 10, 2016 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mterwoord/28a526514ee936f5414637e35d95d17b to your computer and use it in GitHub Desktop.
Save mterwoord/28a526514ee936f5414637e35d95d17b to your computer and use it in GitHub Desktop.
Test
IL_0000: nop
IL_0001: ldarg.0
IL_0002: call UserQuery.DoIt
IL_0007: pop
IL_0008: ret
DoIt:
IL_0000: nop
IL_0001: ldc.i4.0
IL_0002: stloc.0 // result
IL_0003: ldc.i4.4
IL_0004: newarr System.Int32
IL_0009: dup
IL_000A: ldtoken <PrivateImplementationDetails>.1456763F890A84558F99AFA687C36B9037697848
IL_000F: call System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray
IL_0014: newobj System.Collections.Generic.List<System.Int32>..ctor
IL_0019: stloc.1 // xList
IL_001A: nop
IL_001B: ldloc.1 // xList
IL_001C: callvirt System.Collections.Generic.List<System.Int32>.GetEnumerator
IL_0021: stloc.2
IL_0022: br.s IL_0044
IL_0024: ldloca.s 02
IL_0026: call System.Collections.Generic.List<System.Int32>.get_Current
IL_002B: stloc.3 // i
IL_002C: nop
IL_002D: ldloc.3 // i
IL_002E: ldc.i4.2
IL_002F: ceq
IL_0031: stloc.s 04 // flag
IL_0033: ldloc.s 04 // flag
IL_0035: stloc.s 05
IL_0037: ldloc.s 05
IL_0039: brfalse.s IL_0043
IL_003B: nop
IL_003C: ldc.i4.1
IL_003D: stloc.0 // result
IL_003E: ldloc.0 // result
IL_003F: stloc.s 06
IL_0041: leave.s IL_0063
IL_0043: nop
IL_0044: ldloca.s 02
IL_0046: call System.Collections.Generic.List<System.Int32>.MoveNext
IL_004B: brtrue.s IL_0024
IL_004D: leave.s IL_005E
IL_004F: ldloca.s 02
IL_0051: constrained. System.Collections.Generic.List<>.Enumerator
IL_0057: callvirt System.IDisposable.Dispose
IL_005C: nop
IL_005D: endfinally
IL_005E: ldc.i4.0
IL_005F: stloc.s 06
IL_0061: br.s IL_0063
IL_0063: ldloc.s 06
IL_0065: ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment