Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
dart::RangeBoundary Class Reference

#include <range_analysis.h>

Inheritance diagram for dart::RangeBoundary:
dart::ValueObject

Public Types

enum  Kind { FOR_EACH_RANGE_BOUNDARY_KIND =(KIND_DEFN) }
 
enum  RangeSize {
  kRangeBoundarySmi , kRangeBoundaryInt8 , kRangeBoundaryInt16 , kRangeBoundaryInt32 ,
  kRangeBoundaryInt64
}
 

Public Member Functions

 RangeBoundary ()
 
 RangeBoundary (const RangeBoundary &other)
 
 RangeBoundary (int64_t val)
 
RangeBoundaryoperator= (const RangeBoundary &other)
 
bool OverflowedSmi () const
 
bool Overflowed (RangeBoundary::RangeSize size) const
 
RangeBoundary Clamp (RangeSize size) const
 
bool IsMinimumOrBelow (RangeSize size) const
 
bool IsMaximumOrAbove (RangeSize size) const
 
intptr_t kind () const
 
bool IsUnknown () const
 
bool IsConstant () const
 
bool IsSymbol () const
 
int64_t ConstantValue () const
 
Definitionsymbol () const
 
int64_t offset () const
 
RangeBoundary LowerBound () const
 
RangeBoundary UpperBound () const
 
void PrintTo (BaseTextBuffer *f) const
 
const char * ToCString () const
 
bool Equals (const RangeBoundary &other) const
 
int64_t UpperBound (RangeSize size) const
 
int64_t LowerBound (RangeSize size) const
 
int64_t SmiUpperBound () const
 
int64_t SmiLowerBound () const
 
void Write (FlowGraphSerializer *s) const
 
 RangeBoundary (FlowGraphDeserializer *d)
 
- Public Member Functions inherited from dart::ValueObject
 ValueObject ()
 
 ~ValueObject ()
 

Static Public Member Functions

static RangeBoundary FromConstant (int64_t val)
 
static RangeBoundary FromDefinition (Definition *defn, int64_t offs=0)
 
static bool IsValidOffsetForSymbolicRangeBoundary (int64_t offset)
 
static RangeBoundary MinSmi ()
 
static RangeBoundary MaxSmi ()
 
static RangeBoundary MinConstant (RangeSize size)
 
static RangeBoundary MaxConstant (RangeSize size)
 
static RangeBoundary IntersectionMin (RangeBoundary a, RangeBoundary b)
 
static RangeBoundary IntersectionMax (RangeBoundary a, RangeBoundary b)
 
static RangeBoundary JoinMin (RangeBoundary a, RangeBoundary b, RangeBoundary::RangeSize size)
 
static RangeBoundary JoinMax (RangeBoundary a, RangeBoundary b, RangeBoundary::RangeSize size)
 
static bool WillAddOverflow (const RangeBoundary &a, const RangeBoundary &b)
 
static RangeBoundary Add (const RangeBoundary &a, const RangeBoundary &b)
 
static bool WillSubOverflow (const RangeBoundary &a, const RangeBoundary &b)
 
static RangeBoundary Sub (const RangeBoundary &a, const RangeBoundary &b)
 
static bool WillShlOverflow (const RangeBoundary &a, int64_t shift_count)
 
static RangeBoundary Shl (const RangeBoundary &value_boundary, int64_t shift_count)
 
static RangeBoundary Shr (const RangeBoundary &value_boundary, int64_t shift_count)
 
static bool SymbolicAdd (const RangeBoundary &a, const RangeBoundary &b, RangeBoundary *result)
 
static bool SymbolicSub (const RangeBoundary &a, const RangeBoundary &b, RangeBoundary *result)
 

Static Public Attributes

static constexpr int64_t kMin = kMinInt64
 
static constexpr int64_t kMax = kMaxInt64
 

Detailed Description

Definition at line 17 of file range_analysis.h.

Member Enumeration Documentation

◆ Kind

Enumerator
FOR_EACH_RANGE_BOUNDARY_KIND 

Definition at line 25 of file range_analysis.h.

#define KIND_DEFN(name)
Definition il.h:4364

◆ RangeSize

Enumerator
kRangeBoundarySmi 
kRangeBoundaryInt8 
kRangeBoundaryInt16 
kRangeBoundaryInt32 
kRangeBoundaryInt64 

Definition at line 28 of file range_analysis.h.

Constructor & Destructor Documentation

◆ RangeBoundary() [1/4]

