|
V8 Project
|
#include <safe_math.h>
Collaboration diagram for v8::base::internal::CheckedNumeric< T >:Public Types | |
| typedef T | type |
Public Member Functions | |
| CheckedNumeric () | |
| template<typename Src > | |
| CheckedNumeric (const CheckedNumeric< Src > &rhs) | |
| template<typename Src > | |
| CheckedNumeric (Src value, RangeConstraint validity) | |
| template<typename Src > | |
| CheckedNumeric (Src value) | |
| bool | IsValid () const |
| T | ValueOrDie () const |
| T | ValueOrDefault (T default_value) const |
| T | ValueFloating () const |
| RangeConstraint | validity () const |
| T | ValueUnsafe () const |
| template<typename Src > | |
| CheckedNumeric & | operator+= (Src rhs) |
| template<typename Src > | |
| CheckedNumeric & | operator-= (Src rhs) |
| template<typename Src > | |
| CheckedNumeric & | operator*= (Src rhs) |
| template<typename Src > | |
| CheckedNumeric & | operator/= (Src rhs) |
| template<typename Src > | |
| CheckedNumeric & | operator%= (Src rhs) |
| CheckedNumeric | operator- () const |
| CheckedNumeric | Abs () const |
| CheckedNumeric & | operator++ () |
| CheckedNumeric | operator++ (int) |
| CheckedNumeric & | operator-- () |
| CheckedNumeric | operator-- (int) |
Static Public Member Functions | |
| template<typename Src > | |
| static CheckedNumeric< T > | cast (Src u, typename enable_if< std::numeric_limits< Src >::is_specialized, int >::type=0) |
| template<typename Src > | |
| static CheckedNumeric< T > | cast (const CheckedNumeric< Src > &u, typename enable_if<!is_same< Src, T >::value, int >::type=0) |
| static const CheckedNumeric< T > & | cast (const CheckedNumeric< T > &u) |
Private Attributes | |
| CheckedNumericState< T > | state_ |
Definition at line 48 of file safe_math.h.
| typedef T v8::base::internal::CheckedNumeric< T >::type |
Definition at line 50 of file safe_math.h.
|
inline |
Definition at line 52 of file safe_math.h.
|
inline |
Definition at line 56 of file safe_math.h.
|
inline |
Definition at line 60 of file safe_math.h.
|
inline |
|
inline |
Definition at line 134 of file safe_math.h.
References v8::base::internal::CheckedAbs(), v8::base::internal::GetRangeConstraint(), v8::base::internal::CheckedNumeric< T >::state_, T, and v8::base::internal::CheckedNumeric< T >::validity().
Here is the call graph for this function:
|
inlinestatic |
Definition at line 179 of file safe_math.h.
|
inlinestatic |
Definition at line 185 of file safe_math.h.
|
inlinestatic |
Definition at line 171 of file safe_math.h.
Referenced by v8::base::internal::CheckedNumeric< T >::ValueFloating().
Here is the caller graph for this function:
|
inline |
Definition at line 73 of file safe_math.h.
References v8::base::internal::RANGE_VALID, and v8::base::internal::CheckedNumeric< T >::validity().
Referenced by v8::internal::DehoistArrayIndex(), v8::base::internal::CheckedNumeric< T >::ValueOrDefault(), and v8::base::internal::CheckedNumeric< T >::ValueOrDie().
Here is the call graph for this function:
Here is the caller graph for this function:| CheckedNumeric& v8::base::internal::CheckedNumeric< T >::operator%= | ( | Src | rhs | ) |
| CheckedNumeric& v8::base::internal::CheckedNumeric< T >::operator*= | ( | Src | rhs | ) |
|
inline |
Definition at line 145 of file safe_math.h.
|
inline |
Definition at line 150 of file safe_math.h.
| CheckedNumeric& v8::base::internal::CheckedNumeric< T >::operator+= | ( | Src | rhs | ) |
|
inline |
Definition at line 123 of file safe_math.h.
References v8::base::internal::CheckedNeg(), v8::base::internal::GetRangeConstraint(), v8::base::internal::CheckedNumeric< T >::state_, T, and v8::base::internal::CheckedNumeric< T >::validity().
Here is the call graph for this function:
|
inline |
Definition at line 156 of file safe_math.h.
|
inline |
Definition at line 161 of file safe_math.h.
| CheckedNumeric& v8::base::internal::CheckedNumeric< T >::operator-= | ( | Src | rhs | ) |
| CheckedNumeric& v8::base::internal::CheckedNumeric< T >::operator/= | ( | Src | rhs | ) |
|
inline |
Definition at line 105 of file safe_math.h.
References v8::base::internal::CheckedNumeric< T >::state_.
Referenced by v8::base::internal::CheckedNumeric< T >::Abs(), v8::base::internal::CheckedNumeric< T >::IsValid(), and v8::base::internal::CheckedNumeric< T >::operator-().
Here is the caller graph for this function:
|
inline |
Definition at line 92 of file safe_math.h.
References v8::base::internal::CheckedNumeric< T >::cast(), and STATIC_ASSERT.
Here is the call graph for this function:
|
inline |
Definition at line 85 of file safe_math.h.
References v8::base::internal::CheckedNumeric< T >::IsValid(), and v8::base::internal::CheckedNumeric< T >::state_.
Here is the call graph for this function:
|
inline |
Definition at line 77 of file safe_math.h.
References CHECK, v8::base::internal::CheckedNumeric< T >::IsValid(), and v8::base::internal::CheckedNumeric< T >::state_.
Referenced by v8::internal::DehoistArrayIndex().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 114 of file safe_math.h.
References v8::base::internal::CheckedNumeric< T >::state_.
|
private |
Definition at line 188 of file safe_math.h.
Referenced by v8::base::internal::CheckedNumeric< T >::Abs(), v8::base::internal::CheckedNumeric< T >::operator-(), v8::base::internal::CheckedNumeric< T >::validity(), v8::base::internal::CheckedNumeric< T >::ValueOrDefault(), v8::base::internal::CheckedNumeric< T >::ValueOrDie(), and v8::base::internal::CheckedNumeric< T >::ValueUnsafe().