Home
last modified time | relevance | path

Searched refs:safe (Results 1 – 25 of 1183) sorted by relevance

12345678910>>...48

/external/skqp/tests/
DSafeMathTest.cpp17 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/skia/tests/
DSafeMathTest.cpp17 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/
Dvariable.py60 self.safe = ''
93 self.safe = URIVariable.reserved
128 self.safe = ''
141 self.safe = URIVariable.reserved
150 safe = self.safe
156 '{}={}'.format(name, quote(v, safe)) for v in value
159 value = ','.join(quote(v, safe) for v in value)
169 quote(k, safe), quote(v, safe)
175 quote(k, safe), quote(v, safe)
182 return '{}={}'.format(name, quote(value, safe))
[all …]
/external/python/cpython2/Lib/test/
Dtest_pprint.py58 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/
Dxmlprinter.cc130 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/
DFileFsFileTest.java40 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/skia/src/core/
DSkTextBlob.cpp41 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 …]
DSkVertices.cpp32 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 …]
DSkMask.cpp57 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()
DSkPath_serial.cpp106 SkSafeMath safe; in writeToMemory() local
108 size = safe.add(size, safe.mul(pts, sizeof(SkPoint))); in writeToMemory()
109 size = safe.add(size, safe.mul(cnx, sizeof(SkScalar))); in writeToMemory()
110 size = safe.add(size, safe.mul(vbs, sizeof(uint8_t))); in writeToMemory()
111 size = safe.alignUp(size, 4); in writeToMemory()
112 if (!safe) { in writeToMemory()
DSkYUVASizeInfo.cpp13 SkSafeMath safe; in computeTotalBytes() local
19 totalBytes = safe.add(totalBytes, safe.mul(fWidthBytes[i], fSizes[i].height())); in computeTotalBytes()
22 return safe.ok() ? totalBytes : SIZE_MAX; in computeTotalBytes()
DSkPaint.cpp292 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 …]
/external/clang/docs/
DSafeStack.rst14 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/grpc-grpc-java/core/src/main/java/io/grpc/
DMethodDescriptor.java48 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/skqp/src/core/
DSkTextBlob.cpp40 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 …]
DSkVertices.cpp32 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 …]
DSkMask.cpp57 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()
DSkImageInfo.cpp51 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()
/external/python/cpython3/Lib/urllib/
Dparse.py753 def __init__(self, safe): argument
755 self.safe = _ALWAYS_SAFE.union(safe)
763 res = chr(b) if b in self.safe else '%{:02X}'.format(b)
767 def quote(string, safe='/', encoding=None, errors=None): argument
819 return quote_from_bytes(string, safe)
821 def quote_plus(string, safe='', encoding=None, errors=None): argument
830 return quote(string, safe, encoding, errors)
831 if isinstance(safe, str):
835 string = quote(string, safe + space, encoding, errors)
838 def quote_from_bytes(bs, safe='/'): argument
[all …]
/external/clang/test/ARCMT/
Dcheck-api.m23 …[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/
Dber.py148 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/
Dabi_ssp.ll1 ; 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/igt-gpu-tools/lib/
Dintel_mmio.c78 bool safe; member
168 intel_register_access_init(struct pci_device *pci_dev, int safe, int fd) in intel_register_access_init() argument
181 mmio_data.safe = (safe != 0 && in intel_register_access_init()
184 if (mmio_data.safe) in intel_register_access_init()
255 if (!mmio_data.safe) in intel_register_read()
295 if (!mmio_data.safe) in intel_register_write()
/external/python/asn1crypto/asn1crypto/
D_iri.py80 username = _urlquote(parsed.username, safe='!$&\'()*+,;=')
81 password = _urlquote(parsed.password, safe='!$&\'()*+,;=')
101 path = _urlquote(parsed.path, safe='/!$&\'()*+,;=@:')
103 query = _urlquote(parsed.query, safe='/?!$&\'()*+,;=@:')
105 fragment = _urlquote(parsed.fragment, safe='/?!$&\'()*+,;=@:')
193 def _urlquote(string, safe=''): argument
220 for safe_char in list(safe):
232 output = urlquote(string.encode('utf-8'), safe=safe.encode('utf-8'))
/external/python/setuptools/setuptools/command/
Dbdist_egg.py269 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 …]

12345678910>>...48