public static ILEmitter EmitHashing(this IHasherEmitter hasher, ILEmitter il, LocalBuilder hash) { var add = Add( Shl(Ldloc(hash), Ldc_I4(5)), Ldloc(hash)); return(il .Xor(add, Cast <long>(hasher.Emit(hash))) // todo: 2. need to cast? .Stloc(hash)); }
public static ILEmitterFunc Emit(this IHasherEmitter hasher, LocalBuilder hash) => (in ILEmitter il) => hasher.Emit(il, hash);