Last active
December 27, 2015 10:19
-
-
Save einarwh/7310419 to your computer and use it in GitHub Desktop.
Bytecode for the rewritten Add method.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.method private hidebysig static | |
int32 Add ( | |
int32 x, | |
int32 y | |
) cil managed | |
{ | |
// Method begins at RVA 0x2088 | |
// Code size 18 (0x12) | |
.maxstack 8 | |
IL_0000: ldarg.0 | |
IL_0001: ldc.i4.0 | |
IL_0002: bgt.s IL_0006 | |
IL_0004: ldarg.1 | |
IL_0005: ret | |
IL_0006: ldarg.0 | |
IL_0007: ldc.i4.1 | |
IL_0008: sub | |
IL_0009: ldarg.1 | |
IL_000a: ldc.i4.1 | |
IL_000b: add | |
IL_0010: starg 1 | |
IL_0011: starg 0 | |
IL_0012: br.s IL_0000 | |
} // end of method Program::Add |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment