David Smith
ee02182c28
Fix mis-merge
2018-11-28 21:34:42 -08:00
swift-ci
c2a6021630
Merge pull request #20839 from airspeedswift/reduce-into-owned
2018-11-28 20:57:35 -08:00
John McCall
91a7c7635e
Merge pull request #20415 from rjmccall/stdlib-borrowed-storage
...
Use @_borrowed on a few declarations in the stdlib and overlays
2018-11-28 21:29:27 -05:00
Ben Cohen
da614764ed
Make reduce(inout:) take its initial value owned
2018-11-28 17:19:39 -08:00
David Smith
8b57921905
Assorted bridging changes:
...
• Convert _AbstractStringStorage to a protocol, and the free functions used to deduplicate implementations to extensions on that protocol.
• Move 'start' into the abstract type and use that to simplify some code
• Move the ASCII fast path for length into UTF16View.
• Add a weirder but faster way to check which (if any) of our NSString subclasses a given object is, and adopt it
2018-11-28 16:04:34 -08:00
swift-ci
d3bd4c5817
Merge pull request #20812 from milseman/sliced_guts
2018-11-27 17:45:23 -08:00
Michael Ilseman
e44972dcea
[String] Expunge _StringGutsSlice from ABI
...
_StringGutsSlice is an implementation helper that's no longer needed
from inlinable code. Internalize it.
2018-11-27 15:07:27 -08:00
Arnold Schwaighofer
e57ba9954c
Merge pull request #20763 from aschwaighofer/inlinable_arraybufferprotocol_init
...
stdlib: Make ArrayBufferProtocol.init inlinable to facilitate specialization
2018-11-27 08:45:46 -08:00
Ben Rimmington
c5997491da
[stdlib] Remove Strideable closed range operator
2018-11-27 12:58:22 +00:00
Slava Pestov
86b5411a5a
stdlib: __SwiftNativeNSString does not need to be public
2018-11-27 00:16:34 -05:00
swift-ci
68884b286c
Merge pull request #20768 from milseman/empty_range
2018-11-26 14:59:06 -08:00
swift-ci
8ce2a36e6b
Merge pull request #20653 from milseman/fastwidth
2018-11-26 14:34:54 -08:00
Karoy Lorentey
c1a7b71f46
Merge pull request #20762 from apple/sr-9348
...
[stdlib] _HashTable.copyContents: Fix out of bounds access
2018-11-26 21:04:17 +00:00
Michael Ilseman
4111b21cb0
[String] Bug fix for empty-range getCharacters
2018-11-26 12:13:23 -08:00
Arnold Schwaighofer
baae7ee10b
Fix spelling of inlinable
2018-11-26 11:27:58 -08:00
Arnold Schwaighofer
e582a45a48
stdlib: Make ArrayBufferProtocol.init inlinable to facilitate specialization
...
SR-9284
2018-11-26 11:10:21 -08:00
Michael Ilseman
8b9cc18003
Merge pull request #20621 from milseman/unsafe_unchecked_buffer_pointer
...
[stdlib] Unchecked subscript on UnsafeBufferPointer
2018-11-26 10:31:04 -08:00
Karoy Lorentey
66db9b40b8
[stdlib] _HashTable.copyContents: Fix buffer overrun
2018-11-26 18:24:23 +00:00
Arjun Nayini
a15ecd0039
PR Feedback
2018-11-24 13:51:48 -08:00
Arjun Nayini
300124460f
[SR-7076] Make ContiguousArray Codable
...
Implements Encodable and Decodable for ContiguousArray.
2018-11-24 09:09:55 -08:00
Karoy Lorentey
545fa5e640
[stdlib] Re-add previously synthesized hashing definitions
2018-11-22 17:15:36 +00:00
Karoy Lorentey
8bd56509b2
[stdlib] Add hashing methods to RawRepresentable to match ==
2018-11-22 17:14:56 +00:00
Saleem Abdulrasool
ab37099967
Merge pull request #20686 from compnerd/alignment
...
stdlib: pass along alignment for dealloc
2018-11-21 09:34:14 -08:00
Saleem Abdulrasool
381cae6df0
stdlib: pass along alignment for dealloc
...
Ensure that UnsafeMutablePointer.deallocate has the alignment that was
used when invoking UnsafeMutablePointer.allocate. This is required to
ensure that the appropriate `free` function is invoked. We would
previously fail on Windows as the allocation would use `malloc` and due
to the value being `-1`, use `_aligned_free` instead when deallocating.
2018-11-20 14:05:13 -08:00
Karoy Lorentey
694b153992
Merge pull request #20643 from lorentey/string-32-simple
...
[stdlib] _StringObject: Use a full 8-bit discriminator on 32-bit platforms
2018-11-20 17:50:53 +00:00
Karoy Lorentey
ef76bcf7cf
[stdlib] Don’t change the 64-bit ABI
2018-11-20 12:11:34 +00:00
Mark Lacey
9e7d7d0b8e
Merge pull request #20659 from rudkx/add-designated-types-for-logical-and-ranges
...
Update Policy.swift with designated types for logical and range operators.
2018-11-17 22:59:54 -08:00
Mark Lacey
b7626d7ccf
[stdlib] Update Policy.swift with designated types for logical and range operators.
2018-11-17 20:18:28 -08:00
swift-ci
89950feea9
Merge pull request #20651 from milseman/spurious_inlinable
2018-11-16 19:16:20 -08:00
Lance Parker
8306ef322a
Merge pull request #20585 from lancep/spotFixForStringCompCrash
...
[stdlib] properly promote stack buffer to heap buffer when necessary
2018-11-16 19:05:35 -08:00
Michael Ilseman
18e415b4c0
[String] CJK Grapheme breaking fast-paths for fullwidth
...
Add in grapheme breaking fast-paths for fullwidth forms and
punctuation. Extend non-combining kana fast-paths to include vowel
extender.
2018-11-16 16:27:20 -08:00
Mark Lacey
2c15dc2d1c
Merge pull request #20625 from rudkx/designated-types-array
...
[ConstraintSystem] Add Array as a designated type for `+` and `+=`.
2018-11-16 15:28:34 -08:00
Michael Ilseman
8b1464a984
[String] Drop spurious @inlinable
2018-11-16 15:08:20 -08:00
Michael Ilseman
3a0ac0270d
[stdlib] Unchecked subscript on UnsafeBufferPointer
...
Add a use an unchecked subscript on UnsafeBufferPointer, which skips
debugPrecondition checks (in case we're not inlined) as well as a
force-unwrap check.
2018-11-16 11:12:29 -08:00
Lance Parker
fc3341eddc
fixup rebase
2018-11-16 11:07:30 -08:00
Mark Lacey
d3b660d907
[stdlib] Remove FIXMEs from Array extension.
2018-11-16 11:03:55 -08:00
Karoy Lorentey
3b748933f1
[stdlib] _StringObject: Use a full 8-bit discriminator on 32-bit platforms
...
We now have plenty of extra inhabitants in the variant enum, so we can get rid of the 7-bit hack.
It’d also be possible now to increase small string capacity to a spacious 11 bytes; however this needs a full overhaul of the 32-bit representation, so it needs a little bit more time in the oven.
2018-11-16 18:36:03 +00:00
Lance Parker
f9aa78761f
Moar feedback
2018-11-16 10:21:33 -08:00
Lance Parker
12bf2978e3
Michael's feedback
2018-11-16 10:20:46 -08:00
Lance Parker
0009b21533
properly promote stack buffer to heap buffer when necessary
2018-11-16 10:19:48 -08:00
Doug Gregor
cc2ee165a1
[ABI] Use generic environment to handle mangled generic keypath types.
...
Always use mangled type names to represent type metadata in keypath patterns.
For generic types, use the generic environment to pull substituted types
from the instantiation arguments.
Finishes the type metadata part of rdar://problem/38038799.
2018-11-16 10:13:07 -08:00
Doug Gregor
f759296cc8
[Keypaths] Encode generic environment in the key-path pattern.
...
Extend the key-path pattern with a representation of the generic environment
of the key-path, which includes the generic parameters and generic
requirements of the environment.
2018-11-16 10:13:06 -08:00
Mark Lacey
d7cf830842
[ConstraintSystem] Add Array as a designated type for + and +=.
...
Also add overloads for these operators to an extension of Array.
This allows us to typecheck array concatenation quickly with
designated type support enabled and the remaining type checker hacks
disabled.
2018-11-15 21:42:33 -08:00
Ben Cohen
f86fc100a5
Ditch the underscore
2018-11-15 20:55:10 -08:00
Ben Cohen
7df1587c27
Restore LazyCollection, but deprecated
2018-11-15 20:54:13 -08:00
Ben Cohen
1673c12d78
[stdlib] Replace "sanityCheck" with "internalInvariant" ( #20616 )
...
* Replace "sanityCheck" with "internalInvariant"
2018-11-15 20:50:22 -08:00
swift-ci
f093925036
Merge pull request #20452 from Catfish-Man/stringtrampolines
2018-11-15 17:55:34 -08:00
swift-ci
126f9d7773
Merge pull request #20610 from DougGregor/abi-symbolic-accessor-ref-2-byte
2018-11-15 17:30:19 -08:00
swift-ci
f76d920709
Merge pull request #20612 from DougGregor/runtime-demangle-to-metadata-overriode
2018-11-15 17:16:29 -08:00
David Smith
8bb6b78e36
Use super trampolines to let us override several more NSString methods (-UTF8String, -cStringUsingEncoding:, and -getCString:maxLength:encoding:) for performance
2018-11-15 17:10:51 -08:00