/third_party/flutter/skia/tests/ |
D | SafeMathTest.cpp | 17 SkSafeMath safe; in DEF_TEST() local 18 REPORTER_ASSERT(r, safe.add(halfMax, halfMax) == 2 * halfMax); in DEF_TEST() 19 REPORTER_ASSERT(r, safe); in DEF_TEST() 20 REPORTER_ASSERT(r, safe.add(halfMax, halfMaxPlus1) == max); in DEF_TEST() 21 REPORTER_ASSERT(r, safe); in DEF_TEST() 22 REPORTER_ASSERT(r, safe.add(max, 1) == 0); in DEF_TEST() 23 REPORTER_ASSERT(r, !safe); in DEF_TEST() 27 SkSafeMath safe; in DEF_TEST() local 28 (void) safe.add(max, max); in DEF_TEST() 29 REPORTER_ASSERT(r, !safe); in DEF_TEST() [all …]
|
/third_party/skia/tests/ |
D | SafeMathTest.cpp | 17 SkSafeMath safe; in DEF_TEST() local 18 REPORTER_ASSERT(r, safe.add(halfMax, halfMax) == 2 * halfMax); in DEF_TEST() 19 REPORTER_ASSERT(r, safe); in DEF_TEST() 20 REPORTER_ASSERT(r, safe.add(halfMax, halfMaxPlus1) == max); in DEF_TEST() 21 REPORTER_ASSERT(r, safe); in DEF_TEST() 22 REPORTER_ASSERT(r, safe.add(max, 1) == 0); in DEF_TEST() 23 REPORTER_ASSERT(r, !safe); in DEF_TEST() 27 SkSafeMath safe; in DEF_TEST() local 28 (void) safe.add(max, max); in DEF_TEST() 29 REPORTER_ASSERT(r, !safe); in DEF_TEST() [all …]
|
/third_party/boost/libs/format/test/ |
D | format_test_exceptions.cpp | 20 boost::format safe; safe.exceptions(boost::io::no_error_bits); safe.parse(FMT); (safe).str(); } 22 …boost::format safe; safe.exceptions(boost::io::no_error_bits); safe.parse(FMT); (safe % _1).str();… 24 …boost::format safe; safe.exceptions(boost::io::no_error_bits); safe.parse(FMT); (safe % _1 % _2).s…
|
/third_party/boost/libs/safe_numerics/test/ |
D | test_construction.cpp | 23 safe<T1> s1(t1); in test_construction() 33 safe<T1> s1(t1); // try again for debugging in test_construction() 43 t2 = safe<T2>(t1); in test_construction() 49 safe<T2> s2x(t1); in test_construction() 60 safe<T2> sx2(t1); // try again for debugging in test_construction() 69 safe<T1> s1x(t1); in test_construction() 71 safe<T1> s1(s1x); in test_construction() 88 safe<T1> s1(t1); in test_construction() 98 safe<T1> s1(t1); in test_construction() 99 safe<T2> s2(s1); in test_construction() [all …]
|
D | test_z.cpp | 14 const boost::safe_numerics::safe<unsigned int> x{0}; 21 constexpr boost::safe_numerics::safe<unsigned int> val1() 23 constexpr boost::safe_numerics::safe<unsigned int> x = 0xFFFFFFFF; 26 constexpr boost::safe_numerics::safe<unsigned int> val2() 28 …boost::safe_numerics::safe<unsigned int> x = - boost::safe_numerics::safe_unsigned_literal<0xFFFFF… 32 constexpr boost::safe_numerics::safe<unsigned int> val3() 100 constexpr safe<int> j = 0; 101 constexpr safe<int> k = 3; 102 constexpr safe<int> l = j + k; // compile error 107 constexpr safe<int> j = boost::safe_numerics::safe_signed_literal<0>(); [all …]
|
D | test_auto.cpp | 38 safe<T, automatic>(t) + u; in test_auto() 41 safe<T, automatic>(t) + u; in test_auto() 45 t + safe<U, automatic>(u); in test_auto() 48 t + safe<U, automatic>(u); in test_auto() 56 safe<std::int8_t, automatic>, in test_auto_result() 57 safe<std::uint16_t, automatic> in test_auto_result() 73 safe<std::int16_t, automatic>, in test_compare_result() 74 safe<std::int16_t, automatic> in test_compare_result()
|
D | CMakeLists.txt | 1 # CMake build control file for safe numerics Library tests 63 set_target_properties(${test_name} PROPERTIES FOLDER "safe numeric runtime tests") 74 set_target_properties(${test_name} PROPERTIES FOLDER "safe numeric compile fail tests") 77 ## safe integer constexpr tests 106 set_target_properties(${test_name} PROPERTIES FOLDER "safe constexpr tests - compile only")
|
/third_party/flutter/skia/src/core/ |
D | SkTextBlob.cpp | 41 SkSafeMath* safe) { in StorageSize() argument 44 auto glyphSize = safe->mul(glyphCount, sizeof(uint16_t)), in StorageSize() 45 posSize = safe->mul(PosCount(glyphCount, positioning, safe), sizeof(SkScalar)); in StorageSize() 49 size = safe->add(size, safe->alignUp(glyphSize, 4)); in StorageSize() 50 size = safe->add(size, posSize); in StorageSize() 53 size = safe->add(size, sizeof(uint32_t)); in StorageSize() 54 size = safe->add(size, safe->mul(glyphCount, sizeof(uint32_t))); in StorageSize() 55 size = safe->add(size, textSize); in StorageSize() 58 return safe->alignUp(size, sizeof(void*)); in StorageSize() 99 SkSafeMath safe; in NextUnchecked() local [all …]
|
D | SkVertices.cpp | 32 SkSafeMath safe; in Sizes() local 34 fVSize = safe.mul(vertexCount, sizeof(SkPoint)); in Sizes() 35 fTSize = hasTexs ? safe.mul(vertexCount, sizeof(SkPoint)) : 0; in Sizes() 36 fCSize = hasColors ? safe.mul(vertexCount, sizeof(SkColor)) : 0; in Sizes() 37 fBISize = hasBones ? safe.mul(vertexCount, sizeof(BoneIndices)) : 0; in Sizes() 38 fBWSize = hasBones ? safe.mul(vertexCount, sizeof(BoneWeights)) : 0; in Sizes() 41 fISize = safe.mul(indexCount, sizeof(uint16_t)); in Sizes() 60 fISize = safe.mul(numFanTris, 3 * sizeof(uint16_t)); in Sizes() 63 fTotal = safe.add(sizeof(SkVertices), in Sizes() 64 safe.add(fVSize, in Sizes() [all …]
|
D | SkMask.cpp | 57 SkSafeMath safe; in PrepareDestination() local 61 size_t dstW = safe.add(src.fBounds.width(), safe.add(radiusX, radiusX)); in PrepareDestination() 63 size_t dstH = safe.add(src.fBounds.height(), safe.add(radiusY, radiusY)); in PrepareDestination() 78 size_t toAlloc = safe.mul(dstW, dstH); in PrepareDestination() 80 if (safe && src.fImage != nullptr) { in PrepareDestination()
|
D | SkPaint.cpp | 292 static uint32_t unpack_v68(SkPaint* paint, uint32_t packed, SkSafeRange& safe) { in unpack_v68() argument 296 paint->setBlendMode(safe.checkLE(packed & 0xFF, SkBlendMode::kLastMode)); in unpack_v68() 298 paint->setStrokeCap(safe.checkLE(packed & 0x3, SkPaint::kLast_Cap)); in unpack_v68() 300 paint->setStrokeJoin(safe.checkLE(packed & 0x3, SkPaint::kLast_Join)); in unpack_v68() 302 paint->setStyle(safe.checkLE(packed & 0x3, SkPaint::kStrokeAndFill_Style)); in unpack_v68() 304 paint->setFilterQuality(safe.checkLE(packed & 0x3, kLast_SkFilterQuality)); in unpack_v68() 340 SkSafeRange safe; in Unflatten_PreV68() local 366 paint->setStrokeCap(safe.checkLE((tmp >> 24) & 0xFF, SkPaint::kLast_Cap)); in Unflatten_PreV68() 367 paint->setStrokeJoin(safe.checkLE((tmp >> 16) & 0xFF, SkPaint::kLast_Join)); in Unflatten_PreV68() 368 paint->setStyle(safe.checkLE((tmp >> 12) & 0xF, SkPaint::kStrokeAndFill_Style)); in Unflatten_PreV68() [all …]
|
D | SkImageInfo.cpp | 52 SkSafeMath safe; in computeByteSize() local 53 size_t bytes = safe.add(safe.mul(safe.addInt(this->height(), -1), rowBytes), in computeByteSize() 54 safe.mul(this->width(), this->bytesPerPixel())); in computeByteSize() 55 return safe ? bytes : SIZE_MAX; in computeByteSize()
|
D | SkPath_serial.cpp | 104 SkSafeMath safe; in writeToMemory() local 106 size = safe.add(size, safe.mul(pts, sizeof(SkPoint))); in writeToMemory() 107 size = safe.add(size, safe.mul(cnx, sizeof(SkScalar))); in writeToMemory() 108 size = safe.add(size, safe.mul(vbs, sizeof(uint8_t))); in writeToMemory() 109 size = safe.alignUp(size, 4); in writeToMemory() 110 if (!safe) { in writeToMemory()
|
/third_party/boost/libs/geometry/doc/index/rtree/ |
D | exception_safety.qbk | 13 In order to be exception-safe the __rtree__ requires: 15 * exception-safe copy constructor and copy assignment of the `__value__`. 16 * exception-safe copy constructor and copy assignment of the `CoordinateType` used in the `Indexabl… 34 [[`insert(__value__)`] [ not safe 36 [[`insert(Iterator, Iterator)`][ not safe ]] 37 [[`insert(Range)`] [ not safe ]] 38 [[`remove(__value__)`] [ not safe ]] 39 [[`remove(Iterator, Iterator)`][ not safe ]] 40 [[`remove(Range)`] [ not safe ]]
|
/third_party/skia/src/core/ |
D | SkVertices.cpp | 42 SkSafeMath safe; in Sizes() local 44 fVSize = safe.mul(desc.fVertexCount, sizeof(SkPoint)); in Sizes() 45 fTSize = desc.fHasTexs ? safe.mul(desc.fVertexCount, sizeof(SkPoint)) : 0; in Sizes() 46 fCSize = desc.fHasColors ? safe.mul(desc.fVertexCount, sizeof(SkColor)) : 0; in Sizes() 49 fISize = safe.mul(desc.fIndexCount, sizeof(uint16_t)); in Sizes() 68 fISize = safe.mul(numFanTris, 3 * sizeof(uint16_t)); in Sizes() 71 fTotal = safe.add(sizeof(SkVertices), in Sizes() 72 safe.add(fVSize, in Sizes() 73 safe.add(fTSize, in Sizes() 74 safe.add(fCSize, in Sizes() [all …]
|
D | SkTextBlob.cpp | 41 SkSafeMath* safe) { in StorageSize() argument 44 auto glyphSize = safe->mul(glyphCount, sizeof(uint16_t)), in StorageSize() 45 posSize = safe->mul(PosCount(glyphCount, positioning, safe), sizeof(SkScalar)); in StorageSize() 49 size = safe->add(size, safe->alignUp(glyphSize, 4)); in StorageSize() 50 size = safe->add(size, posSize); in StorageSize() 53 size = safe->add(size, sizeof(uint32_t)); in StorageSize() 54 size = safe->add(size, safe->mul(glyphCount, sizeof(uint32_t))); in StorageSize() 55 size = safe->add(size, textSize); in StorageSize() 58 return safe->alignUp(size, sizeof(void*)); in StorageSize() 99 SkSafeMath safe; in NextUnchecked() local [all …]
|
D | SkMask.cpp | 57 SkSafeMath safe; in PrepareDestination() local 61 size_t dstW = safe.add(src.fBounds.width(), safe.add(radiusX, radiusX)); in PrepareDestination() 63 size_t dstH = safe.add(src.fBounds.height(), safe.add(radiusY, radiusY)); in PrepareDestination() 78 size_t toAlloc = safe.mul(dstW, dstH); in PrepareDestination() 80 if (safe && src.fImage != nullptr) { in PrepareDestination()
|
D | SkPath_serial.cpp | 107 SkSafeMath safe; in writeToMemory() local 109 size = safe.add(size, safe.mul(pts, sizeof(SkPoint))); in writeToMemory() 110 size = safe.add(size, safe.mul(cnx, sizeof(SkScalar))); in writeToMemory() 111 size = safe.add(size, safe.mul(vbs, sizeof(uint8_t))); in writeToMemory() 112 size = safe.alignUp(size, 4); in writeToMemory() 113 if (!safe) { in writeToMemory()
|
D | SkImageInfo.cpp | 63 SkSafeMath safe; in computeByteSize() local 64 size_t bytes = safe.add(safe.mul(safe.addInt(this->height(), -1), rowBytes), in computeByteSize() 65 safe.mul(this->width(), this->bytesPerPixel())); in computeByteSize() 71 return (safe.ok() && (bytes <= kMaxSigned32BitSize)) ? bytes : SIZE_MAX; in computeByteSize()
|
/third_party/openssl/crypto/bn/ |
D | bn_prime.c | 25 static int probable_prime(BIGNUM *rnd, int bits, int safe, prime_t *mods); 26 static int probable_prime_dh(BIGNUM *rnd, int bits, int safe, prime_t *mods, 54 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, in BN_generate_prime_ex() argument 68 } else if (add == NULL && safe && bits < 6 && bits != 3) { in BN_generate_prime_ex() 92 if (!probable_prime(ret, bits, safe, mods)) in BN_generate_prime_ex() 95 if (!probable_prime_dh(ret, bits, safe, mods, add, rem, ctx)) in BN_generate_prime_ex() 103 if (!safe) { in BN_generate_prime_ex() 272 static int probable_prime(BIGNUM *rnd, int bits, int safe, prime_t *mods) in probable_prime() argument 282 if (safe && !BN_set_bit(rnd, 1)) in probable_prime() 304 if (safe ? (mods[i] + delta) % primes[i] <= 1 in probable_prime() [all …]
|
/third_party/python/Lib/urllib/ |
D | parse.py | 804 def __init__(self, safe): argument 806 self.safe = _ALWAYS_SAFE.union(safe) 814 res = chr(b) if b in self.safe else '%{:02X}'.format(b) 818 def quote(string, safe='/', encoding=None, errors=None): argument 870 return quote_from_bytes(string, safe) 872 def quote_plus(string, safe='', encoding=None, errors=None): argument 881 return quote(string, safe, encoding, errors) 882 if isinstance(safe, str): 886 string = quote(string, safe + space, encoding, errors) 889 def quote_from_bytes(bs, safe='/'): argument [all …]
|
/third_party/node/deps/npm/node_modules/ini/ |
D | ini.js | 5 exports.safe = safe 31 out += safe(k + '[]') + separator + safe(item) + '\n' 36 out += safe(k) + separator + safe(val) + eol 40 out = '[' + safe(opt.section) + ']' + eol + out 159 function safe (val) { function
|
/third_party/boost/libs/regex/doc/ |
D | thread_safety.qbk | 11 The Boost.Regex library is thread safe when Boost is: you can verify that 12 Boost is in thread safe mode by checking to see if `BOOST_HAS_THREADS` is 16 Class [basic_regex] and its typedefs regex and wregex are thread safe, 19 are all re-entrant and thread safe. Class [match_results] is now thread safe, 25 The [link boost_regex.ref.posix POSIX API functions] are all re-entrant and thread safe, regular 29 only thread safe if each thread gets its own
|
/third_party/node/lib/internal/per_context/ |
D | primordials.js | 299 const makeSafe = (unsafe, safe) => { argument 305 if (!ReflectGetOwnPropertyDescriptor(safe.prototype, key)) { 319 ReflectDefineProperty(safe.prototype, key, desc); 323 copyProps(unsafe.prototype, safe.prototype); 325 copyProps(unsafe, safe); 327 ObjectSetPrototypeOf(safe.prototype, null); 328 ObjectFreeze(safe.prototype); 329 ObjectFreeze(safe); 330 return safe;
|
/third_party/node/deps/npm/node_modules/safer-buffer/ |
D | Readme.md | 34 ## Why not [safe-buffer](https://npmjs.com/safe-buffer)? 36 _In short: while `safe-buffer` serves as a polyfill for the new API, it allows old API usage and 39 `safe-buffer` could be used safely to get the new API while still keeping support for older 41 I found out that `safe-buffer` is itself causing problems in some cases. 52 …e 'Buffer.alloc()' or 'Buffer.from()' (use 'https://www.npmjs.com/package/safe-buffer' for '<4.5.0… 59 Let's now throw in `safe-buffer`! 62 $ cat example.safe-buffer.js 63 const Buffer = require('safe-buffer').Buffer 65 $ standard example.safe-buffer.js 66 $ ./node-v6.13.0-linux-x64/bin/node example.safe-buffer.js [all …]
|