Commit Graph

8 Commits

Author SHA1 Message Date
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
Jordan Rose
498ab24341 [ClangImporter] Allow performSelector... methods, but make the result Unmanaged.
Per discussion, there are certain times where our APIs really want you to use
the performSelector family of methods (e.g. when the framework hands you a selector
and expects you to call it upon completion).

Although the methods still aren't type-safe, we are at least making the result
Unmanaged so that you're forced to think about whether it's +1 or +0 before you
use it, and so that the compiler doesn't accidentally try to retain a non-object
pointer.

This commit also removes the blocks on the makeObjectsPerformSelector... methods,
but Foundation plans to add NS_SWIFT_UNAVAILABLE there (see rdar://problem/21150180).

rdar://problem/21150277

Swift SVN r30044
2015-07-09 22:54:41 +00:00
Joe Groff
751724c3fa SILGen: Special-case NSError to ErrorType erasure.
We want this to be a "toll-free" adoption of the class reference without requiring a second box allocation.

Swift SVN r26711
2015-03-30 04:52:41 +00:00
Joe Groff
ce73f72e2e Sema: Look through metatype conversions to find SuperRefExprs.
A "super" expression may refer not only to a super instance object, but a super metatype object as well. Fixes rdar://problem/17599865.

Swift SVN r21559
2014-08-29 01:15:16 +00:00
Jordan Rose
ca6d58a4b4 [test] Mark NSObject's 'description' property as readonly for SILGen/IRGen.
A change I missed in r20291. Doesn't affect anything now, but better to be
correct.

Swift SVN r20321
2014-07-22 17:16:38 +00:00
Jordan Rose
ce1e02c6c0 [ClangImporter] Remove hack for non-property 'description' and 'hash'.
...and 'debugDescription'. All SDKs now have the updated NSObject.h.

<rdar://problem/17719783>

Swift SVN r20291
2014-07-22 02:38:58 +00:00
Jordan Rose
8ef90ddf92 [test] Use __typeof__(__objc_yes) to get the right per-platform type for BOOL.
With this trick in place, re-enable test/IRGen/abitypes.swift.

<rdar://problem/16936814>

Swift SVN r18380
2014-05-19 01:14:29 +00:00
Doug Gregor
e53e815651 Add missing ObjectiveC in SILGen's bridging SDK
Swift SVN r17841
2014-05-10 20:24:58 +00:00