Commit Graph

38 Commits

Author SHA1 Message Date
Dmitri Gribenko
efaa39ea79 stdlib: add first argument labels and some other changes to conform to API guidelines 2016-02-15 23:47:54 -08:00
Max Moiseev
3a3984877a Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-15 15:43:34 -08:00
Chris Lattner
5bad3ba49a Warn about implicit tuple splat in a parameter list. 2016-02-09 14:01:50 -08:00
practicalswift
ca9e488f30 [gardening] Add "-*- swift -*-" to *.swift.gyb. Remove from *.swift. 2016-01-23 10:27:03 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Joe Groff
4b268bd044 Restore parts of BridgeStorage.swift.gyb that exercise stdlib functionality.
It wasn't quite dead yet. It still exercises the _BridgeStorage type in the standard library.
2015-12-23 09:40:29 -08:00
Joe Groff
1334576686 Remove obsolete BridgeStorage.swift.gyb test.
The functionality this is testing looks like it's been subsumed by the Builtin.BridgeObject type. This is the only thing keeping alive the otherwise dead _swift_usesNativeSwiftReferenceCounting_nonNull runtime stub.
2015-12-23 09:17:08 -08:00
Dmitri Hrybenko
f5de8757e4 stdlib: remove Word and UWord
These types are leftovers from the early pre-1.0 times when Int and UInt
were always 64-bit on all platforms.  They serve no useful purpose
today.  Int and UInt are defined to be word-sized and should be used
instead.

rdar://18693488

Swift SVN r30564
2015-07-24 05:01:32 +00:00
Greg Parker
d833ef8ab8 [test] Fix some watchOS test failures.
Swift SVN r29229
2015-06-02 09:14:18 +00:00
Arnold Schwaighofer
f7771859d8 Rename the optimize_test feature to executable_test and document that feature.
Swift SVN r29213
2015-06-01 23:44:13 +00:00
Arnold Schwaighofer
3643c614a3 Run tests in optimize test modes
This runs all files that have a target-build-swift or target-run-stdlib-swift
RUN line in optimize test mode.

Swift SVN r29206
2015-06-01 21:23:31 +00:00
Andrew Trick
0940d2a175 Test case comment cleanup.
Swift SVN r28395
2015-05-10 17:17:45 +00:00
Dmitri Hrybenko
f46f16ae82 stdlib: implement new print() API
rdar://20775683

Swift SVN r28309
2015-05-08 01:37:59 +00:00
Andrew Trick
75892559cf Update test cases for Builtin.isUnique.
Swift SVN r28269
2015-05-07 16:39:26 +00:00
Devin Coughlin
37088d4fb9 Parse: Update parsing of #available(...) to no longer user >= version comparison
Change the syntax of availability queries from #available(iOS >= 8.0, OSX >= 10.10, *) to

This change reflects the fact that now that we spell the query '#available()' rather than
'#os()', the specification is about availability of the APIs introduced in a particular OS
release rather than an explicit range of OS versions on which the developer expects the
code to run.

There is a Fix-It to remove '>=' to ease adopting the new syntax.

Swift SVN r28025
2015-05-01 05:34:10 +00:00
Dmitri Hrybenko
21b8a93eb9 tests: don't use println() in the BridgeStorage test, it is not FileCheck-based
Swift SVN r28006
2015-04-30 23:22:34 +00:00
Andrew Trick
8346eba525 Revert "Update test cases for Builtin.isUnique."
This reverts commit f835a115e283dd03001f397ae1538b3745ad779a.

ExistentialCollection tests failed in the release+asserts build.

Swift SVN r27939
2015-04-29 22:53:55 +00:00
Andrew Trick
041bf1c61d Update test cases for Builtin.isUnique.
Swift SVN r27931
2015-04-29 21:59:21 +00:00
Doug Gregor
793b3326af Implement the new rules for argument label defaults.
The rule changes are as follows:
  * All functions (introduced with the 'func' keyword) have argument
  labels for arguments beyond the first, by default. Methods are no
  longer special in this regard.
  * The presence of a default argument no longer implies an argument
  label.

The actual changes to the parser and printer are fairly simple; the
rest of the noise is updating the standard library, overlays, tests,
etc.

With the standard library, this change is intended to be API neutral:
I've added/removed #'s and _'s as appropriate to keep the user
interface the same. If we want to separately consider using argument
labels for more free functions now that the defaults in the language
have shifted, we can tackle that separately.

Fixes rdar://problem/17218256.

Swift SVN r27704
2015-04-24 19:03:30 +00:00
Chris Willmore
98d17e318d Add support for AppleTV simulator tests.
You can run tests with e.g. 'ninja check-swift-appletvsimulator-x86_64'.

Swift SVN r27297
2015-04-14 23:53:03 +00:00
Devin Coughlin
d08b98b1ca Sema: Turn on availability checking by default
Enable checking for uses of potentially unavailable APIs. There is
a frontend option to disable it: -disable-availability-checking.

