Lines Matching refs:Range
197 int32_t Range::Mask() const {
210 void Range::AddConstant(int32_t value) {
222 void Range::Intersect(Range* other) {
230 void Range::Union(Range* other) {
238 void Range::CombinedMax(Range* other) {
245 void Range::CombinedMin(Range* other) {
252 void Range::Sar(int32_t value) {
260 void Range::Shl(int32_t value) {
274 bool Range::AddAndCheckOverflow(const Representation& r, Range* other) {
290 bool Range::SubAndCheckOverflow(const Representation& r, Range* other) {
305 void Range::Clear() {
310 void Range::KeepOrder() {
320 void Range::Verify() const {
326 bool Range::MulAndCheckOverflow(const Representation& r, Range* other) {
629 void HValue::AddNewRange(Range* r, Zone* zone) {
631 if (!HasRange()) range_ = new(zone) Range();
984 Range* HBoundsCheck::InferRange(Zone* zone) {
987 int upper = length()->range()->upper() - (allow_equality() ? 0 : 1);
990 Range* result = new(zone) Range(lower, upper);
992 result->Intersect(index()->range());
1160 Range* HUnaryMathOperation::InferRange(Zone* zone) {
1162 if (op() == kMathClz32) return new(zone) Range(0, 32);
1165 int upper = value()->range()->upper();
1166 int lower = value()->range()->lower();
1167 bool spans_zero = value()->range()->CanBeZero();
1172 Range* result =
1173 new(zone) Range(spans_zero ? 0 : Min(abs_lower, abs_upper),
1685 Range* HValue::InferRange(Zone* zone) {
1686 Range* result;
1688 result = new(zone) Range(Smi::kMinValue, Smi::kMaxValue);
1691 result = new(zone) Range();
1693 // TODO(jkummerow): The range cannot be minus zero when the upper type
1700 Range* HChange::InferRange(Zone* zone) {
1701 Range* input_range = value()->range();
1716 // The Range class can't express upper bounds in the (kMaxInt, kMaxUint32]
1720 Range* result = (input_range != NULL)
1731 Range* HConstant::InferRange(Zone* zone) {
1733 Range* result = new(zone) Range(int32_value_, int32_value_);
1744 Range* HPhi::InferRange(Zone* zone) {
1748 Range* range = r.IsSmi()
1749 ? new(zone) Range(Smi::kMinValue, Smi::kMaxValue)
1750 : new(zone) Range(kMinInt, kMaxInt);
1751 return range;
1753 Range* range = OperandAt(0)->range()->Copy(zone);
1755 range->Union(OperandAt(i)->range());
1757 return range;
1765 Range* HAdd::InferRange(Zone* zone) {
1768 Range* a = left()->range();
1769 Range* b = right()->range();
1770 Range* res = a->Copy(zone);
1786 Range* HSub::InferRange(Zone* zone) {
1789 Range* a = left()->range();
1790 Range* b = right()->range();
1791 Range* res = a->Copy(zone);
1807 Range* HMul::InferRange(Zone* zone) {
1810 Range* a = left()->range();
1811 Range* b = right()->range();
1812 Range* res = a->Copy(zone);
1833 Range* HDiv::InferRange(Zone* zone) {
1835 Range* a = left()->range();
1836 Range* b = right()->range();
1837 Range* result = new(zone) Range();
1855 Range* HMathFloorOfDiv::InferRange(Zone* zone) {
1857 Range* a = left()->range();
1858 Range* b = right()->range();
1859 Range* result = new(zone) Range();
1894 Range* HMod::InferRange(Zone* zone) {
1896 Range* a = left()->range();
1897 Range* b = right()->range();
1904 Range* result = new(zone) Range(left_can_be_negative ? -positive_bound : 0,
1928 Range* HMathMinMax::InferRange(Zone* zone) {
1930 Range* a = left()->range();
1931 Range* b = right()->range();
1932 Range* res = a->Copy(zone);
2281 // It's possible to create a constant with a value in Smi-range but stored
2305 // It's possible to create a constant with a value in Smi-range but stored
2578 Range* HBitwise::InferRange(Zone* zone) {
2583 // If the range can be negative, the minimum int is a negative number with
2587 int64_t left_upper = left()->range()->upper();
2588 int64_t left_lower = left()->range()->lower();
2589 int64_t right_upper = right()->range()->upper();
2590 int64_t right_lower = right()->range()->lower();
2603 int32_t min = (left()->range()->CanBeNegative() ||
2604 right()->range()->CanBeNegative())
2606 return new(zone) Range(min, static_cast<int32_t>(limit - 1));
2608 Range* result = HValue::InferRange(zone);
2613 int32_t left_mask = (left()->range() != NULL)
2614 ? left()->range()->Mask()
2616 int32_t right_mask = (right()->range() != NULL)
2617 ? right()->range()->Mask()
2622 if (result_mask >= 0) return new(zone) Range(0, result_mask);
2624 Range* result = HValue::InferRange(zone);
2630 Range* HSar::InferRange(Zone* zone) {
2634 Range* result = (left()->range() != NULL)
2635 ? left()->range()->Copy(zone)
2636 : new(zone) Range();
2645 Range* HShr::InferRange(Zone* zone) {
2650 if (left()->range()->CanBeNegative()) {
2653 ? new(zone) Range(0,
2655 : new(zone) Range();
2658 Range* result = (left()->range() != NULL)
2659 ? left()->range()->Copy(zone)
2660 : new(zone) Range();
2670 Range* HShl::InferRange(Zone* zone) {
2674 Range* result = (left()->range() != NULL)
2675 ? left()->range()->Copy(zone)
2676 : new(zone) Range();
2685 Range* HLoadNamedField::InferRange(Zone* zone) {
2687 return new(zone) Range(kMinInt8, kMaxInt8);
2690 return new(zone) Range(kMinUInt8, kMaxUInt8);
2693 return new(zone) Range(kMinInt16, kMaxInt16);
2696 Range(kMinUInt16, kMaxUInt16);
2699 return new(zone) Range(0, String::kMaxLength);
2705 Range* HLoadKeyed::InferRange(Zone* zone) {
2708 return new(zone) Range(kMinInt8, kMaxInt8);
2711 return new(zone) Range(kMinUInt8, kMaxUInt8);
2713 return new(zone) Range(kMinInt16, kMaxInt16);
2715 return new(zone) Range(kMinUInt16, kMaxUInt16);