Commit Graph

12522 Commits

Author SHA1 Message Date
Mike Ash
a2cd889ab3 [Stdlib] Fix botched merge conflict resolution in Data.swift. 2019-01-15 13:43:20 -05:00
Mike Ash
e07e1db12a [Stdlib] Put $ at the end of the Swift module's generic class ObjC names.
This avoids name conflicts between generic classes in the Swift modules of the old and new stdlibs when loaded into the same process.
2019-01-15 12:21:20 -05:00
Mike Ash
fa5888fb3f [Stdlib][Overlays] Rename various classes to avoid conflicting ObjC names.
Old Swift and new Swift runtimes and overlays need to coexist in the same process. This means there must not be any classes which have the same ObjC runtime name in old and new, because the ObjC runtime doesn't like name collisions.

When possible without breaking source compatibility, classes were renamed in Swift, which results in a different ObjC name.

Public classes were renamed only on the ObjC side using the @_objcRuntimeName attribute.

This is similar to the work done in pull request #19295. That only renamed @objc classes. This renames all of the others, since even pure Swift classes still get an ObjC name.

rdar://problem/46646438
2019-01-15 12:21:20 -05:00
John McCall
f771e4c36d Merge pull request #21237 from drodriguez/aapcs64-valist
[stdlib][SR-2239] Refactor AAPCS64 variable argument list support.
2019-01-14 23:48:14 -05:00
Max Moiseev
22b514353c Merge pull request #20715 from anayini/contiguous-array-codable
[SR-7076] Make ContiguousArray Codable
2019-01-14 17:07:39 -08:00
Scott Perry
c0c068d663 Match indentation style 2019-01-14 15:53:24 -08:00
Max Moiseev
3b6c6cc0a5 Merge pull request #19532 from dlbuckley/SR-8649_ranges_codable
SR-8649: Range types conform to Codable
2019-01-14 14:38:32 -08:00
Itai Ferber
6c576109e1 Merge pull request #21754 from itaiferber/data-inlinability-refinements
Refine Data inlinability
2019-01-14 13:37:59 -08:00
swift-ci
77ec709128 Merge pull request #21820 from freak4pc/sm/typo 2019-01-14 09:07:29 -08:00
Scott Perry
1af14db552 Initial import of diffing package into standard library 2019-01-13 20:17:20 -08:00
swift-ci
b3a20520f7 Merge pull request #21711 from apple/marcrasi-const-evaluator-strings 2019-01-12 12:32:19 -08:00
Shai Mishali
6bfe3dadc5 Minor typo fix understimatedCap -> underestimatedCap 2019-01-12 15:37:01 +02:00
Itai Ferber
70f5e4ce2d Remove unnecessary @inlinable annotations on hash(into:) 2019-01-11 11:09:12 -08:00
Itai Ferber
076effdf5d Correct buffering in .init<S> and .append<S> and add unit test 2019-01-11 10:14:27 -08:00
Itai Ferber
1b5c0189b1 Account for Int vs. UInt8 in InlineData.hash(into:) 2019-01-10 15:50:56 -08:00
Itai Ferber
bb5ab742d5 Add buffering to worst-case scenarios in Data.init<S>/.append<S> 2019-01-10 15:50:32 -08:00
Joe Groff
9669c3a703 KeyPaths: Don't relative-reference selector refs.
ld64 doesn't like this. Instead, generate a stub function to grab the instantiated selector. Fixes rdar://problem/47184763.
2019-01-10 14:32:50 -08:00
Itai Ferber
e49da4dc49 Refine inlinability of Data and Data.Iterator 2019-01-09 15:02:46 -08:00
Itai Ferber
1de88a3916 Refine inlinability of _Representation 2019-01-09 14:48:47 -08:00
Itai Ferber
123b06787d Refine inlinability of LargeSlice and RangeReference 2019-01-09 14:40:48 -08:00
Itai Ferber
03dd2a365a Annotate inlinability of InlineSlice 2019-01-09 14:34:08 -08:00
Itai Ferber
b1e4c56d73 Refine inlinability of InlineData 2019-01-09 14:23:58 -08:00
Itai Ferber
6482c34077 Refine inlinability of _DataStorage 2019-01-09 14:18:33 -08:00
Jordan Rose
aea1ef8175 Move API notes out of the arch-specific subdirectories in lib/swift/ (#21690)
They're all the same anyway, and no longer even need to be compiled,
just copied in as text.

And drastically simplify how we "generate" them. Instead of attaching
their build jobs to the appropriate overlays, if present, "just" have
one job to copy them all and attach it to the Darwin overlay. That's
what we do for the overlay shim headers, and it's good enough.
(Eventually we want to get out of the business of shipping them
altogether.)

This does have the same flaw as the shim headers: if you /just/ change
API notes, the corresponding overlay does not get rebuilt. You have to
touch that too. But in practice that'll happen most of the time
anyway.

Part of rdar://problem/43545560
2019-01-09 14:06:21 -08:00
Itai Ferber
1d00e3c9b7 Migrate Data from hashValue to hash(into:) 2019-01-09 14:00:20 -08:00
Daniel Rodríguez Troitiño
7cfaf9fae2 [stdlib][SR-2239] Refactor AAPCS64 variable argument list support.
This refactoring uses large portions of the already existing code for
x86_64 and s390 to implement AAPCS64 __VaListBuilder. The parts where
each implementation differ are the x86_64 header, and the order of the
general and vector registers.

The changes also addresses many of the request from the reviewers in
 #20862 which were not addressed originally, like the reuse of the
already existing code, and the generalizations for the code to be useful
for platforms different than Linux (Android, for example).
2019-01-09 13:45:04 -08:00
Saleem Abdulrasool
6c642859ce stdlib: better type for WinSDK constant
Alter the constant type for the FileOperationFlag type.  This allows the
type system check the paramter type better.
2019-01-08 22:40:26 -08:00
Saleem Abdulrasool
5282e92e47 Merge pull request #21707 from compnerd/placeholder-less
[build] remove special placeholder libraries
2019-01-08 16:23:32 -08:00
Lance Parker
15aaa1e777 [stdlib]String normalization functions (#21026)
* fast/foreignNormalize functions
2019-01-08 13:55:29 -08:00
Marc Rasi
0eff06e4f9 const evaluator: string values and init operations 2019-01-08 11:57:27 -08:00
Saleem Abdulrasool
6dac8dd092 build: cleanup swiftCore link definition
Colocate the target specific library specification.  Inline the single
site use of the place holder ICU_UC and ICU_I18N libraries rather than
trying to create special library processing code for that.
2019-01-08 08:31:35 -08:00
Saleem Abdulrasool
5482409fb7 build: clean up unused variable (NFC)
Remove the unused parameter from the build (NFC).
2019-01-08 08:31:35 -08:00
Pavol Vaskovic
66bc1661b2 Merge pull request #21658 from palimondo/within-one-stem
[stdlib] Use ContiguousArray internally in Sequence dropLast, prefix, suffix
2019-01-08 12:22:11 +01:00
Michael Munday
8d4608f8e4 [string] Improve some small string comments
Clarify the expected behavior of some small string helper functions.
2019-01-08 06:15:54 -05:00
swift-ci
75033ed05a Merge pull request #21699 from compnerd/constant 2019-01-07 21:44:15 -08:00
Saleem Abdulrasool
3bd86ab18b Windows: add FOF_NO_UI into the overlay
This constant is needed for SHFileOperation which is needed for
Foundation.  Unfortunately, it is a complex macro which will not be
imported by the ClangImporter.
2019-01-07 19:04:04 -08:00
Raj Barik
a10db0209d Merge pull request #21660 from rajbarik/raj-es-perf
Add @inline(__always) to stdlib function for performance parity
2019-01-07 10:22:42 -08:00
Michael Munday
9587582c86 [string] Fix string implementation for big endian platforms
This commit supersedes 2866b4a which was overwritten by 4ab45df.

Store small string code units in little-endian byte order. This way
the code units are in the same order on all machines and can be
safely treated as an array of bytes.
2019-01-07 09:01:43 -05:00
swift-ci
a6fb95dfe3 Merge pull request #21669 from compnerd/shell-paths 2019-01-06 21:18:21 -08:00
Saleem Abdulrasool
fe37d7752a Platform: extend WinSDK module
Update the module definitions to include ShellAPI and Path API Set.
These are used by Foundation for FileManager.
2019-01-06 20:26:56 -08:00
Saleem Abdulrasool
6827b68a75 SwiftPrivate: correct dependencies on Windows
Ensure that we explicitly state the dependency on WinSDK to avoid issues
in parallel builds.  Caught by the Windows nightlies.
2019-01-06 11:41:18 -08:00
Raj Barik
fc90a0009a Add @inline(__always) to stdlib function for performance parity 2019-01-05 17:39:59 -08:00
Pavol Vaskovic
c887116862 [stdlib] dropLast, prefix, suffix: ContiguousArray
Nano-optimization:
Following the template used in methods `map` and `_filter`, internally use ContiguousArray before converting to an Array on return.
2019-01-05 14:28:37 +01:00
Pavol Vaskovic
a1fb6f1278 [stdlib] Gardening: ringBuffer position index 2019-01-05 14:27:03 +01:00
Raj Barik
3faf741288 Merge pull request #21617 from rajbarik/raj-perf-stdlib
Add inline(always) to AnyCollection routines like _suffix, _prefix, _drop, ...
2019-01-04 08:39:57 -08:00
Johannes Weiss
3f4990dc3c Merge pull request #21611 from weissi/jw-make-urbp-contiguous
conform Unsafe(Mutable)RawBufferPointer conform to _HasContiguousBytes
2019-01-04 10:36:08 +00:00
Azoy
5532a16205 simplify _getCString 2019-01-03 22:00:58 -06:00
swift-ci
3fb401cd1d Merge pull request #21622 from compnerd/reporting-in 2019-01-03 19:37:59 -08:00
Saleem Abdulrasool
a3814052f2 winsdk: add the Heap API set 2019-01-03 17:43:01 -08:00
Kuba Mracek
b9b4c789f3 Fix a data race on _swiftEmptyArrayStorage reported by TSan. Array.append(contentsOf) used to write a 0 into _buffer.count causing a race. 2019-01-03 17:26:18 -08:00