Commit Graph

612 Commits

Author SHA1 Message Date
practicalswift
c2107f456c [gardening] "[ a, b ]" → "[a, b]" (#2227) 2016-04-17 21:02:18 +02:00
Chris Lattner
2acbb24e18 add some dead code back that Slava needs for his work on resilience. 2016-04-17 10:21:52 -07:00
Dmitri Gribenko
2b35fea059 Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-04-16 00:30:12 -07:00
Chris Lattner
4fd8418ba7 move the stdlib to put noescape and autoclosure on the type, instead of
the parameter.  Progress towards SE-0049.
2016-04-14 23:13:43 -07:00
Dmitri Gribenko
cfea1a3f58 Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-04-14 17:00:46 -07:00
Dmitri Gribenko
c52787e900 Merge commit '9cdbec13eee72feccfc5f8b987882a8c52e8107b' into swift-3-indexing-model 2016-04-14 16:23:53 -07:00
Dmitri Gribenko
3e708a9328 Merge commit '8e292daec1bc790c96b5ee39b8d55dadcac6ce1b' into swift-3-indexing-model 2016-04-14 15:10:26 -07:00
Dmitri Gribenko
10697f939f Merge commit '510f29abf77e202780c11d5f6c7449313c819030' into swift-3-indexing-model 2016-04-14 13:45:27 -07:00
practicalswift
dc6c2aeef6 [gardening] "Type->Type" → "Type -> Type" in Swift code 2016-04-13 23:03:55 +02:00
Dave Abrahams
1c3d998951 Revert "[gardening] "Type->Type" → "Type -> Type" in Swift code"
This reverts commit 14edeaf67a because
it's breaking tests:
https://ci.swift.org/job/oss-swift-incremental-RA-osx/lastFailedBuild/consoleFull#1361088108ee1a197b-acac-4b17-83cf-a53b95139a76
2016-04-13 10:29:57 -07:00
practicalswift
14edeaf67a [gardening] "Type->Type" → "Type -> Type" in Swift code 2016-04-13 10:51:53 +02:00
swift-ci
728d21a00d Merge pull request #1442 from SwiftAndroid/master 2016-04-12 23:30:17 -07:00
Chris Lattner
8f1dc858e8 remove dead code. 2016-04-12 21:07:28 -07:00
Zhuowei Zhang
7c502b6344 Port to Android
This adds an Android target for the stdlib. It is also the first
example of cross-compiling outside of Darwin.

Mailing list discussions:

1. https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151207/000171.html
2. https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000492.html

The Android variant of Swift may be built using the following `build-script`
invocation:

```
$ utils/build-script \
  -R \                                           # Build in ReleaseAssert mode.
  --android \                                    # Build for Android.
  --android-ndk ~/android-ndk-r10e \             # Path to an Android NDK.
  --android-ndk-version 21 \
  --android-icu-uc ~/libicu-android/armeabi-v7a/libicuuc.so \
  --android-icu-uc-include ~/libicu-android/armeabi-v7a/icu/source/common \
  --android-icu-i18n ~/libicu-android/armeabi-v7a/libicui18n.so \
  --android-icu-i18n-include ~/libicu-android/armeabi-v7a/icu/source/i18n/
```

Android builds have the following dependencies, as can be seen in
the build script invocation:

1. An Android NDK of version 21 or greater, available to download
   here: http://developer.android.com/ndk/downloads/index.html.
2. A libicu compatible with android-armv7.
2016-04-12 19:26:21 -04:00
practicalswift
c760f6dfbf [gardening] Add whitespace: "foo,bar" → "foo, bar" 2016-04-12 22:31:46 +02:00
Jordan Rose
bc83940301 Make pointer nullability explicit using Optional.
Implements SE-0055: https://github.com/apple/swift-evolution/blob/master/proposals/0055-optional-unsafe-pointers.md

- Add NULL as an extra inhabitant of Builtin.RawPointer (currently
  hardcoded to 0 rather than being target-dependent).
- Import non-object pointers as Optional/IUO when nullable/null_unspecified
  (like everything else).
- Change the type checker's *-to-pointer conversions to handle a layer of
  optional.
- Use 'AutoreleasingUnsafeMutablePointer<NSError?>?' as the type of error
  parameters exported to Objective-C.
- Drop NilLiteralConvertible conformance for all pointer types.
- Update the standard library and then all the tests.

I've decided to leave this commit only updating existing tests; any new
tests will come in the following commits. (That may mean some additional
implementation work to follow.)

The other major piece that's missing here is migration. I'm hoping we get
a lot of that with Swift 1.1's work for optional object references, but
I still need to investigate.
2016-04-11 20:06:38 -07:00
Max Moiseev
0124bd261f [stdlib][swift-3-indexing-model] un-commenting and un-spliting .lazy usages 2016-04-11 17:58:52 -07:00
Jordan Rose
b911fda8ea [StdlibUnittest] Add expectNotEqual(expected: T?, actual: T?)
Also simplify the implementation of expectEqual(T?, T?).
2016-04-11 17:55:10 -07:00
Dmitri Gribenko
d52cbab5c2 Merge commit '0ff3239b962218267d37307e53906b31315a1cfc' into swift-3-indexing-model
This commit is the parent of the commit that implemented SE-0046
Establish consistent label behavior across all parameters including
first labels
2016-04-09 16:18:33 -07:00
Dmitri Gribenko
4efc16b5f1 StdlibUnittest: strengthen constraints in check*AssociatedTypes() 2016-04-08 18:46:00 -07:00
Harlan Haskins
5d888873da [StdlibUnittest] Teach interpreter to run crash tests 2016-04-08 13:12:53 -07:00
Max Moiseev
6c56af5c1b [stdlib] splitting expressions with lazy to improve compilation time 2016-04-08 11:06:05 -07:00
Harlan
e6395343cf Update autoreleasepool definition in RaceTest
Missed in SE-0046 migration
2016-04-07 13:54:02 -07:00
practicalswift
66183cdbf7 [gardening] Fix unjustified spacing 2016-04-07 10:10:24 +02:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
Dave Abrahams
5864117b1b [stdlib] De-underscore Range.init(uncheckedBounds:) 2016-04-06 09:20:30 -07:00
Dave Abrahams
db03708a3d [stdlib] De-underscore Range protocols
There's really no excuse for keeping these hidden; they appear in public
APIs.
2016-04-05 16:32:15 -07:00
Dmitri Gribenko
0bab6fc461 StdlibUnittest: add a doc comment to LifetimeTracked, and remove a fixme 2016-04-05 15:39:30 -07:00
Slava Pestov
11cff083d8 StdlibUnittest: Add a default case to a switch over a resilient enum
I'm not completely satisfied with this fix because we get a compiler
warning when compiling without -enable-resilience. Perhaps we need
a policy change that a default case in a switch only generates a
warning if the enum is *explicitly* @_fixed_layout (or eventually,
@closed or however this attribute ends up being written).
2016-04-05 00:28:34 -07:00
Dmitri Gribenko
0a0825d18d Merge pull request #1972 from apple/StdlibUnittest-make-classes-final
StdlibUnittest: make TestSuite and other helper classes final
2016-04-04 15:10:46 -07:00
Dmitri Gribenko
6985b958fd Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-04-04 11:42:17 -07:00
practicalswift
abfecfde17 [gardening] if ([space]…[space]) → if (…), for(…) → for (…), while(…) → while (…), [[space]x, y[space]] → [x, y] 2016-04-04 16:22:11 +02:00
Dmitri Gribenko
e43e25e3b7 StdlibUnittest: add optimized overloads for expectEqualsUnordered() 2016-04-01 23:05:19 -07:00
Dmitri Gribenko
bad2ff1bb7 StdlibUnittest: add assertions for range checks 2016-04-01 14:12:17 -07:00
Dmitri Gribenko
5a12349e9c Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-04-01 14:12:13 -07:00
Dmitri Gribenko
f782cba799 StdlibUnittest: fix a compiler warning 2016-03-31 09:52:28 -07:00
Dmitri Gribenko
66808b96b9 StdlibUnittest: correct precondition() message 2016-03-31 09:28:01 -07:00
Dmitri Gribenko
27e2f7f6d9 StdlibUnittest: new feature: data-parameterized tests 2016-03-31 00:50:10 -07:00
Dmitri Gribenko
cd4b963d40 StdlibUnittest: use 'Array.append(Element)' instead of 'Array += Array' 2016-03-30 21:03:24 -07:00
Dmitri Gribenko
76083bb1f3 StdlibUnittest: make TestSuite and other helper classes final
These classes are not meant to be subclassed.
2016-03-30 20:46:21 -07:00
Max Moiseev
c93fcb98ae [stdlib][swift-3-indexing-model] fixing Concatenate tests
The 'reversed' tests are marked as XFAILing, because required methods
are not implemented on `ReversedCollection`.
2016-03-29 14:56:22 -07:00
Dave Abrahams
8e4f85277b Merge remote-tracking branch 'refs/remotes/origin/master' into merge 2016-03-29 09:19:34 -07:00
Dave Abrahams
a5c3c63c3d [stdlib] Indexing model: nix RangeOfStrideable
Instead, use CountableRange which is constrained to have a Strideable
Bound whose Stride conforms to Integer.
2016-03-28 17:06:09 -07:00
Dave Abrahams
01127b32d5 index(n, stepsFrom: i)
M-x findr-query-replace

\<advance(\([^:]+?\),\([
]+\)by: *\([^(),]*\|[^(),]+([^()]*)[^(),]*\)\(,\(?:[
]+\)limit: *\(?:[^()]*\|[^()]+([^()]*)[^()]*\)\)?)

index(\3,\2stepsFrom: \1\4)
2016-03-25 17:54:39 -07:00
Jordan Rose
cd9114423a Reapply "[StdlibUnittest] Install our own handler for uncaught ObjC exceptions."
This reapplies e6a519f and 86dcce1 by reverting e86d3bd, which reverted
more than it needed to.
2016-03-22 16:24:40 -07:00
Dmitri Gribenko
a6cd57222a Merge remote-tracking branch 'origin/master' into swift-3-indexing-model 2016-03-21 14:41:15 -07:00
Michael Ilseman
e86d3bde6c Revert "[ReconstructType] Fix decl lookup when there are multiple constructors"
This reverts commit 65c86b713d.

I attempted to resolve the merge conflict, but Jordan will need to do
a second check.
2016-03-20 20:00:37 -07:00
Dmitri Gribenko
aaa486cc7b New indexing model: fix most compilation issues in StdlibCollectionUnittest
We are still hitting what looks like a compiler bug:

error: type alias 'SubSequence' circularly references itself

which is emitted for every minimal collection type.
2016-03-18 23:20:57 -07:00
Jordan Rose
86dcce1259 [StdlibUnittest] Don't catch ObjC exceptions on non-ObjC platforms.
My apologies!
2016-03-18 14:25:07 -07:00
Dave Abrahams
6dee0c0cd3 [stdlib] indexing model: restore checkRangeReplaceable
Failures down to 19, 4 in stdlib.
2016-03-18 14:06:42 -07:00