public bool IsSuperSetOf(CallGraphContextTag another) { var context = CurrentContext; // this byte trick checks if `context` is superset of `another` // context - we have only `context` bits // context & another - `context` bits which are present at `another` // (context & another) ^ another - `context` bits which are present at `another` became 0, // if `another` have any bits that are not present in `context` then expression won't be 0 // it means that `context` is not superset of `another` return(((context & another) ^ another) == CallGraphContextTag.NONE); }
public BoundContextTag(CallGraphContextTag context, ITreeNode node) { Context = context; Node = node; }
public bool ContainAny(CallGraphContextTag another) { var context = CurrentContext; return((context & another) != CallGraphContextTag.NONE); }