IL Code for BinaryTree[X].Contains(Value: X)

Back to source code.

.method public hidebysig instance bool Contains(!X Value) cil managed
{
      // Code Size: 26 byte(s)
      .maxstack 3
      // There are two comparisons.
      // The first one is compiled as a jump.
      L_0000: ldarg.0
      L_0001: ldfld Freya.DataStructures.Trees.BinaryTree`1/TreeNode
                    Freya.DataStructures.Trees.BinaryTree`1::Root
      L_0006: brfalse.s L_0018
      // The second one is compiled as a value.
      L_0008: ldarg.0
      L_0009: ldfld Freya.DataStructures.Trees.BinaryTree`1/TreeNode
                    Freya.DataStructures.Trees.BinaryTree`1::Root
      L_000e: ldarg.1
      L_000f: call instance Freya.DataStructures.Trees.BinaryTree`1/TreeNode
                    Freya.DataStructures.Trees.BinaryTree`1/TreeNode::Contains(!0)
      L_0014: ldnull
      // Instead of testing for inequality, (ceq, ldc_i4_0, ceq)
      // we consider both operands as unsigned integers (cgt_un).
      L_0015: cgt.un
      L_0017: ret
      L_0018: ldc.i4.0
      L_0019: ret
}