dart::RangeBoundary::RangeBoundary ( )
inline

Definition at line 36 of file range_analysis.h.

36: kind_(kUnknown), value_(0), offset_(0) {}

◆ RangeBoundary() [2/4]

dart::RangeBoundary::RangeBoundary ( const RangeBoundary other)
inline

Definition at line 38 of file range_analysis.h.

39 : ValueObject(),
40 kind_(other.kind_),
41 value_(other.value_),
42 offset_(other.offset_) {}

◆ RangeBoundary() [3/4]

dart::RangeBoundary::RangeBoundary ( int64_t  val)
inlineexplicit

Definition at line 44 of file range_analysis.h.

45 : kind_(kConstant), value_(val), offset_(0) {}

◆ RangeBoundary() [4/4]

dart::RangeBoundary::RangeBoundary ( FlowGraphDeserializer d)
explicit

Definition at line 2220 of file il_serializer.cc.

2221 : kind_(static_cast<Kind>(d->Read<int8_t>())),
2222 value_(d->Read<int64_t>()),
2223 offset_(d->Read<int64_t>()) {}
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
Definition main.cc:19

Member Function Documentation

◆ Add()

RangeBoundary dart::RangeBoundary::Add ( const RangeBoundary a,
const RangeBoundary b 
)
static

Definition at line 1730 of file range_analysis.cc.

1731 {
1732 ASSERT(a.IsConstant() && b.IsConstant());
1734 const int64_t result = a.ConstantValue() + b.ConstantValue();
1736}
static bool WillAddOverflow(const RangeBoundary &a, const RangeBoundary &b)
static RangeBoundary FromConstant(int64_t val)
#define ASSERT(E)
static bool b
struct MyStruct a[10]
GAsyncResult * result

◆ Clamp()

RangeBoundary dart::RangeBoundary::Clamp ( RangeSize  size) const
inline

Definition at line 160 of file range_analysis.h.

160 {
161 if (IsConstant()) {
162 const RangeBoundary range_min = RangeBoundary::MinConstant(size);
163 const RangeBoundary range_max = RangeBoundary::MaxConstant(size);
164
165 if (ConstantValue() <= range_min.ConstantValue()) {
166 return range_min;
167 }
168 if (ConstantValue() >= range_max.ConstantValue()) {
169 return range_max;
170 }
171 }
172
173 // If this range is a symbolic range, we do not clamp it.
174 // This could lead to some imprecision later on.
175 return *this;
176 }
bool IsConstant() const
static RangeBoundary MinConstant(RangeSize size)
int64_t ConstantValue() const
static RangeBoundary MaxConstant(RangeSize size)

◆ ConstantValue()

int64_t dart::RangeBoundary::ConstantValue ( ) const

Definition at line 2094 of file range_analysis.cc.

2094 {
2095 ASSERT(IsConstant());
2096 return value_;
2097}

◆ Equals()

bool dart::RangeBoundary::Equals ( const RangeBoundary other) const

Definition at line 1794 of file range_analysis.cc.

1794 {
1795 if (IsConstant() && other.IsConstant()) {
1796 return ConstantValue() == other.ConstantValue();
1797 } else if (IsSymbol() && other.IsSymbol()) {
1798 return (offset() == other.offset()) && DependOnSameSymbol(*this, other);
1799 } else if (IsUnknown() && other.IsUnknown()) {
1800 return true;
1801 }
1802 return false;
1803}
int64_t offset() const
static bool DependOnSameSymbol(const RangeBoundary &a, const RangeBoundary &b)

◆ FromConstant()

static RangeBoundary dart::RangeBoundary::FromConstant ( int64_t  val)
inlinestatic

Definition at line 58 of file range_analysis.h.

58{ return RangeBoundary(val); }

◆ FromDefinition()

RangeBoundary dart::RangeBoundary::FromDefinition ( Definition defn,
int64_t  offs = 0 
)
static

Definition at line 1703 of file range_analysis.cc.

1703 {
1704 if (defn->IsConstant() && defn->AsConstant()->IsSmi()) {
1705 return FromConstant(Smi::Cast(defn->AsConstant()->value()).Value() + offs);
1706 }
1708 return RangeBoundary(kSymbol, reinterpret_cast<intptr_t>(defn), offs);
1709}
static bool IsValidOffsetForSymbolicRangeBoundary(int64_t offset)

◆ IntersectionMax()

