C#: Compare CIL entities directly by handle rather than by label.

C#: Remove IDs from the CIL extractor and make consistent with C# extractor.
C#: Fix method collisions.
This commit is contained in:
Calum Grant
2019-08-13 18:50:25 +01:00
parent 685c494bcb
commit b500a02b1e
34 changed files with 878 additions and 642 deletions

View File

@@ -86,5 +86,19 @@ namespace Semmle.Util
{
items.ForEach(_ => { });
}
/// <summary>
/// Computes a hash of a sequence.
/// </summary>
/// <typeparam name="T">The type of the item.</typeparam>
/// <param name="items">The list of items to hash.</param>
/// <returns>The hash code.</returns>
public static int SequenceHash<T>(this IEnumerable<T> items)
{
int h = 0;
foreach (var i in items)
h = h * 7 + i.GetHashCode();
return h;
}
}
}