Commit Graph

54 Commits

Author SHA1 Message Date
Dmitri Gribenko
00c5d6368e Port iOS and watchOS SDK overlays to the latest Clang importer rules 2016-03-09 18:58:13 -08:00
Mishal Awadah
ad2a309ee2 Revert "Revert "[stdlib] Fix API renaming build failures""
This reverts commit 7e7da9eda5.

The original commit has been reviewed.
2016-02-23 10:37:14 -08:00
mawadah
7e7da9eda5 Revert "[stdlib] Fix API renaming build failures"
Instead, using a PR to merge.

This reverts commit 9bf2a86cf8.
2016-02-23 08:24:47 -08:00
mawadah
9bf2a86cf8 [stdlib] Fix API renaming build failures 2016-02-23 08:23:06 -08:00
Max Moiseev
61c837209b Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-04 16:13:39 -08:00
Austin Zheng
77918a86ac [SR-88] Reinstate Mirror migration changes, fix test issues
This reverts commit 182bb7f812.
2016-01-27 20:40:52 -08:00
Andrew Trick
182bb7f812 Revert "Merge pull request #1058 from austinzheng/az-port-mirror"
This pull request broke the following tests on several build configurations
(eg --preset=buildbot,tools=RA,stdlib=DA)

    1_stdlib/Reflection.swift
    1_stdlib/ReflectionHashing.swift
    1_stdlib/UnsafePointer.swift.gyb

This reverts commit c223a3bf06, reversing
changes made to 5c2bb09b09.
2016-01-27 10:43:08 -08:00
Austin Zheng
10d5b23c30 [SR-88] Reinstate mirror migration commit
Changes:
- Reverted commit reverting original SR-88 commit
- Removed mirror children helper collections and related code
- Rewrote some tests to keep them working properly
- Wrote two more tests for the three pointer APIs to ensure no crashes if created using a value > Int64.max

This reverts commit 8917eb0e5a.
2016-01-26 19:28:32 -08:00
Mark Lacey
8917eb0e5a Revert "[Runtime][StdLib] Migrate mirrors to use CustomReflectable API, rewrite dump()"
This reverts commit 9798dfd4aa because it
broke the stdlib build.
2016-01-22 08:41:07 -08:00
Austin Zheng
9798dfd4aa [Runtime][StdLib] Migrate mirrors to use CustomReflectable API, rewrite dump()
Jira: SR-88
Changes:
- Removed stdlib type conformances to _Reflectable
- Conformed stdlib types to CustomReflectable, CustomPlaygroundQuickLookable
- Rewrote dump() function to not use _reflect()
- CGRect, CGPoint, CGSize now conform to CustomDebugStringConvertible
- Rewrote unit tests for compatibility with new API
2016-01-21 09:44:15 -08:00
Max Moiseev
f51e708a8f Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-04 12:25:25 -08:00
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
Doug Gregor
2091e7f852 Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-omit-needless-words 2015-12-18 10:54:46 -08:00
Dmitri Gribenko
73ce9ae7e9 Collection.count => .length
And other API changes that naturally fall out from this, like
Array(repeating:count:) => Array(repeating:length:).
2015-12-17 15:55:29 -08:00
Doug Gregor
f245f18a09 Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-omit-needless-words 2015-12-17 11:35:58 -08:00
Maxim Moiseev
e6468a0eca _precondition => _require 2015-12-16 17:19:01 -08:00
Maxim Moiseev
0e54467bfa Final bulk removal of Type suffix 2015-12-16 17:06:19 -08:00
Doug Gregor
06c5e9cd5b Enable "omit needless words" by default.
Most of this is in updating the standard library, SDK overlays, and
piles of test cases to use the new names. No surprises here, although
this shows us some potential heuristic tweaks.

There is one substantive compiler change that needs to be factored out
involving synthesizing calls to copyWithZone()/copy(zone:). Aside from
that, there are four failing tests:

    Swift :: ClangModules/objc_parse.swift
    Swift :: Interpreter/SDK/Foundation_test.swift
    Swift :: Interpreter/SDK/archiving_generic_swift_class.swift
    Swift :: Interpreter/SDK/objc_currying.swift

due to two independent remaining compiler bugs:
  * We're not getting partial ordering between NSCoder's
  encode(AnyObject, forKey: String) and NSKeyedArchiver's version of
  that method, and
  * Dynamic lookup (into AnyObject) doesn't know how to find the new
  names. We need the Swift name lookup tables enabled to address this.
2015-12-11 14:46:50 -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