RangeBoundary dart::RangeBoundary::IntersectionMax ( RangeBoundary  a,
RangeBoundary  b 
)
static

Definition at line 2065 of file range_analysis.cc.

2065 {
2066 ASSERT(!a.IsUnknown() && !b.IsUnknown());
2067
2068 if (a.Equals(b)) {
2069 return a;
2070 }
2071
2072 if (a.IsConstant() && b.IsConstant()) {
2073 return RangeBoundary(Utils::Minimum(a.ConstantValue(), b.ConstantValue()));
2074 }
2075
2076 if (a.IsMaximumOrAbove(RangeBoundary::kRangeBoundarySmi)) {
2077 return b;
2078 } else if (b.IsMaximumOrAbove(RangeBoundary::kRangeBoundarySmi)) {
2079 return a;
2080 }
2081
2085 return (a.offset() <= b.offset()) ? a : b;
2086 }
2087
2088 const int64_t sup_a = a.SmiUpperBound();
2089 const int64_t sup_b = b.SmiUpperBound();
2090
2091 return (sup_a <= sup_b) ? a : b;
2092}
static T Minimum(T x, T y)
Definition utils.h:21
static bool CanonicalizeMaxBoundary(RangeBoundary *a)
static bool CanonicalizeForComparison(RangeBoundary *a, RangeBoundary *b, BoundaryOp op, const RangeBoundary &overflow)

◆ IntersectionMin()

RangeBoundary dart::RangeBoundary::IntersectionMin ( RangeBoundary  a,
RangeBoundary  b 
)
static

Definition at line 2036 of file range_analysis.cc.

2036 {
2037 ASSERT(!a.IsUnknown() && !b.IsUnknown());
2038
2039 if (a.Equals(b)) {
2040 return a;
2041 }
2042
2043 if (a.IsConstant() && b.IsConstant()) {
2044 return RangeBoundary(Utils::Maximum(a.ConstantValue(), b.ConstantValue()));
2045 }
2046
2047 if (a.IsMinimumOrBelow(RangeBoundary::kRangeBoundarySmi)) {
2048 return b;
2049 } else if (b.IsMinimumOrBelow(RangeBoundary::kRangeBoundarySmi)) {
2050 return a;
2051 }
2052
2056 return (a.offset() >= b.offset()) ? a : b;
2057 }
2058
2059 const int64_t inf_a = a.SmiLowerBound();
2060 const int64_t inf_b = b.SmiLowerBound();
2061
2062 return (inf_a >= inf_b) ? a : b;
2063}
static constexpr T Maximum(T x, T y)
Definition utils.h:26
static bool CanonicalizeMinBoundary(RangeBoundary *a)

◆ IsConstant()

bool dart::RangeBoundary::IsConstant ( ) const
inline

Definition at line 192 of file range_analysis.h.

192{ return kind_ == kConstant; }

◆ IsMaximumOrAbove()

bool dart::RangeBoundary::IsMaximumOrAbove ( RangeSize  size) const
inline

Definition at line 183 of file range_analysis.h.

