1 write to _tc
Microsoft.CodeAnalysis.CSharp (1)
Utilities\ValueSetFactory.NumericValueSet.cs (1)
51
_tc
= tc;
51 references to _tc
Microsoft.CodeAnalysis.CSharp (51)
Utilities\ValueSetFactory.NumericValueSet.cs (51)
64
var gz = new NumericValueSetFactory<T>(
_tc
).Related(BinaryOperatorKind.GreaterThanOrEqual,
_tc
.Zero);
67
return
_tc
.ToConstantValue(t._intervals[0].first);
68
return
_tc
.ToConstantValue(this._intervals[this._intervals.Length - 1].last);
78
return _intervals.Length > 0 &&
_tc
.Related(relation, _intervals[0].first, value);
81
return _intervals.Length > 0 &&
_tc
.Related(relation, _intervals[_intervals.Length - 1].last, value);
96
return
_tc
.Related(GreaterThanOrEqual, value, _intervals[lastIntervalIndex].first) &&
_tc
.Related(LessThanOrEqual, value, _intervals[lastIntervalIndex].last);
99
if (
_tc
.Related(LessThanOrEqual, value, _intervals[midIndex].last))
107
bool IValueSet.Any(BinaryOperatorKind relation, ConstantValue value) => value.IsBad || Any(relation,
_tc
.FromConstantValue(value));
118
return
_tc
.Related(relation, _intervals[_intervals.Length - 1].last, value);
121
return
_tc
.Related(relation, _intervals[0].first, value);
123
return _intervals.Length == 1 &&
_tc
.Related(Equal, _intervals[0].first, value) &&
_tc
.Related(Equal, _intervals[0].last, value);
129
bool IValueSet.All(BinaryOperatorKind relation, ConstantValue value) => !value.IsBad && All(relation,
_tc
.FromConstantValue(value));
134
return AllValues(
_tc
);
139
if (
_tc
.Related(LessThan,
_tc
.MinValue, _intervals[0].first))
141
builder.Add((
_tc
.MinValue,
_tc
.Prev(_intervals[0].first)));
148
builder.Add((
_tc
.Next(_intervals[i].last),
_tc
.Prev(_intervals[i + 1].first)));
152
if (
_tc
.Related(LessThan, _intervals[lastIndex].last,
_tc
.MaxValue))
154
builder.Add((
_tc
.Next(_intervals[lastIndex].last),
_tc
.MaxValue));
157
return new NumericValueSet<T>(builder.ToImmutableAndFree(),
_tc
);
165
Debug.Assert(this.
_tc
.GetType() == other.
_tc
.GetType());
176
if (
_tc
.Related(LessThan, leftInterval.last, rightInterval.first))
180
else if (
_tc
.Related(LessThan, rightInterval.last, leftInterval.first))
186
Add(builder, Max(leftInterval.first, rightInterval.first,
_tc
), Min(leftInterval.last, rightInterval.last,
_tc
),
_tc
);
187
if (
_tc
.Related(LessThan, leftInterval.last, rightInterval.last))
191
else if (
_tc
.Related(LessThan, rightInterval.last, leftInterval.last))
203
return new NumericValueSet<T>(builder.ToImmutableAndFree(),
_tc
);
242
Debug.Assert(this.
_tc
.GetType() == other.
_tc
.GetType());
253
if (
_tc
.Related(LessThan, leftInterval.last, rightInterval.first))
255
Add(builder, leftInterval.first, leftInterval.last,
_tc
);
258
else if (
_tc
.Related(LessThan, rightInterval.last, leftInterval.first))
260
Add(builder, rightInterval.first, rightInterval.last,
_tc
);
265
Add(builder, Min(leftInterval.first, rightInterval.first,
_tc
), Max(leftInterval.last, rightInterval.last,
_tc
),
_tc
);
274
Add(builder, leftInterval.first, leftInterval.last,
_tc
);
281
Add(builder, rightInterval.first, rightInterval.last,
_tc
);
285
return new NumericValueSet<T>(builder.ToImmutableAndFree(),
_tc
);
317
return string.Join(",", this._intervals.Select(p => $"[{
_tc
.ToString(p.first)}..{
_tc
.ToString(p.last)}]"));