public CaseExpr( IPersistentMap sourceSpan, LocalBindingExpr expr, int shift, int mask, int low, int high, Expr defaultExpr,
SortedDictionary<int, Expr> tests, Dictionary<int, Expr> thens, Keyword switchType, Keyword testType, IPersistentSet skipCheck)
{
_sourceSpan = sourceSpan;
_expr = expr;
_shift = shift;
_mask = mask;
//_low = low;
//_high = high;
_defaultExpr = defaultExpr;
_tests = tests;
_thens = thens;
if (switchType != _compactKey && switchType != _sparseKey)
throw new ArgumentException("Unexpected switch type: " + switchType);
//_switchType = switchType;
if (testType != _intKey && testType != _hashEquivKey && testType != _hashIdentityKey)
throw new ArgumentException("Unexpected test type: " + testType);
_testType = testType;
_skipCheck = skipCheck;
ICollection<Expr> returns = new List<Expr>(thens.Values);
returns.Add(defaultExpr);
_returnType = Compiler.MaybeClrType(returns);
if (RT.count(skipCheck) > 0 && RT.booleanCast(RT.WarnOnReflectionVar.deref()))
{
RT.errPrintWriter().WriteLine("Performance warning, {0}:{1} - hash collision of some case test constants; if selected, those entries will be tested sequentially.",
Compiler.SourcePathVar.deref(),RT.get(sourceSpan,RT.StartLineKey));
}
}