Commit Graph

3245 Commits

Author SHA1 Message Date
Slava Pestov
837c6f1055 Fix stdlib/NSObject test -- hashValue is a signed integer 2017-09-19 12:05:39 -07:00
Maxim Moiseev
1a61ad6401 [test] Requite objc_interop for the Metal test 2017-09-19 09:40:40 -07:00
Lance Parker
09d73a87ed Only import Foundation on Darwin platforms 2017-09-18 16:26:51 -07:00
Lance Parker
da22d25b8c Merge pull request #11985 from lancep/debugTestsShouldDisableOptimizations
Add -Onone to all the _Debug tests
2017-09-18 16:24:15 -07:00
Roman Levenstein
937352a03b Merge pull request #11910 from swiftix/resilience-performance1
Add experimental support for tracking the invocations of runtime functions
2017-09-18 16:23:00 -07:00
Lance Parker
2839e78b45 Fix Linux build 2017-09-18 14:20:55 -07:00
Doug Gregor
0c6b6f2218 Merge pull request #11963 from DougGregor/disable-mediaplayer-test
Temporarily disable failing list.
2017-09-18 13:27:46 -07:00
Roman Levenstein
8dfdcd9a61 Check that the runtime counters APIs are available even in no-asserts builds
No runtime function calls will be tracked in this case, but the APIs for reading them are still available. This way there is no need to recompile Swift clients if they are linked against different builds of the standard library and runtime library.
2017-09-18 13:20:14 -07:00
Lance Parker
acf94f94ec Add -Onone to all the _Debug tests 2017-09-18 12:56:52 -07:00
Lance Parker
6ff5310260 Moved helpers to a new file 2017-09-18 11:51:59 -07:00
Itai Ferber
1457e4da9d Merge pull request #11885 from cpwhidden/decoding-bool-coercion
[stdlib] Prevent coercion from Bool to numerical types when decoding JSON and plist
2017-09-18 09:15:18 -07:00
Philippe Hausler
c8bbce6ef1 Data slice mutation support (#11939)
* Mutations of slices of data should preserve relative indexing as well as cow semantics of slices

* Ensure hashes of ranges are uniform to the expected hash for Data

* Correct a few mistakes in the slice mutation tests

* Update sequence initializations to avoid directly calling mutableCopy which prevents slice offset mismatches

* Avoid invalid index slices in creating mirrors

* Restore the original Data description

* Resetting a slice region should expand the slice to the maximum of the region (not a out of bounds index of the backing buffer)

* Remove stray comment and use a stack buffer for sequence appending

* Return false when allocations fail in _resizeConditionalAllocationBuffer (not yet in use)

* Enumeration of regions of a slice should be limited to the slice range in the case of custom backing (e.g. dispatch_data_t)

* adjust assertion warnings for data indexes that are negative
2017-09-16 13:22:01 -07:00
Roman Levenstein
8027fa2b0a The test needs the standard library (the runtime library part of it) built with assertions 2017-09-15 21:41:22 -07:00
Doug Gregor
83d673310b Temporarily disable failing list.
More linkage fun with MediaPlayer. Tracked by rdar://problem/34462543.
2017-09-15 17:03:06 -07:00
Ryan Schmitt
a4ca9d0886 [overlay] Add Metal and MetalKit overlays 2017-09-15 16:51:02 -07:00
Roman Levenstein
045dc34955 Address review comments related to the Swift standard library part of the PR 2017-09-15 15:17:34 -07:00
Joe Groff
2ba8f57514 Remove staging flag for unimplemented key path components.
All the originally-planned component kinds are now implemented.
2017-09-15 11:55:35 -07:00
Joe Groff
b7566dacdb IRGen: Lowering for key paths with indices. 2017-09-15 10:24:28 -07:00
Joe Groff
78d75428d6 SILGen: Lower key path subscript indexes.
And fill out SIL support for parsing, printing, and serializing key path
patterns with captured indexes.
2017-09-15 10:00:32 -07:00
Roman Levenstein
3392b765ea Provide runtime function counters for object allocation, deallocation and initialization of static or stack-promoted objects 2017-09-15 09:24:56 -07:00
Roman Levenstein
4b2c6c017e Add a test for testing the runtime function counters functionality 2017-09-14 16:43:13 -07:00
Greg Parker
0bae31c1f0 [runtime] Add some missing -isNSWhatever__ methods to SwiftObject. (#11891)
SR-5636, rdar://33764085
2017-09-13 03:01:37 -07:00
Arnold Schwaighofer
5b5b5667cc Merge pull request #11886 from aschwaighofer/add_missing_requires_to_tests
Add missing REQUIRES: executable_test
2017-09-12 16:55:59 -07:00
Arnold Schwaighofer
c665c326d4 Add missing REQUIRES: executable_test
To get check-swift-only_non_executable clean again.
2017-09-12 14:50:15 -07:00
cpwhidden
997fe01809 [stdlib] Prevent type coercion from Bool to numerical types when decoding JSON and plist
JSONEncoder and PropertyListEncoder both use NSNumber to box Bool values.  An encoded Bool can be coerced to any numerical type during decoding because (false as NSNumber).intValue == 0.  As a remedy, all of the unbox(_:as:) methods of _JSONDecoder and _PlistDecoder for numerical types include a check that the value is not identical to either kCFBooleanTrue or kCFBooleanFalse, and throw a DecodingError._typeMismatch(at:expectation:) if this check fails.
2017-09-12 15:31:04 -05:00
Michael Ilseman
29d0d142bb [stdlib] Better message for unavailable String.init(_:UTF8Buffer) 2017-09-11 17:14:32 -07:00
Alex Hoppen
1c7e289b96 [Mangling] Adjust subscript mangling to not include "subscript"
Change the mangling of accessors to have a variable or subscript node
as their only child node, while subscript nodes no longer contain a decl
name.
2017-09-10 19:44:07 +02:00
Maxim Moiseev
6c7d93491f Merge pull request #11627 from moiseev/swift-2-artifacts
[stdlib] Remove the Grand Renaming artifacts of Swift 3 era
2017-09-05 11:41:18 -07:00
Mark Lacey
b64551b853 [stdlib] Restore signatures to use UnsafeMutableBufferPointer.
Resolves rdar://problem/21933004.
2017-08-31 22:33:36 -07:00
Kuba (Brecka) Mracek
d03a575279 Unify the capitalization across all user-visible error messages (#11599)
* Unify the capitalization across all user-visible error messages (fatal errors, assertion failures, precondition failures) produced by the runtime, standard library and the compiler.

* Update some more tests to the new expectations.
2017-08-29 12:16:04 -07:00
Max Moiseev
4c0368a02a [test] Cleaning up tests 2017-08-29 10:04:39 -07:00
Itai Ferber
ee39ff7f2f Allow top-level Codable strategy/type interception
At the top level, JSONEncoder/PropertyListEncoder (and the decoders) directly encoded values into an encoder instead of following the logic to box the values (and thus dispatch based on the type, potentially intercepting representations or applying strategies). This led to top-level values having a different representation than similar values throughout a payload.
2017-08-24 13:31:08 -07:00
Greg Parker
f3bd55eb52 [runtime] Implement SwiftObject -methodForSelector: and +instanceMethodForSelector:.
Fixes SR-5577 and rdar://33606034.
2017-08-23 17:11:47 -07:00
swift-ci
b4f2729e27 Merge pull request #11580 from moiseev/accelerate-test 2017-08-23 14:25:15 -07:00
Max Moiseev
9b5f24f071 [test] Use REQUIRES instead of XFAIL in an overlay test 2017-08-23 14:00:25 -07:00
Xiaodi Wu
7e11f1822c Implement fixed-width integer conversions from binary floating point
Make internal stdlib function public because it is called from stdlib tests

Add some first-thought optimizations
2017-08-22 19:52:33 -05:00
Mishal Shah
df070b858f Update swift master to build with Xcode 9 beta 6, macOS 10.13, iOS 11, tvOS 11, and watchOS 4 SDKs. 2017-08-22 11:52:50 -07:00
swift-ci
94dccf1fea Merge pull request #11087 from CodaFi/a-farewell-to-grant-money 2017-08-18 02:49:50 -07:00
Slava Pestov
1c76f2af0f Merge pull request #11362 from lorentey/isunique-with-sidetable
[runtime] Implement sidetable path for isUniquelyReferenced
2017-08-16 19:12:59 -04:00
swift-ci
379cf4f522 Merge pull request #11473 from shajrawi/enable_armv7_tests 2017-08-15 14:13:36 -07:00
Joe Shajrawi
66d0df6bae Revert "Temporary disable failing armv7 tests"
This reverts commit 78e5e25215.
2017-08-15 13:43:57 -07:00
Max Moiseev
3d8f90ae40 [test] Add a missing RUN line to Intents test 2017-08-15 10:26:42 -07:00
Max Moiseev
cf7ea08ed3 [overlay] Public extensions on external protocol are not in fact public 2017-08-14 17:15:46 -07:00
Michael Ilseman
019a2fb27a Merge pull request #11425 from milseman/deprecated_views
[stdlib] Deprecate String/Substring.CharacterView
2017-08-11 15:48:13 -07:00
Robert Widmann
e4bfd600cc Remove SwiftExperimental 2017-08-11 14:21:06 -07:00
Michael Ilseman
a7b299b51b [tests] Update tests as String.CharacterView is deprecated 2017-08-11 12:32:39 -07:00
Itai Ferber
273dd8740e Merge pull request #11368 from itaiferber/urlcomponents-codable-adoption
Adopt Codable on URLComponents
2017-08-11 12:15:37 -07:00
Michael Ilseman
7c705c3a75 [stdlib] Deprecate String/Substring.CharacterView
CharacterView is now entirely redundant in Swift 4. Deprecate its
use. This also allows us to schedule the unbreaking of
String.CharacterView leakiness without a hard source break.
2017-08-10 17:24:06 -07:00
Michael Ilseman
64e0e1859e [stdlib] Deprecate popFirst in Swift 3.2
Add a deprecation warning for use of popFirst even with -swift-version
3, as it's prone to leaks under the old model. Test cases added.
2017-08-10 15:27:05 -07:00
Michael Ilseman
3243b8a59f [stdlib] Availability checking for String.*View.popFirst
Collection's popFirst is only present when the Collection is its own
SubSequence type. String and String's views are no longer their own
SubSequenes, so popFirst is no longer present. Unfortunately, this
breaks code in swift-version 3 and it also gives a terrible diagnostic
to users. This change introduces an implementation for swift-version 3
mode and better diagnostics for Swift 4 code. Tests included.
2017-08-09 19:41:52 -07:00