Home
last modified time | relevance | path

Searched refs:CheckedNumeric (Results 1 – 25 of 52) sorted by relevance

123

/external/v8/src/base/
Dsafe_math.h48 class CheckedNumeric {
52 CheckedNumeric() {} in CheckedNumeric() function
56 CheckedNumeric(const CheckedNumeric<Src>& rhs) in CheckedNumeric() function
60 CheckedNumeric(Src value, RangeConstraint validity) in CheckedNumeric() function
66 CheckedNumeric(Src value) // NOLINT in CheckedNumeric() function
95 return CheckedNumeric<T>::cast(*this).ValueUnsafe(); in ValueFloating()
117 template <typename Src> CheckedNumeric& operator+=(Src rhs);
118 template <typename Src> CheckedNumeric& operator-=(Src rhs);
119 template <typename Src> CheckedNumeric& operator*=(Src rhs);
120 template <typename Src> CheckedNumeric& operator/=(Src rhs);
[all …]
Dbits.cc75 int64_t FromCheckedNumeric(const internal::CheckedNumeric<int64_t> value) { in FromCheckedNumeric()
91 internal::CheckedNumeric<int64_t> rv(lhs); in SignedSaturatedAdd64()
98 internal::CheckedNumeric<int64_t> rv(lhs); in SignedSaturatedSub64()
104 internal::CheckedNumeric<int32_t> rv(lhs); in SignedMulOverflow32()
112 internal::CheckedNumeric<int64_t> rv(lhs); in SignedMulOverflow64()
Dbits.h25 class CheckedNumeric; variable
292 FromCheckedNumeric(const internal::CheckedNumeric<int64_t> value);
/external/libchrome/base/numerics/
Dchecked_math.h19 class CheckedNumeric {
26 constexpr CheckedNumeric() = default;
30 constexpr CheckedNumeric(const CheckedNumeric<Src>& rhs) in CheckedNumeric() function
34 friend class CheckedNumeric; variable
39 constexpr CheckedNumeric(Src value) // NOLINT(runtime/explicit) in CheckedNumeric() function
47 constexpr CheckedNumeric( in CheckedNumeric() function
108 constexpr CheckedNumeric<typename UnderlyingType<Dst>::type> Cast() const { in Cast()
116 friend U GetNumericValueForTest(const CheckedNumeric<U>& src);
120 constexpr CheckedNumeric& operator+=(const Src rhs);
122 constexpr CheckedNumeric& operator-=(const Src rhs);
[all …]
DREADME.md10 * `checked_math.h` contains the `CheckedNumeric` template class and helper
26 * `StrictNumeric` coerces to `ClampedNumeric` and `CheckedNumeric`
27 * `ClampedNumeric` coerces to `CheckedNumeric`
105 other boundary conditions. The `CheckedNumeric` template does this by storing
111 Here's an example of a buffer calculation using a `CheckedNumeric` type (note:
201 values extracted from a `CheckedNumeric` class instance. The raw numeric value
209 ## CheckedNumeric<> in checked_math.h
211 `CheckedNumeric<>` implements all the logic and operators for detecting integer
213 The `CheckedNumeric` type implicitly converts from floating point and integer
234 `CheckedNumeric` as a result of the operation:
[all …]
/external/pdfium/third_party/base/numerics/
Dsafe_math.h96 class CheckedNumeric {
103 constexpr CheckedNumeric() = default;
107 constexpr CheckedNumeric(const CheckedNumeric<Src>& rhs) in CheckedNumeric() function
111 friend class CheckedNumeric; variable
116 constexpr CheckedNumeric(Src value) // NOLINT(runtime/explicit) in CheckedNumeric() function
124 constexpr CheckedNumeric( in CheckedNumeric() function
176 constexpr CheckedNumeric<typename UnderlyingType<Dst>::type> Cast() const { in Cast()
184 friend U GetNumericValueForTest(const CheckedNumeric<U>& src);
188 CheckedNumeric& operator+=(const Src rhs);
190 CheckedNumeric& operator-=(const Src rhs);
[all …]
/external/pdfium/core/fxcrt/
Dfx_safe_types.h13 typedef pdfium::base::CheckedNumeric<uint32_t> FX_SAFE_UINT32;
14 typedef pdfium::base::CheckedNumeric<int32_t> FX_SAFE_INT32;
15 typedef pdfium::base::CheckedNumeric<size_t> FX_SAFE_SIZE_T;
16 typedef pdfium::base::CheckedNumeric<FX_FILESIZE> FX_SAFE_FILESIZE;
Dcfx_seekablestreamproxy.cpp190 pdfium::base::CheckedNumeric<FX_FILESIZE> new_pos = m_iPosition; in Seek()
220 pdfium::base::CheckedNumeric<FX_FILESIZE> new_pos = m_iPosition; in ReadData()
281 pdfium::base::CheckedNumeric<FX_FILESIZE> new_pos = m_iPosition; in WriteString()
Dstring_data_template.h25 pdfium::base::CheckedNumeric<size_t> nSize = nLen; in Create()
/external/libchrome/base/time/
Dtime_exploded_posix.cc169 CheckedNumeric<int> month = exploded.month; in FromExploded()
171 CheckedNumeric<int> year = exploded.year; in FromExploded()
262 base::CheckedNumeric<int64_t> checked_millis = seconds; in FromExploded()
273 base::CheckedNumeric<int64_t> checked_microseconds_win_epoch = milliseconds; in FromExploded()
Dtime.cc149 CheckedNumeric<int64_t> rv(delta.delta_); in SaturatedAdd()
160 CheckedNumeric<int64_t> rv(delta.delta_); in SaturatedSub()
Dtime_now_posix.cc37 base::CheckedNumeric<int64_t> result(ts.tv_sec); in ConvertTimespecToMicros()
/external/pdfium/third_party/agg23/
D0002-ubsan-error-fixes.patch20 + pdfium::base::CheckedNumeric<float> width = x2;
24 + pdfium::base::CheckedNumeric<float> height = y2;
Dagg_clip_liang_barsky.h41 pdfium::base::CheckedNumeric<float> width = x2; in clip_liang_barsky()
45 pdfium::base::CheckedNumeric<float> height = y2; in clip_liang_barsky()
/external/libbrillo/brillo/
Dbackoff_entry.cc141 base::internal::CheckedNumeric<int64_t> calculated_release_time_us = in CalculateReleaseTime()
147 base::internal::CheckedNumeric<int64_t> maximum_release_time_us = kMaxTime; in CalculateReleaseTime()
/external/libchrome/mojo/core/ports/
Devent.cc164 base::CheckedNumeric<size_t> port_data_size = data->num_ports; in Deserialize()
169 base::CheckedNumeric<size_t> total_size = port_data_size.ValueOrDie(); in Deserialize()
200 base::CheckedNumeric<size_t> size = sizeof(UserMessageEventData); in GetSerializedDataSize()
201 base::CheckedNumeric<size_t> ports_size = in GetSerializedDataSize()
/external/libchrome/ui/gfx/geometry/
Dsize.cc54 base::CheckedNumeric<int> Size::GetCheckedArea() const { in GetCheckedArea()
55 base::CheckedNumeric<int> checked_area = width(); in GetCheckedArea()
Dsize.h53 base::CheckedNumeric<int> GetCheckedArea() const;
/external/pdfium/fpdfsdk/
Dfpdf_structtree.cpp61 pdfium::base::CheckedNumeric<int> tmp_size = tree->CountTopElements(); in FPDF_StructTree_CountChildren()
119 pdfium::base::CheckedNumeric<int> tmp_size = elem->CountKids(); in FPDF_StructElement_CountChildren()
/external/pdfium/core/fxcodec/jbig2/
DJBig2_HuffmanTable.cpp68 pdfium::base::CheckedNumeric<int> cur_low = low; in ParseFromCodedBuffer()
124 pdfium::base::CheckedNumeric<int> shifted; in InitCodes()
DJBig2_ArithIntDecoder.cpp70 pdfium::base::CheckedNumeric<int> safeValue = in decode()
/external/pdfium/fxbarcode/
DBC_TwoDimWriter.cpp70 pdfium::base::CheckedNumeric<int32_t> scaledWidth = tempWidth; in RenderResult()
71 pdfium::base::CheckedNumeric<int32_t> scaledHeight = tempHeight; in RenderResult()
/external/libchrome/mojo/core/
Duser_message_impl.cc116 base::CheckedNumeric<size_t> safe_header_size = num_new_dispatchers; in CreateOrExtendSerializedEventMessage()
200 base::CheckedNumeric<uint32_t>(total_num_dispatchers).ValueOrDie(); in CreateOrExtendSerializedEventMessage()
598 base::CheckedNumeric<size_t> next_payload_index = data_payload_index; in ExtractSerializedHandles()
605 base::CheckedNumeric<size_t> next_port_index = port_index; in ExtractSerializedHandles()
612 base::CheckedNumeric<size_t> next_platform_handle_index = in ExtractSerializedHandles()
/external/libchrome/base/
Dbase64url.cc81 CheckedNumeric<size_t> base64_input_size = input.size(); in Base64UrlDecode()
/external/libchrome/base/files/
Dmemory_mapped_file.cc77 CheckedNumeric<int64_t> region_end(region.offset); in Initialize()

123