183 {
184 return IsConstant() && (ConstantValue() >=
186 }

◆ IsMinimumOrBelow()

bool dart::RangeBoundary::IsMinimumOrBelow ( RangeSize  size) const
inline

Definition at line 178 of file range_analysis.h.

178 {
179 return IsConstant() && (ConstantValue() <=
181 }

◆ IsSymbol()

bool dart::RangeBoundary::IsSymbol ( ) const
inline

Definition at line 193 of file range_analysis.h.

193{ return kind_ == kSymbol; }

◆ IsUnknown()

bool dart::RangeBoundary::IsUnknown ( ) const
inline

Definition at line 191 of file range_analysis.h.

191{ return kind_ == kUnknown; }

◆ IsValidOffsetForSymbolicRangeBoundary()

static bool dart::RangeBoundary::IsValidOffsetForSymbolicRangeBoundary ( int64_t  offset)
inlinestatic

Definition at line 63 of file range_analysis.h.

63 {
64 if ((offset > (kMaxInt64 - compiler::target::kSmiMax)) ||
65 (offset < (kMinInt64 - compiler::target::kSmiMin))) {
66 // Avoid creating symbolic range boundaries which can wrap around.
67 return false;
68 }
69 return true;
70 }
constexpr int64_t kMaxInt64
Definition globals.h:486
constexpr int64_t kMinInt64
Definition globals.h:485

◆ JoinMax()

RangeBoundary dart::RangeBoundary::JoinMax ( RangeBoundary  a,
RangeBoundary  b,
RangeBoundary::RangeSize  size 
)
static

Definition at line 2009 of file range_analysis.cc.

2011 {
2012 if (a.Equals(b)) {
2013 return b;
2014 }
2015
2019 return (a.offset() >= b.offset()) ? a : b;
2020 }
2021
2022 const int64_t inf_a = a.LowerBound(size);
2023 const int64_t inf_b = b.LowerBound(size);
2024 const int64_t sup_a = a.UpperBound(size);
2025 const int64_t sup_b = b.UpperBound(size);
2026
2027 if ((sup_a <= inf_b) && !b.UpperBound().Overflowed(size)) {
2028 return b;
2029 } else if ((sup_b <= inf_a) && !a.UpperBound().Overflowed(size)) {
2030 return a;
2031 } else {
2032 return RangeBoundary::FromConstant(Utils::Maximum(sup_a, sup_b));
2033 }
2034}

◆ JoinMin()

RangeBoundary dart::RangeBoundary::JoinMin ( RangeBoundary  a,
RangeBoundary  b,
RangeBoundary::RangeSize  size 
)
static

Definition at line 1983 of file range_analysis.cc.

1985 {
1986 if (a.Equals(b)) {
1987 return b;
1988 }
1989
1992 return (a.offset() <= b.offset()) ? a : b;
1993 }
1994
1995 const int64_t inf_a = a.LowerBound(size);
1996 const int64_t inf_b = b.LowerBound(size);
1997 const int64_t sup_a = a.UpperBound(size);
1998 const int64_t sup_b = b.UpperBound(size);
1999
2000 if ((sup_a <= inf_b) && !a.LowerBound().Overflowed(size)) {
2001 return a;
2002 } else if ((sup_b <= inf_a) && !b.LowerBound().Overflowed(size)) {
2003 return b;
2004 } else {
2005 return RangeBoundary::FromConstant(Utils::Minimum(inf_a, inf_b));
2006 }
2007}

◆ kind()

intptr_t dart::RangeBoundary::kind ( ) const
inline

Definition at line 188 of file range_analysis.h.

188{ return kind_; }

◆ LowerBound() [1/2]

RangeBoundary dart::RangeBoundary::LowerBound ( ) const

Definition at line 1711 of file range_analysis.cc.

1711 {
1712 if (IsConstant()) return *this;
1713 return Add(Range::ConstantMinSmi(symbol()->range()),
1715}
static RangeBoundary Add(const RangeBoundary &a, const RangeBoundary &b)
Definition * symbol() const
static RangeBoundary ConstantMinSmi(const Range *range)

◆ LowerBound() [2/2]

int64_t dart::RangeBoundary::LowerBound ( RangeSize  size) const
inline

Definition at line 257 of file range_analysis.h.

257 {
258 return LowerBound().Clamp(size).ConstantValue();
259 }
RangeBoundary Clamp(RangeSize size) const
RangeBoundary LowerBound() const

◆ MaxConstant()

static RangeBoundary dart::RangeBoundary::MaxConstant ( RangeSize  size)
inlinestatic

Definition at line 100 of file range_analysis.h.

100 {
101 switch (size) {
103 return FromConstant(compiler::target::kSmiMax);
105 return FromConstant(kMaxInt8);
107 return FromConstant(kMaxInt16);
109 return FromConstant(kMaxInt32);
111 return FromConstant(kMaxInt64);
112 }
113 UNREACHABLE();
114 return FromConstant(kMaxInt64);
115 }
#define UNREACHABLE()
Definition assert.h:248
constexpr int16_t kMaxInt16
Definition globals.h:480
constexpr int8_t kMaxInt8
Definition globals.h:477
constexpr int32_t kMaxInt32
Definition globals.h:483

◆ MaxSmi()

static RangeBoundary dart::RangeBoundary::MaxSmi ( )
inlinestatic

Definition at line 78 of file range_analysis.h.

78 {
79 return FromConstant(compiler::target::kSmiMax);
80 }

◆ MinConstant()

static RangeBoundary dart::RangeBoundary::MinConstant ( RangeSize  size)
inlinestatic

Definition at line 83 of file range_analysis.h.

83 {
84 switch (size) {
86 return FromConstant(compiler::target::kSmiMin);
88 return FromConstant(kMinInt8);
90 return FromConstant(kMinInt16);
92 return FromConstant(kMinInt32);
94 return FromConstant(kMinInt64);
95 }
97 return FromConstant(kMinInt64);
98 }
constexpr int32_t kMinInt32
Definition globals.h:482
constexpr int16_t kMinInt16
Definition globals.h:479
constexpr int8_t kMinInt8
Definition globals.h:476

◆ MinSmi()

static RangeBoundary dart::RangeBoundary::MinSmi ( )
inlinestatic

Definition at line 73 of file range_analysis.h.

73 {
74 return FromConstant(compiler::target::kSmiMin);
75 }

◆ offset()

int64_t dart::RangeBoundary::offset ( ) const
inline

Definition at line 205 of file range_analysis.h.

205{ return offset_; }

◆ operator=()

RangeBoundary & dart::RangeBoundary::operator= ( const RangeBoundary other)
inline

Definition at line 47 of file range_analysis.h.

47 {
48 kind_ = other.kind_;
49 value_ = other.value_;
50 offset_ = other.offset_;
51 return *this;
52 }

◆ Overflowed()

bool dart::RangeBoundary::Overflowed ( RangeBoundary::RangeSize  size) const
inline

Definition at line 154 of file range_analysis.h.

154 {
156 return !Equals(Clamp(size));
157 }
bool Equals(const RangeBoundary &other) const

◆ OverflowedSmi()

bool dart::RangeBoundary::OverflowedSmi ( ) const
inline

Definition at line 150 of file range_analysis.h.

150 {
152 }
bool IsSmi(int64_t v)

◆ PrintTo()

void dart::RangeBoundary::PrintTo ( BaseTextBuffer f) const

◆ Shl()

RangeBoundary dart::RangeBoundary::Shl ( const RangeBoundary value_boundary,
int64_t  shift_count 
)
static

Definition at line 1817 of file range_analysis.cc.

1818 {
1819 ASSERT(value_boundary.IsConstant());
1820 ASSERT(!WillShlOverflow(value_boundary, shift_count));
1821 ASSERT(shift_count >= 0);
1822 int64_t value = value_boundary.ConstantValue();
1823
1824 if (value == 0) {
1826 } else {
1827 // Result stays in 64 bit range.
1828 const int64_t result = static_cast<uint64_t>(value) << shift_count;
1829 return RangeBoundary(result);
1830 }
1831}
static bool WillShlOverflow(const RangeBoundary &a, int64_t shift_count)
uint8_t value

◆ Shr()

RangeBoundary dart::RangeBoundary::Shr ( const RangeBoundary value_boundary,
int64_t  shift_count 
)
static

Definition at line 1833 of file range_analysis.cc.

1834 {
1835 ASSERT(value_boundary.IsConstant());
1836 ASSERT(shift_count >= 0);
1837 const int64_t value = static_cast<int64_t>(value_boundary.ConstantValue());
1838 const int64_t result = (shift_count <= 63)
1839 ? (value >> shift_count)
1840 : (value >= 0 ? 0 : -1); // Dart semantics
1841 return RangeBoundary(result);
1842}

◆ SmiLowerBound()

int64_t dart::RangeBoundary::SmiLowerBound ( ) const
inline

Definition at line 263 of file range_analysis.h.

263{ return LowerBound(kRangeBoundarySmi); }

◆ SmiUpperBound()

int64_t dart::RangeBoundary::SmiUpperBound ( ) const
inline

Definition at line 261 of file range_analysis.h.

261{ return UpperBound(kRangeBoundarySmi); }
RangeBoundary UpperBound() const

◆ Sub()

RangeBoundary dart::RangeBoundary::Sub ( const RangeBoundary a,
const RangeBoundary b 
)
static

Definition at line 1744 of file range_analysis.cc.

1745 {
1746 ASSERT(a.IsConstant() && b.IsConstant());
1748 const int64_t result = a.ConstantValue() - b.ConstantValue();
1750}
static bool WillSubOverflow(const RangeBoundary &a, const RangeBoundary &b)

◆ symbol()

Definition * dart::RangeBoundary::symbol ( ) const
inline

Definition at line 199 of file range_analysis.h.

199 {
200 ASSERT(IsSymbol());
201 return reinterpret_cast<Definition*>(value_);
202 }

◆ SymbolicAdd()

bool dart::RangeBoundary::SymbolicAdd ( const RangeBoundary a,
const RangeBoundary b,
RangeBoundary result 
)
static

Definition at line 1752 of file range_analysis.cc.

1754 {
1755 if (a.IsSymbol() && b.IsConstant()) {
1756 if (Utils::WillAddOverflow(a.offset(), b.ConstantValue())) {
1757 return false;
1758 }
1759
1760 const int64_t offset = a.offset() + b.ConstantValue();
1761
1763 return false;
1764 }
1765
1767 return true;
1768 } else if (b.IsSymbol() && a.IsConstant()) {
1769 return SymbolicAdd(b, a, result);
1770 }
1771 return false;
1772}
static RangeBoundary FromDefinition(Definition *defn, int64_t offs=0)
static bool SymbolicAdd(const RangeBoundary &a, const RangeBoundary &b, RangeBoundary *result)
static bool WillAddOverflow(int64_t a, int64_t b)
Definition utils.h:403

