Skip to content

Instantly share code, notes, and snippets.

@otf
Last active December 16, 2015 06:58
Show Gist options
  • Save otf/5394802 to your computer and use it in GitHub Desktop.
Save otf/5394802 to your computer and use it in GitHub Desktop.
こんな感じの関数```return FirstName != null && IsActive;```

Debug時

{IL_0000: nop}
{IL_0001: ldarg.0}
{IL_0002: call System.String get_FirstName()}
{IL_0007: brfalse.s IL_0011}
{IL_0009: ldarg.0}
{IL_000a: call Boolean get_IsActive()}
{IL_000f: br.s IL_0012}
{IL_0011: ldc.i4.0}
{IL_0012: nop}
{IL_0013: stloc.0}
{IL_0014: br.s IL_0016}
{IL_0016: ldloc.0}
{IL_0017: ret}

Debug時(nop除く)

{IL_0001: ldarg.0}
{IL_0002: call System.String get_FirstName()}
{IL_0007: brfalse.s IL_0011}
{IL_0009: ldarg.0}
{IL_000a: call Boolean get_IsActive()}
{IL_000f: br.s IL_0012}
{IL_0011: ldc.i4.0}
{IL_0013: stloc.0}
{IL_0014: br.s IL_0016}
{IL_0016: ldloc.0}
{IL_0017: ret}

Release時

{IL_0000: ldarg.0}
{IL_0001: call System.String get_FirstName()}
{IL_0006: brfalse.s IL_000f}
{IL_0008: ldarg.0}
{IL_0009: call Boolean get_IsActive()}
{IL_000e: ret}
{IL_000f: ldc.i4.0}
{IL_0010: ret}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment