Commit Graph

27 Commits

Author SHA1 Message Date
Dmitri Hrybenko
c109ec9125 stdlib: protocol extensions: de-underscore count()
Swift SVN r28246
2015-05-07 00:30:38 +00:00
Dmitri Hrybenko
f76ca6243e stdlib: protocol extensions: de-underscore indexOf()
Swift SVN r28244
2015-05-07 00:30:33 +00:00
Dmitri Hrybenko
d790954154 stdlib: protocol extensions: de-underscore first
Swift SVN r28242
2015-05-07 00:30:30 +00:00
Dmitri Hrybenko
035d72d5a7 stdlib: protocol extensions: de-underscore contains()
Swift SVN r28236
2015-05-07 00:30:24 +00:00
Dave Abrahams
f80c5bfced [stdlib] Test new mirrors more portably
NSTask isn't available on iOS except in our internal SDKs

Swift SVN r28162
2015-05-05 08:04:28 +00:00
Dave Abrahams
a1f3ae38e8 [stdlib] Properly reflect Objective-C superclasses
We still can't do very much of use with ivars, but this works.

Swift SVN r28158
2015-05-05 06:11:25 +00:00
Dave Abrahams
f1177566d3 [stdlib] Fixes a bug in mirrors for ObjC superclasses
We had failed to recognize that legacy ObjC class mirrors have a
distinct type.  Fixes <rdar://20811737>

However, there's a bug in legacy mirrors that prevents all base classes
from being properly reflected: <rdar://20813711>

Swift SVN r28156
2015-05-05 05:40:22 +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
Dave Abrahams
d576eb9e63 [stdlib] Merge experimental inheritance support for mirrors
Swift SVN r27934
2015-04-29 22:21:46 +00:00
Ted Kremenek
ea498e9fef Revert "[stdlib] Merge experimental inheritance support for mirrors"
This is breaking the Jenkins build.

Swift SVN r27919
2015-04-29 20:27:36 +00:00
Dave Abrahams
9407cc5ab8 [stdlib] Merge experimental inheritance support for mirrors
Swift SVN r27918
2015-04-29 20:13:49 +00:00
Dmitri Hrybenko
a03680e7fd stdlib: print struct members, in addition to the type name
Swift SVN r27250
2015-04-13 07:22:36 +00:00
Dave Abrahams
ac3f047496 [stdlib] Renaming fallout from Mirror API review
toString(x)      => String(x)
toDebugString(x) => String(reflecting: x)
Printable        => CustomStringConvertible
DebugPrintable   => CustomDebugStringConvertible

Also updated comments to clarify these protocols

Swift SVN r27090
2015-04-07 20:32:26 +00:00
Dave Abrahams
367b2e40f0 [stdlib] Mirror -> public/core
The new mirror design passed our API review and blocking bugs have been
fixed/worked-around, so integrating it into the core standard library.

Swift SVN r27082
2015-04-07 15:33:49 +00:00
Dave Abrahams
44bd9c0c46 [stdlib] Mirror: Tweaks in response to API review
* Use "reflecting:" rather than "reflect:" as an argument label.  It
  reads more sensibly.

* Unify toString()/toDebugString() with other reflection APIs by converting
  them into String initalizers, and by renaming Printable/DebugPrintable to
  CustomStringConvertible and CustomDebugStringConvertible.

* Drop "make" prefix from "makeCustomMirror" and
  "makeCustomPlaygroundQuickLook".  It is not, as we had thought,
  mandated by Cocoa naming guidelines.

Swift SVN r26918
2015-04-02 23:52:11 +00:00
Dave Abrahams
7b065529a9 [stdlib] Default mirror should hide ObjC ivars
Some Foundation classes lie about their ivars, which would crash a
mirror; make sure we are not automatically exposing ivars of Objective-C
classes from the default mirror implementation.

Addresses <rdar://problem/20320302>

Swift SVN r26834
2015-04-01 22:53:35 +00:00
Dave Abrahams
1f1cf13dc6 [stdlib] Mirror review update
Alex Migicovsky pointed out that initialization with a DictionaryLiteral
should really allow heterogeneous element types!

Swift SVN r26621
2015-03-27 02:35:51 +00:00
Dave Abrahams
3057d17d8d [stdlib] Mirror test: back to a simple RUN: line
We didn't need all that complexity after all.

Swift SVN r26523
2015-03-25 05:22:31 +00:00
Dave Abrahams
3ca8e20fda [stdlib] Mirrors: more renaming for uniformity
Swift SVN r26522
2015-03-25 04:57:17 +00:00
Dave Abrahams
34af1fbccf [stdlib] Mirrors: Implement the QuickLook stuff
Swift SVN r26521
2015-03-25 04:57:16 +00:00
Dave Abrahams
0f7c52fc00 [stdlib] reflect(x) => Mirror(reflect: x)
Swift SVN r26520
2015-03-25 04:57:15 +00:00
Dave Abrahams
f8c26ecbc3 [stdlib] Mirrors: rename Schema to DisplayStyle #2
oops!

Swift SVN r26514
2015-03-25 02:02:22 +00:00
Graham Batty
82242f67cf Update flags for linux compat.
Swift SVN r26504
2015-03-24 23:16:57 +00:00
Dave Abrahams
be2d906777 [stdlib] Mirror: some commenting, one name change.
Swift SVN r26394
2015-03-21 16:46:58 +00:00
Dave Abrahams
1a6d120061 [stdlib] New Mirrors: much API cleanup
Among other things, made the constructors much more explicit to avoid
potential ambiguities between labeled and unlabeled cases.

Swift SVN r26385
2015-03-21 02:35:53 +00:00
Dave Abrahams
6af025bcaa [stdlib] NewMirrors: bring back our Schema enum
Swift SVN r26365
2015-03-20 22:34:46 +00:00
Dave Abrahams
50c6e936d4 [stdlib] NewMirrors => SwiftExperimental
Swift SVN r26359
2015-03-20 18:17:55 +00:00