◆ SymbolicSub()

bool dart::RangeBoundary::SymbolicSub ( const RangeBoundary a,
const RangeBoundary b,
RangeBoundary result 
)
static

Definition at line 1774 of file range_analysis.cc.

1776 {
1777 if (a.IsSymbol() && b.IsConstant()) {
1778 if (Utils::WillSubOverflow(a.offset(), b.ConstantValue())) {
1779 return false;
1780 }
1781
1782 const int64_t offset = a.offset() - b.ConstantValue();
1783
1785 return false;
1786 }
1787
1789 return true;
1790 }
1791 return false;
1792}
static bool WillSubOverflow(int64_t a, int64_t b)
Definition utils.h:408

◆ ToCString()

const char * dart::RangeBoundary::ToCString ( ) const

◆ UpperBound() [1/2]

RangeBoundary dart::RangeBoundary::UpperBound ( ) const

Definition at line 1717 of file range_analysis.cc.

1717 {
1718 if (IsConstant()) return *this;
1719
1720 return Add(Range::ConstantMaxSmi(symbol()->range()),
1722}
static RangeBoundary ConstantMaxSmi(const Range *range)

◆ UpperBound() [2/2]

int64_t dart::RangeBoundary::UpperBound ( RangeSize  size) const
inline

Definition at line 253 of file range_analysis.h.

253 {
254 return UpperBound().Clamp(size).ConstantValue();
255 }

◆ WillAddOverflow()

bool dart::RangeBoundary::WillAddOverflow ( const RangeBoundary a,
const RangeBoundary b 
)
static

Definition at line 1724 of file range_analysis.cc.

1725 {
1726 ASSERT(a.IsConstant() && b.IsConstant());
1727 return Utils::WillAddOverflow(a.ConstantValue(), b.ConstantValue());
1728}

◆ WillShlOverflow()

bool dart::RangeBoundary::WillShlOverflow ( const RangeBoundary a,
int64_t  shift_count 
)
static

Definition at line 1805 of file range_analysis.cc.

1806 {
1807 ASSERT(value_boundary.IsConstant());
1808 ASSERT(shift_count >= 0);
1809 const int64_t value = value_boundary.ConstantValue();
1810 if (value == 0) {
1811 return false;
1812 }
1813 return (shift_count >= kBitsPerInt64) ||
1814 !Utils::IsInt(static_cast<int>(kBitsPerInt64 - shift_count), value);
1815}
static bool IsInt(intptr_t N, T value)
Definition utils.h:298
constexpr intptr_t kBitsPerInt64
Definition globals.h:467

◆ WillSubOverflow()

bool dart::RangeBoundary::WillSubOverflow ( const RangeBoundary a,
const RangeBoundary b 
)
static

Definition at line 1738 of file range_analysis.cc.

1739 {
1740 ASSERT(a.IsConstant() && b.IsConstant());
1741 return Utils::WillSubOverflow(a.ConstantValue(), b.ConstantValue());
1742}

◆ Write()

void dart::RangeBoundary::Write ( FlowGraphSerializer s) const

Definition at line 2214 of file il_serializer.cc.

2214 {
2215 s->Write<int8_t>(kind_);
2216 s->Write<int64_t>(value_);
2217 s->Write<int64_t>(offset_);
2218}
struct MyStruct s

Member Data Documentation

◆ kMax

constexpr int64_t dart::RangeBoundary::kMax = kMaxInt64
staticconstexpr

Definition at line 55 of file range_analysis.h.

◆ kMin

constexpr int64_t dart::RangeBoundary::kMin = kMinInt64
staticconstexpr

Definition at line 54 of file range_analysis.h.


The documentation for this class was generated from the following files: