/external/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 …]
|
/external/skqp/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 …]
|
/external/python/uritemplates/uritemplate/ |
D | variable.py | 56 self.safe = '' 89 self.safe = URIVariable.reserved 124 self.safe = '' 137 self.safe = URIVariable.reserved 146 safe = self.safe 152 '%s=%s' % (name, quote(v, safe)) for v in value 155 value = ','.join(quote(v, safe) for v in value) 165 quote(k, safe), quote(v, safe) 171 quote(k, safe), quote(v, safe) 178 return '%s=%s' % (name, quote(value, safe)) [all …]
|
/external/python/cpython2/Lib/test/ |
D | test_pprint.py | 58 for safe in (2, 2.0, 2j, "abc", [3], (2,2), {3: 3}, uni("yaddayadda"), 62 self.assertFalse(pprint.isrecursive(safe), 63 "expected not isrecursive for %r" % (safe,)) 64 self.assertTrue(pprint.isreadable(safe), 65 "expected isreadable for %r" % (safe,)) 67 self.assertFalse(pp.isrecursive(safe), 68 "expected not isrecursive for %r" % (safe,)) 69 self.assertTrue(pp.isreadable(safe), 70 "expected isreadable for %r" % (safe,)) 93 for safe in self.a, self.b, self.d, (self.d, self.d): [all …]
|
/external/webrtc/webrtc/libjingle/xmllite/ |
D | xmlprinter.cc | 130 size_t safe = 0; in PrintQuotedValue() local 132 size_t unsafe = text.find_first_of("<>&\"", safe); in PrintQuotedValue() 135 *pout_ << text.substr(safe, unsafe - safe); in PrintQuotedValue() 144 safe = unsafe + 1; in PrintQuotedValue() 145 if (safe == text.length()) in PrintQuotedValue() 151 size_t safe = 0; in PrintBodyText() local 153 size_t unsafe = text.find_first_of("<>&", safe); in PrintBodyText() 156 *pout_ << text.substr(safe, unsafe - safe); in PrintBodyText() 164 safe = unsafe + 1; in PrintBodyText() 165 if (safe == text.length()) in PrintBodyText()
|
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/res/ |
D | FileFsFileTest.java | 40 assertThat(path).isEqualTo(safe("foo/bar")); in from_shouldIgnoreNullOrMissingComponents() 49 final String path = FileFsFile.from(safe("/some/path")).getPath(); in from_shouldAllowLeadingSlash() 50 assertThat(path).isEqualTo(safe("/some/path")); in from_shouldAllowLeadingSlash() 55 final String path = FileFsFile.from(safe("/some/path/./to/here")).getPath(); in from_shouldIgnoreDotParts() 56 assertThat(path).isEqualTo(safe("/some/path/to/here")); in from_shouldIgnoreDotParts() 61 …final String path = FileFsFile.from(".").join(safe("some/./path"), ".", safe("to/here")).getPath(); in join_shouldIgnoreDotParts() 62 assertThat(path).isEqualTo(safe("./some/path/to/here")); in join_shouldIgnoreDotParts() 92 private String safe(String path) { in safe() method in FileFsFileTest
|
/external/clang/docs/ |
D | SafeStack.rst | 14 the safe stack and the unsafe stack. The safe stack stores return addresses, 15 register spills, and local variables that are always accessed in a safe way, 18 on the safe stack. 36 used through multiple stack frames. Moving such objects away from the safe 56 changed to look for the live pointers on both safe and unsafe stacks. 64 ``__attribute__((no_sanitize("safe-stack")))`` below). 72 are always accessed in a safe way by separating them in a dedicated safe stack 73 region. The safe stack is automatically protected against stack-based buffer 75 is always accessed in a safe way. In the current implementation, the safe stack 77 randomization and information hiding: the safe stack is allocated at a random [all …]
|
/external/skia/src/core/ |
D | SkTextBlob.cpp | 40 SkSafeMath* safe) { in StorageSize() argument 43 auto glyphSize = safe->mul(glyphCount, sizeof(uint16_t)), in StorageSize() 44 posSize = safe->mul(PosCount(glyphCount, positioning, safe), sizeof(SkScalar)); in StorageSize() 48 size = safe->add(size, safe->alignUp(glyphSize, 4)); in StorageSize() 49 size = safe->add(size, posSize); in StorageSize() 52 size = safe->add(size, sizeof(uint32_t)); in StorageSize() 53 size = safe->add(size, safe->mul(glyphCount, sizeof(uint32_t))); in StorageSize() 54 size = safe->add(size, textSize); in StorageSize() 57 return safe->alignUp(size, sizeof(void*)); in StorageSize() 98 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() 341 SkSafeRange safe; in Unflatten_PreV68() local 367 paint->setStrokeCap(safe.checkLE((tmp >> 24) & 0xFF, SkPaint::kLast_Cap)); in Unflatten_PreV68() 368 paint->setStrokeJoin(safe.checkLE((tmp >> 16) & 0xFF, SkPaint::kLast_Join)); in Unflatten_PreV68() 369 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()
|
/external/skqp/src/core/ |
D | SkTextBlob.cpp | 40 SkSafeMath* safe) { in StorageSize() argument 43 auto glyphSize = safe->mul(glyphCount, sizeof(uint16_t)), in StorageSize() 44 posSize = safe->mul(PosCount(glyphCount, positioning, safe), sizeof(SkScalar)); in StorageSize() 48 size = safe->add(size, safe->alignUp(glyphSize, 4)); in StorageSize() 49 size = safe->add(size, posSize); in StorageSize() 52 size = safe->add(size, sizeof(uint32_t)); in StorageSize() 53 size = safe->add(size, safe->mul(glyphCount, sizeof(uint32_t))); in StorageSize() 54 size = safe->add(size, textSize); in StorageSize() 57 return safe->alignUp(size, sizeof(void*)); in StorageSize() 98 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 | SkImageInfo.cpp | 51 SkSafeMath safe; in computeByteSize() local 52 size_t bytes = safe.add(safe.mul(safe.addInt(this->height(), -1), rowBytes), in computeByteSize() 53 safe.mul(this->width(), this->bytesPerPixel())); in computeByteSize() 54 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()
|
D | SkPaint.cpp | 358 static uint32_t unpack_v68(SkPaint* paint, uint32_t packed, SkSafeRange& safe) { in unpack_v68() argument 362 paint->setBlendMode(safe.checkLE(packed & 0xFF, SkBlendMode::kLastMode)); in unpack_v68() 364 paint->setStrokeCap(safe.checkLE(packed & 0x3, SkPaint::kLast_Cap)); in unpack_v68() 366 paint->setStrokeJoin(safe.checkLE(packed & 0x3, SkPaint::kLast_Join)); in unpack_v68() 368 paint->setStyle(safe.checkLE(packed & 0x3, SkPaint::kStrokeAndFill_Style)); in unpack_v68() 370 paint->setFilterQuality(safe.checkLE(packed & 0x3, kLast_SkFilterQuality)); in unpack_v68() 407 SkSafeRange safe; in Unflatten_PreV68() local 433 paint->setStrokeCap(safe.checkLE((tmp >> 24) & 0xFF, SkPaint::kLast_Cap)); in Unflatten_PreV68() 434 paint->setStrokeJoin(safe.checkLE((tmp >> 16) & 0xFF, SkPaint::kLast_Join)); in Unflatten_PreV68() 435 paint->setStyle(safe.checkLE((tmp >> 12) & 0xF, SkPaint::kStrokeAndFill_Style)); in Unflatten_PreV68() [all …]
|
/external/python/cpython3/Lib/urllib/ |
D | parse.py | 765 def __init__(self, safe): argument 767 self.safe = _ALWAYS_SAFE.union(safe) 775 res = chr(b) if b in self.safe else '%{:02X}'.format(b) 779 def quote(string, safe='/', encoding=None, errors=None): argument 824 return quote_from_bytes(string, safe) 826 def quote_plus(string, safe='', encoding=None, errors=None): argument 835 return quote(string, safe, encoding, errors) 836 if isinstance(safe, str): 840 string = quote(string, safe + space, encoding, errors) 843 def quote_from_bytes(bs, safe='/'): argument [all …]
|
/external/grpc-grpc-java/core/src/main/java/io/grpc/ |
D | MethodDescriptor.java | 48 private final boolean safe; field in MethodDescriptor 225 boolean safe, in MethodDescriptor() argument 234 this.safe = safe; in MethodDescriptor() 236 Preconditions.checkArgument(!safe || type == MethodType.UNARY, in MethodDescriptor() 357 return safe; in isSafe() 443 .setSafe(safe) in toBuilder() 460 private boolean safe; field in MethodDescriptor.Builder 544 public Builder<ReqT, RespT> setSafe(boolean safe) { in setSafe() argument 545 this.safe = safe; in setSafe() 574 safe, in build() [all …]
|
/external/clang/test/ARCMT/ |
D | check-api.m | 23 …[invok getReturnValue:&strong_id]; // expected-error {{NSInvocation's getReturnValue is not safe t… 24 …[invok getReturnValue:&weak_id]; // expected-error {{NSInvocation's getReturnValue is not safe to … 28 …[invok setReturnValue:&strong_id]; // expected-error {{NSInvocation's setReturnValue is not safe t… 29 …[invok setReturnValue:&weak_id]; // expected-error {{NSInvocation's setReturnValue is not safe to … 33 …rong_id atIndex:0]; // expected-error {{NSInvocation's getArgument is not safe to be used with an … 34 …weak_id atIndex:0]; // expected-error {{NSInvocation's getArgument is not safe to be used with an … 38 …rong_id atIndex:0]; // expected-error {{NSInvocation's setArgument is not safe to be used with an … 39 …weak_id atIndex:0]; // expected-error {{NSInvocation's setArgument is not safe to be used with an …
|
/external/scapy/scapy/asn1/ |
D | ber.py | 148 explicit_tag=None, safe=False): argument 156 if not safe: 164 if not safe: 227 def do_dec(cls, s, context=None, safe=False): argument 238 return codec.dec(s,context,safe) 241 def dec(cls, s, context=None, safe=False): argument 242 if not safe: 243 return cls.do_dec(s, context, safe) 245 return cls.do_dec(s, context, safe) 247 o,remain = BERcodec_Object.dec(e.remaining, context, safe) [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/test/Transforms/SafeStack/X86/ |
D | abi_ssp.ll | 1 ; RUN: opt -safe-stack -S -mtriple=i686-pc-linux-gnu < %s -o - | FileCheck --check-prefixes=COMMON,… 2 ; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck --check-prefixes=COMMO… 4 ; RUN: opt -safe-stack -S -mtriple=i686-linux-android < %s -o - | FileCheck --check-prefixes=COMMON… 5 ; RUN: opt -safe-stack -S -mtriple=i686-linux-android24 < %s -o - | FileCheck --check-prefixes=COMM… 7 ; RUN: opt -safe-stack -S -mtriple=x86_64-linux-android < %s -o - | FileCheck --check-prefixes=COMM… 9 ; RUN: opt -safe-stack -S -mtriple=x86_64-unknown-fuchsia < %s -o - | FileCheck --check-prefixes=CO…
|
/external/python/setuptools/setuptools/command/ |
D | bdist_egg.py | 269 safe = getattr(self.distribution, 'zip_safe', None) 270 if safe is not None: 271 return safe 376 safe = True 383 safe = scan_module(egg_dir, base, name, stubs) and safe 384 return safe 387 def write_safety_flag(egg_dir, safe): argument 392 if safe is None or bool(safe) != flag: 394 elif safe is not None and bool(safe) == flag: 424 safe = True [all …]
|