This commit updates the SDK overlays with @availability() annotations for the
declarations where the overlay refers to potentially unavailable APIs. It also changes
several tests that refer to potentially unavailable APIs to use either #available()
or @availability annotations.

Swift SVN r27272
2015-04-14 06:44:01 +00:00
Dmitri Hrybenko
ff2dd6320a stdlib: fix coding style
When colon specifies is-a relationship between types, we put spaces on
both sides of the colon.

Swift SVN r27016
2015-04-05 05:54:55 +00:00
Greg Parker
a190d015f8 [test] Fix two tests that didn't expect tagged pointer strings on iOS.
NewString.swift had an integer sign problem with MSB tagged pointers.
BridgeStorage.swift assumed iOS didn't supported tagged pointer strings yet.
rdar://20405604


Swift SVN r26922
2015-04-03 01:40:52 +00:00
Doug Gregor
6bd99d6660 Disable tests failing on the x86-64 simulator.
Tracked by rdar://problem/20405604.

Swift SVN r26896
2015-04-02 20:52:28 +00:00
Erik Eckstein
663f08557a stdlib: Use a dedicated pointer spare bit to distinguish between native and ObjC object in BrigeStorage.
This simplifies the code for is-native checking. Now it can be done by a single and-mask operation.



Swift SVN r26591
2015-03-26 14:35:10 +00:00
Graham Batty
83b4384fac Update test flags for linux failures and support.
Also removed the sdk 'feature' in favour of the more specific
objc_interop.

Swift SVN r24856
2015-01-30 21:31:48 +00:00
Dmitri Hrybenko
1eea220932 Use one module cache directory for all the lit tests to speed them up
Doing so is safe even though we have mock SDK.  The include paths for
modules with the same name in the real and mock SDKs are different, and
the module files will be distinct (because they will have a different
hash).

This reduces test runtime on OS X by 30% and brings it under a minute on
a 16-core machine.

This also uncovered some problems with some tests -- even when run for
iOS configurations, some tests would still run with macosx triple.  I
fixed the tests where I noticed this issue.

rdar://problem/19125022

Swift SVN r23683
2014-12-04 11:21:48 +00:00
Graham Batty
83f27a8af7 Revert "Mark tests that don't pass on linux as XFAIL."
This reverts commit 2711ca86de7bf6a7885ccea24219a48a590b1e95.

Swift SVN r23577
2014-11-24 17:42:13 +00:00
Graham Batty
198402dcfe Mark tests that don't pass on linux as XFAIL.
Swift SVN r23573
2014-11-24 17:40:37 +00:00
Joe Groff
805191954d Update tests for isUniquelyReferenced change.
Swift SVN r23552
2014-11-22 16:59:27 +00:00
Dave Abrahams
15e195943e [stdlib] BridgeStorage: uniqueness check fast path
When we know we've got a native object and no spare bits set, we can use
a faster check for uniqueness.

Swift SVN r23506
2014-11-21 01:39:55 +00:00
Dave Abrahams
bf233c5b46 [stdlib] BridgeStorage: rename a property
This name is more consistent with the convention used throughout the
runtime: use underscores to separate the preconditions of partial
functions from the rest of their names.

Swift SVN r23505
2014-11-21 01:39:55 +00:00
Dave Abrahams
1ed31fa31a [stdlib] Fix BridgeStorage!
Fix the test so it actually runs, then fix all the bugs it finds, then
extend the test to cover the no-bits-fast-path functionality.

Swift SVN r23466
2014-11-20 03:41:10 +00:00
Dave Abrahams
4785e7b2e9 [stdlib] Explicit keywords for BridgeStorage.init
This improves clarity of usage, especially when we add a fast
constructor for the "native with no spare bits set" case.

Swift SVN r23460
2014-11-20 01:05:39 +00:00
Dave Abrahams
726aba123a [stdlib] BridgeStorage optimizations
Stop trafficking in optionals and using checked arithmetic; the
optimizer doesn't like that.  Also drop a needless cast, fix up some
names, and accept a native 2nd argument.  Only classes imported from
ObjC actually have non-native refcounting, and we don't really care
about enforcing that for the 2nd argument.  It's just expected to be a
possibly-non-native class.

Swift SVN r23396
2014-11-18 02:46:09 +00:00
Dave Abrahams
f062045e05 [stdlib] Commit a missed part of r23362
Swift SVN r23363
2014-11-17 02:19:41 +00:00
Dave Abrahams
d7689759f9 [stdlib] BridgeStorage: rename uniqueness check
The name should reflect the fact that the check only ever returns true
in the native case.

Swift SVN r23362
2014-11-17 02:15:27 +00:00
Dave Abrahams
8a27fb8178 [stdlib] Integrate BridgeStorage into the stdlib
We're going to use it for Array internals.  When we do, it should be
expected to cause a performance hit on arrays of value types until
rdar://18125016 is handled.

Swift SVN r22784
2014-10-15 23:32:44 +00:00