Skip to content

Instantly share code, notes, and snippets.

@nedgrady
Created June 23, 2019 15:46
Show Gist options
  • Save nedgrady/e01876c7782ca7fc7967458b6eb3b0de to your computer and use it in GitHub Desktop.
Save nedgrady/e01876c7782ca7fc7967458b6eb3b0de to your computer and use it in GitHub Desktop.
// call our first method, leaving the argument result on the stack top
IL_0001: call UserQuery.SideEffectOne
// jump to IL_000F if the first method returned false, pop from the stack
IL_0006: brfalse.s IL_000F
// call our second method, leaving the argument result on the stack top
IL_0008: call UserQuery.SideEffectTwo
// always jump to IL_0010, (no value popped!)
IL_000D: br.s IL_0010
// load integer value of 0 on to the stack top
IL_000F: ldc.i4.0
// store the value at the top of the stack into the memory chosen for p
IL_0010: stloc.0 // p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment