Пример #1
0
        private static bool EvaluateBeq(ConstValue leftVal, ConstValue rightVal)
        {
            var clrTypeCode = leftVal.ComputedType().ClrTypeCode;

            switch (clrTypeCode)
            {
            case TypeCode.Int32:
                return((int)leftVal.Value == (int)rightVal.Value);

            default:
                throw new InvalidDataException(
                          "ConstantVariableEvaluation optimization. Case not handled, report a bug with reduced code");
            }
        }