public static ulong GenerateStableValueForMathOp(MathOperationsMetaData.MathOps mathOp, ValueType returnType, ValueType[] paramTypes) { uint signature = GenerateSignatureFlag(returnType, paramTypes); uint op = (uint)mathOp; Assert.AreNotEqual((op & k_IsCustomOpBit), k_IsCustomOpBit, $"Op {mathOp} uses the {nameof(k_IsCustomOpBit)} bit"); ulong result = ((ulong)signature << 32) | op; return(result); }
internal static ulong GenerateStableValueForCustomOp(MathOperationsMetaData.CustomOps customOp, Runtime.ValueType returnType, Runtime.ValueType[] paramTypes) { uint signature = GenerateSignatureFlag(returnType, paramTypes); uint op = (uint)customOp; Assert.AreNotEqual((op & k_IsCustomOpBit), k_IsCustomOpBit, $"Op {customOp} uses the {nameof(k_IsCustomOpBit)} bit"); op |= k_IsCustomOpBit; ulong result = ((ulong)signature << 32) | op; return(result); }