Commit Graph

37 Commits

Author SHA1 Message Date
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
semper_idem
6aa415f8a7 [stdlib] indentation fix
[stdlib] indentation fix
2015-12-25 17:19:49 +08:00
semper_idem
c8dd8ab73f [stdlib]Replace NSMutableSet with Set
1. I think replace the NSMutableSet with Set<UIView>(and Set<NSView>)
could make the operations more Swift-like.

These code works fine in my Playground, and I also pass the test. But
I’m not quite sure it’s ok to use Set here rather than NSSet.

2. I also simplify the read-only computed property in “UIKit.swift”
2015-12-25 17:06:48 +08:00
ken0nek
2218e433b4 Add whitespaces after comma and remove redundant whitespaces.
Manage whitespaces

Remove unrelated line

Fix

Fix again
2015-12-04 15:36:34 +09:00
Jordan Rose
cf8baedee2 Re-apply "Rename @transparent to @_transparent for now."
This re-applies 90fcbfe9a6. I'll be committing
the corresponding change to Foundation momentarily.
2015-11-16 10:53:56 -08:00
Xin Tong
16843684b2 Revert "Rename @transparent to @_transparent for now."
This reverts commit 90fcbfe9a6.

Seems there are still some tests that are left not modified.
2015-11-14 07:04:31 -08:00
Jordan Rose
90fcbfe9a6 Rename @transparent to @_transparent for now.
This feature has not been fully designed, let alone properly implemented.
For more information, see docs/TransparentAttr.rst.
2015-11-13 16:25:34 -08:00
Jordan Rose
6e1bf0d10d Rename @exported to @_exported for now.
At some point I want to propose a revised model for exports, but for now
just mark that support for '@exported' is still experimental and subject
to change. (Thanks, Max.)
2015-11-05 11:59:00 -08:00
Dmitri Hrybenko
2e51d23875 Un-ifdef object literals
Swift SVN r32880
2015-10-25 07:50:53 +00:00
David Farler
9e4d52c9cb Reinstate watchOS and other SDK overlays to build against the public SDKs.
Un-revert the below commits with the following addition:
add declarations for posix_spawn related APIs to SwiftPrivateDarwinExtras.
posix_spawn-related APIs aren't available in the public SDKs, so force past
the availability by creating our own stubs in the internal DarwinExtras
library.

r31244, r31245

CMake: build all platforms except watchOS using the public SDK

Covers rdar://problem/21145996.
A step towards rdar://problem/21099318.

Switch SDK overlays to use the public SDK

I had to cut the dependency on CrashReporterClient.h and reimplement
some of that code inline in the Swift runtime.  This shoud be OK (even
though not very clean), since the layout of CrashReporter sections is
ABI.

rdar://21099318

Swift SVN r31252
2015-08-14 22:09:49 +00:00
Dmitri Hrybenko
c75fc00cec Revert "CMake: build all platforms except watchOS using the public SDK"
This reverts commit r31244.  It broke the buildbot.

Swift SVN r31247
2015-08-14 18:56:15 +00:00
Dmitri Hrybenko
dd38372fb7 CMake: build all platforms except watchOS using the public SDK
Covers rdar://problem/21145996.
A step towards rdar://problem/21099318.

Swift SVN r31244
2015-08-14 17:26:04 +00:00
Chris Willmore
e4ff8fdc05 Make image literals non-optional by routing delegation of non-failable
literal initializer to underlying failable initializer through
implicitly-failable initializer (proper solution is covered in
22276505).

<rdar://problem/20788137> Image literals should not be optional

Swift SVN r31229
2015-08-13 22:11:47 +00:00
Dmitri Hrybenko
e587ef0086 SDK overlay: adopt @warn_unused_result
Swift SVN r31051
2015-08-06 15:54:52 +00:00
Mish Awadah
10bdef0936 Revert "CMake: build all platforms except watchOS using the public SDK"
This reverts commit cd3f1ba7d1ee2397817e1a165209fdeab8a1c004.

Reverting this b/c it is breaking buildbots with the following:
CMake Error at CMakeLists.txt:522 (message):
  CrashReporterClient library is required, but it was not found

Swift SVN r31047
2015-08-06 06:12:23 +00:00
Dmitri Hrybenko
271acdfcab CMake: build all platforms except watchOS using the public SDK
Covers rdar://problem/21145996.
A step towards rdar://problem/21099318.

Swift SVN r31041
2015-08-06 04:28:05 +00:00
Jordan Rose
953424072e Guard "object literals" feature with SWIFT_ENABLE_OBJECT_LITERALS.
This is not a feature we're releasing at the moment, so provide a way
to turn it off.

rdar://problem/21935551

Swift SVN r30966
2015-08-04 00:16:52 +00:00
Jordan Rose
a42ff82c80 Handle optional return for UIGraphicsGetImageFromCurrentImageContext too.
rdar://problem/21990808

Swift SVN r30615
2015-07-25 01:39:46 +00:00
Jordan Rose
497e990c0b Handle UIGraphicsGetCurrentContext's return value becoming optional.
...in such a way that both older and newer SDKs are supported (at least for now).

rdar://problem/21819293

Swift SVN r30193
2015-07-14 20:31:44 +00:00
Ted Kremenek
56a3ddbdb4 Make UIEdgeInsets and UIOffset conform to Equatable.
Implemented at the behest of the UIKit team.

Implements <rdar://problem/18109916>.

Swift SVN r30089
2015-07-10 21:11:25 +00:00
Dmitri Hrybenko
4eb24da01b stdlib: underscore MirrorType
Part of removing the old mirrors.

rdar://21428474

Swift SVN r29833
2015-07-01 04:05:48 +00:00
Dmitri Hrybenko
8d79d9e142 stdlib: underscore MirrorDisposition
Part of removing the old mirrors.

rdar://21428474

Swift SVN r29825
2015-07-01 00:31:37 +00:00
Dmitri Hrybenko
6bc93d4d79 stdlib: finish renaming QuickLookObject to PlaygroundQuickLook
Part of removing the old mirrors.

rdar://21428474

Swift SVN r29824
2015-07-01 00:31:35 +00:00
Dmitri Hrybenko
7ee84ed6b3 stdlib: rename Reflectable.{getMirror() -> _getMirror()}
Start removing the old mirrors.

rdar://21428474

Swift SVN r29823
2015-07-01 00:31:32 +00:00
Jordan Rose
99768eb346 Revert "Switch overlays from using @exported to -import-underlying-module."
This reverts r29441 because it breaks the Linux build. I'll talk to Dmitri
about this tomorrow.

See rdar://problem/21254367

Swift SVN r29444
2015-06-17 05:02:21 +00:00
Jordan Rose
c8bfc87c4e Switch overlays from using @exported to -import-underlying-module.
Some day we'll close the hole for @exported in the previous commit.

Swift SVN r29441
2015-06-17 04:48:06 +00:00
Dmitri Hrybenko
98cc02dd4f UIKit overlay: fix a warning
Swift SVN r29163
2015-05-30 03:20:51 +00:00
Dave Abrahams
1175d3602c [stdlib] Underscore the legacy Reflectable protocol
We don't want anyone using this and hope to remove it before GM, so
let's at least make its imminent death more obvious.

Swift SVN r29075
2015-05-27 20:59:24 +00:00
Dmitri Hrybenko
63c1b4d9e8 UIKit overlay: on watchOS, don't use unavailable types
Imitates the important effects of rdar://20989733

Swift SVN r29022
2015-05-26 04:24:18 +00:00
Dmitri Hrybenko
4f13143919 Update SDK overlay for nullability annotations in the new SDK
Swift SVN r28739
2015-05-19 01:55:31 +00:00
Ted Kremenek
64ec51ab85 Convert a few 'var' to 'let' in the SDK overlay.
Swift SVN r28448
2015-05-12 00:24:36 +00:00
Enrico Granata
2151cf84c5 UIViewMirror should factor in device scale factor
Fixes rdar://20444163



Swift SVN r27997
2015-04-30 21:57:53 +00:00
Chris Lattner
31c01eab73 Change the meaning of "if let x = foo()" back to Xcode 6.4 semantics. The compiler
includes a number of QoI things to help people write the correct code.  I will commit
the testcase for it as the next patch.

The bulk of this patch is moving the stdlib, testsuite and validation testsuite to
the new syntax.  I moved a few uses of "as" patterns back to as? expressions in the 
stdlib as well.



Swift SVN r27959
2015-04-30 04:38:13 +00:00
Chris Willmore
d4db635e3d Add object literal syntax and _{Color,Image}LiteralConvertible protocols
Add syntax "[#Color(...)#]" for object literals, to be used by
Playgrounds for inline color wells etc. The arguments are forwarded to
the relevant constructor (although we will probably change this soon,
since (colorLiteralRed:... blue:... green:... alpha) is kind of
verbose). Add _ColorLiteralConvertible and _ImageLiteralConvertible
protocols, and link them to the new expressions in the type checker.
CSApply replaces the object literal expressions with a call to the
appropriate protocol witness.

Swift SVN r27479
2015-04-20 12:55:56 +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
Enrico Granata
b9f0a6d22b This is the equivalent of r24737 for iOS
"Only remove the view from the set of views that are being Mirror-drawn when you're actually done reflecting on it  The previous code would always remove the view on exit, even if it had not previously added it (default: case of the switch)  In simple cases, this didn't really matter, but if you caused the logger to be reinvoked on self in a loop, then you would end up removing the view before you were done looping over it, and eventually run out of stack space"

In this case, it fixes rdar://20193122



Swift SVN r26235
2015-03-17 21:15:48 +00:00
Dmitri Hrybenko
350248dae5 Reorganize the directory structure under 'stdlib'
The standard library has grown significantly, and we need a new
directory structure that clearly reflects the role of the APIs, and
allows future growth.

See stdlib/{public,internal,private}/README.txt for more information.

Swift SVN r25876
2015-03-09 05:26:05 +00:00