Valeriy Van
1ef6001bcd
Fixes and unifies outputs of example snippets in CharacterProperties.swift as it was suggested in review to PR
2020-04-29 23:34:30 +02:00
Joe Groff
9cdfb0edfc
Merge pull request #30560 from 3405691582/OpenBSD_StringStorage_AvoidMallocSize
...
[stdlib] Avoid malloc_size on OpenBSD.
2020-04-29 11:02:06 -07:00
Valeriy Van
e1e33b98a9
Fixes example snippets in CharacterProperties.swift
2020-04-29 19:11:15 +02:00
Valeriy Van
f434cbab05
Fixes example snippets in StringUTF16View.swift
2020-04-27 23:54:04 +02:00
3405691582
7830028f55
[stdlib] Avoid malloc_size on OpenBSD.
...
malloc introspection is a platform feature that is unavailable on
OpenBSD. There is no workaround for the feature, so we have to assume
that allocations succeed in allocating exactly the amount of memory
requested, and nothing more.
Here a new mallocSize shim is introduced so the feature check for malloc
introspection is pushed to the shims, rather than using os checks
directly from Swift. Not every use of malloc_size has been converted
yet; ManagedBuffer.swift still remains. However, this module requires
special care to fix, which will be done separately.
2020-04-27 15:52:37 -04:00
Valeriy Van
b0425a6cd8
Fixes example snippet
2020-04-26 22:08:27 +02:00
swift-ci
d7b5de95f3
Merge pull request #31321 from valeriyvan/SnippetsUnsafePointer
2020-04-25 19:02:45 -07:00
Valeriy Van
ad1c957b8d
Fixes example snippets in UnsafePointer.swift
2020-04-25 22:51:37 +02:00
Valeriy Van
5e3dd58e14
Fixes snippets in UnsafeRawPointer.swift
2020-04-25 21:04:15 +02:00
Michael Ilseman
249d2eeb2c
[string] Add _deconstructUTF8 for internal usage
...
Add string deconstruction into contiguous UTF-8 (allocating if
needed).
Comments and docs to come soon, for now doing early testing.
2020-04-24 12:13:41 -07:00
David Smith
a4d3261669
Merge pull request #31110 from Catfish-Man/tagged-too-two
...
Avoid losing the high bits of bridged constant tagged pointers
2020-04-23 12:07:22 -07:00
Valeriy Van
b6e46677e7
Fixes doc comment in UnsafeRawBufferPointer.swift.gyb
2020-04-23 18:45:00 +02:00
David Smith
220f0ccde8
Untag tagged constant NSString pointers before we wrap them, so BridgeObject doesn't stomp the high bits
2020-04-22 16:49:23 -07:00
Robert Widmann
177bd245b2
Merge pull request #30702 from benrimmington/static-string-extensions
...
[stdlib] StaticString: extension per conformance
2020-04-20 09:58:06 -07:00
Valeriy Van
2dcbc53949
Removes redundant buffer zeroing in foreignErrorCorrectedGrapheme func
2020-04-17 22:51:28 +02:00
Hamish Knight
f2564d5126
[stdlib] Add a couple of missing @_nonEphemeral attributes
2020-04-16 10:17:16 -07:00
David Smith
e192a7ec0f
Merge pull request #30966 from Catfish-Man/tagged-too
...
Avoid attempting to create SmallStrings for constant tagged CFStrings
2020-04-15 15:37:10 -07:00
David Smith
5ad4b15af6
Avoid attempting to create SmallStrings for constant tagged CFStrings
2020-04-15 12:30:20 -07:00
Saleem Abdulrasool
d0048ccc61
stdlib: android does not support FP80
...
Correct the maximal floating point width. Although technically, Android
could support FP128 on AArch64, Swift does not currently support FP128.
For now, ensure that we use FP64 on Android.
2020-04-13 12:23:26 -07:00
Robert Widmann
763875aea7
Merge pull request #15108 from darquro/fast-path-ad-hoc-printing-of-strings
...
[stdlib][SR-7136] Fast-path ad-hoc printing of Strings
2020-04-12 09:30:52 -07:00
Saleem Abdulrasool
b7654f158b
Merge pull request #30885 from compnerd/android-fp80
...
stdlib: android does not support fp80
2020-04-11 10:13:52 -07:00
Michael Ilseman
38fce16254
[string] Convert IR tests to SIL tests
2020-04-10 11:39:22 -07:00
Michael Ilseman
d02f5bc509
[string] Move wCSIA check higher than _HasContiguousBytes
2020-04-10 11:39:03 -07:00
Michael Ilseman
ae224cacdb
[string] Restore _HasContiguousBytes for untyped storage
...
UnsafeRawBufferPointer cannot implement
withContiguousStorageIfAvailable because doing so would potentially
create a typed pointer from untyped data.
2020-04-09 13:38:28 -07:00
Michael Ilseman
e536ad2342
[string] Outline cold path from initializer
...
Outline the cold, non-contiguous UTF-8 path from String(decoding:as:),
saving ~40 bytes (33%) of code size (x86_64 and arm64) from every call
site where the contiguity check cannot be constant folded away.
2020-04-09 13:38:28 -07:00
Michael Ilseman
c2631004d7
[string] _HasContiguousBytes -> withContiguousStorageIfAvailable
...
Switch String(decoding:as) and other entry points to call
withContiguousStorageIfAvailable rather than use _HasContiguousBytes.
2020-04-09 13:38:28 -07:00
Michael Ilseman
19b332c8e2
[gardening] Delete Trailing Whitespace
2020-04-09 13:38:27 -07:00
Saleem Abdulrasool
3fe5b1531c
stdlib: android does not support fp80
...
Like Windows, Android does not support FP80. Ensure that we do not emit
these even on x86 and x86_64.
2020-04-08 10:07:50 -07:00
Dario Rexin
999b93bfdb
Merge pull request #30815 from ktoso/wip-mangledTypeName
...
Improve usability of _mangledTypeName with Any.Type arguments
2020-04-06 20:49:13 -07:00
Stephen Canon
248c554524
Add Float16 to stdlib ( #30130 )
...
Add Float16 (IEEE 754 binary16) to the standard library, plus assorted runtime support operations.
Swift Evolution thread: https://forums.swift.org/t/se-0277-float16/33546
2020-04-06 17:57:44 -04:00
Konrad `ktoso` Malawski
5faf82c553
Improve usability of _mangledTypeName with Any.Type arguments
2020-04-05 12:27:50 +09:00
Michael Ilseman
5815468ebb
Merge pull request #30719 from milseman/tilde_equality
...
[String] Concrete String/Substring overloads for ~=
2020-04-03 11:12:32 -07:00
Michael Ilseman
30c92574ed
[String] Concrete String/Substring overloads for ~=
...
Add concrete overloads for ~= for String/Substring
combinations. SR-12457 tracks making this generic after we understand
the expression type checker impact.
2020-04-02 10:37:30 -07:00
Ben Rimmington
682c1672b6
[stdlib] Update file headers of de-gybbed files
2020-04-01 22:14:03 +01:00
Joe Groff
026b8b31c9
Merge pull request #30318 from ktoso/wip-mangledTypeName
...
Add _mangledTypeName to allow round trips T->mangledName->T
2020-03-30 18:13:56 -07:00
Ben Rimmington
6ad83a0754
[stdlib] StaticString: extension per conformance
2020-03-28 18:29:01 +00:00
swift-ci
e5110d7953
Merge pull request #30146 from benrimmington/static-string-documentation
2020-03-27 16:36:13 -07:00
Mishal Shah
e7cd5ab17f
Update master to build with Xcode 11.4
2020-03-24 11:30:45 -07:00
Konrad `ktoso` Malawski
34b6e4fe58
Add precondition that no repairs were made to _mangledTypeName string
2020-03-18 11:51:28 +09:00
Xiaodi Wu
90c6c491d9
[gardening] Silence a warning about unused value
2020-03-14 10:33:45 -04:00
swift-ci
cc4bfe82da
Merge pull request #30398 from milseman/palloc_size
2020-03-13 17:57:59 -07:00
Michael Ilseman
d98a022924
[stdlib] Re-enable assertions on malloc size
...
Round up our malloc requests and assert that breadcrumbs are aligned
and where we think they should be. This is necessary because ASAN
doesn't give us pointer-rounded sizes.
2020-03-13 15:50:40 -07:00
Konrad `ktoso` Malawski
ea6b69eabc
Add missing @available marker on _getMangledTypeName
2020-03-10 14:04:47 +09:00
Konrad `ktoso` Malawski
33444489e5
Add _mangledTypeName to allow round trips T->mangledName->T
2020-03-10 12:20:08 +09:00
Michael Ilseman
4715d68890
Merge pull request #30237 from valeriyvan/RemoveRedundantZeroingStringGuts
...
Changes implementation of _persistCString from _StringGuts
2020-03-09 14:36:05 -07:00
Kuba (Brecka) Mracek
ab6533a40f
Merge branch 'master' into mracek/arm64e
2020-03-06 15:07:01 -08:00
Rintaro Ishizaki
3f69d6b9dd
Merge pull request #30260 from milseman/assert_san
...
[stdlib] Disable assertion tripping up ASAN
2020-03-06 09:32:31 -08:00
Michael Ilseman
8d5d3815a1
Merge pull request #30180 from benrimmington/se-0263-test
...
[SE-0263] Add test, rename API, update docs
2020-03-06 08:54:24 -08:00
Michael Ilseman
fd468d068e
[stdlib] Disable assertion tripping up ASAN
...
We have (and important!) assertion that our claimed allocation is
complete and the breadcrumbs are falling where we expect them
to. Something about ASAN changes the allocation behavior. Temporarily
disable this assertion until I can figure how to work with ASAN here.
2020-03-06 08:43:25 -08:00
Valeriy Van
f49f6a99ba
Fixes variable name
2020-03-06 06:32:53 +01:00