Lines Matching refs:Range
198 int32_t Range::Mask() const {
211 void Range::AddConstant(int32_t value) {
223 void Range::Intersect(Range* other) {
231 void Range::Union(Range* other) {
239 void Range::CombinedMax(Range* other) {
246 void Range::CombinedMin(Range* other) {
253 void Range::Sar(int32_t value) {
261 void Range::Shl(int32_t value) {
275 bool Range::AddAndCheckOverflow(const Representation& r, Range* other) {
291 bool Range::SubAndCheckOverflow(const Representation& r, Range* other) {
306 void Range::Clear() {
311 void Range::KeepOrder() {
321 void Range::Verify() const {
327 bool Range::MulAndCheckOverflow(const Representation& r, Range* other) {
630 void HValue::AddNewRange(Range* r, Zone* zone) {
632 if (!HasRange()) range_ = new(zone) Range();
985 Range* HBoundsCheck::InferRange(Zone* zone) {
988 int upper = length()->range()->upper() - (allow_equality() ? 0 : 1);
991 Range* result = new(zone) Range(lower, upper);
993 result->Intersect(index()->range());
1161 Range* HUnaryMathOperation::InferRange(Zone* zone) {
1163 if (op() == kMathClz32) return new(zone) Range(0, 32);
1166 int upper = value()->range()->upper();
1167 int lower = value()->range()->lower();
1168 bool spans_zero = value()->range()->CanBeZero();
1173 Range* result =
1174 new(zone) Range(spans_zero ? 0 : Min(abs_lower, abs_upper),
1675 Range* HValue::InferRange(Zone* zone) {
1676 Range* result;
1678 result = new(zone) Range(Smi::kMinValue, Smi::kMaxValue);
1681 result = new(zone) Range();
1683 // TODO(jkummerow): The range cannot be minus zero when the upper type
1690 Range* HChange::InferRange(Zone* zone) {
1691 Range* input_range = value()->range();
1706 // The Range class can't express upper bounds in the (kMaxInt, kMaxUint32]
1710 Range* result = (input_range != NULL)
1721 Range* HConstant::InferRange(Zone* zone) {
1723 Range* result = new(zone) Range(int32_value_, int32_value_);
1734 Range* HPhi::InferRange(Zone* zone) {
1738 Range* range = r.IsSmi()
1739 ? new(zone) Range(Smi::kMinValue, Smi::kMaxValue)
1740 : new(zone) Range(kMinInt, kMaxInt);
1741 return range;
1743 Range* range = OperandAt(0)->range()->Copy(zone);
1745 range->Union(OperandAt(i)->range());
1747 return range;
1755 Range* HAdd::InferRange(Zone* zone) {
1758 Range* a = left()->range();
1759 Range* b = right()->range();
1760 Range* res = a->Copy(zone);
1776 Range* HSub::InferRange(Zone* zone) {
1779 Range* a = left()->range();
1780 Range* b = right()->range();
1781 Range* res = a->Copy(zone);
1797 Range* HMul::InferRange(Zone* zone) {
1800 Range* a = left()->range();
1801 Range* b = right()->range();
1802 Range* res = a->Copy(zone);
1823 Range* HDiv::InferRange(Zone* zone) {
1825 Range* a = left()->range();
1826 Range* b = right()->range();
1827 Range* result = new(zone) Range();
1845 Range* HMathFloorOfDiv::InferRange(Zone* zone) {
1847 Range* a = left()->range();
1848 Range* b = right()->range();
1849 Range* result = new(zone) Range();
1884 Range* HMod::InferRange(Zone* zone) {
1886 Range* a = left()->range();
1887 Range* b = right()->range();
1894 Range* result = new(zone) Range(left_can_be_negative ? -positive_bound : 0,
1918 Range* HMathMinMax::InferRange(Zone* zone) {
1920 Range* a = left()->range();
1921 Range* b = right()->range();
1922 Range* res = a->Copy(zone);
2276 // It's possible to create a constant with a value in Smi-range but stored
2300 // It's possible to create a constant with a value in Smi-range but stored
2573 Range* HBitwise::InferRange(Zone* zone) {
2578 // If the range can be negative, the minimum int is a negative number with
2582 int64_t left_upper = left()->range()->upper();
2583 int64_t left_lower = left()->range()->lower();
2584 int64_t right_upper = right()->range()->upper();
2585 int64_t right_lower = right()->range()->lower();
2598 int32_t min = (left()->range()->CanBeNegative() ||
2599 right()->range()->CanBeNegative())
2601 return new(zone) Range(min, static_cast<int32_t>(limit - 1));
2603 Range* result = HValue::InferRange(zone);
2608 int32_t left_mask = (left()->range() != NULL)
2609 ? left()->range()->Mask()
2611 int32_t right_mask = (right()->range() != NULL)
2612 ? right()->range()->Mask()
2617 if (result_mask >= 0) return new(zone) Range(0, result_mask);
2619 Range* result = HValue::InferRange(zone);
2625 Range* HSar::InferRange(Zone* zone) {
2629 Range* result = (left()->range() != NULL)
2630 ? left()->range()->Copy(zone)
2631 : new(zone) Range();
2640 Range* HShr::InferRange(Zone* zone) {
2645 if (left()->range()->CanBeNegative()) {
2648 ? new(zone) Range(0,
2650 : new(zone) Range();
2653 Range* result = (left()->range() != NULL)
2654 ? left()->range()->Copy(zone)
2655 : new(zone) Range();
2665 Range* HShl::InferRange(Zone* zone) {
2669 Range* result = (left()->range() != NULL)
2670 ? left()->range()->Copy(zone)
2671 : new(zone) Range();
2680 Range* HLoadNamedField::InferRange(Zone* zone) {
2682 return new(zone) Range(kMinInt8, kMaxInt8);
2685 return new(zone) Range(kMinUInt8, kMaxUInt8);
2688 return new(zone) Range(kMinInt16, kMaxInt16);
2691 return new(zone) Range(kMinUInt16, kMaxUInt16);
2694 Range(0, String::kMaxLength);
2700 Range* HLoadKeyed::InferRange(Zone* zone) {
2703 return new(zone) Range(kMinInt8, kMaxInt8);
2706 return new(zone) Range(kMinUInt8, kMaxUInt8);
2708 return new(zone) Range(kMinInt16, kMaxInt16);
2710 return new(zone) Range(kMinUInt16, kMaxUInt16);