mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
36 lines
850 B
Objective-C
36 lines
850 B
Objective-C
typedef __typeof__(__objc_yes) BOOL;
|
|
typedef long NSInteger;
|
|
|
|
@class NSString;
|
|
|
|
typedef struct _NSZone NSZone;
|
|
|
|
@protocol NSCopying
|
|
- (id) copyWithZone: (nullable NSZone*)zone;
|
|
@end
|
|
|
|
SEL sel_registerName(const char *);
|
|
|
|
@interface NSObject
|
|
+ (NSObject*) alloc;
|
|
- (NSObject*) init;
|
|
+ (NSObject*) new;
|
|
+ (void) load;
|
|
+ (void) initialize;
|
|
|
|
- (id)performSelector:(SEL)selector withObject:(id)object;
|
|
|
|
@property (readonly, copy) NSString *description;
|
|
|
|
@property NSString *stringProperty;
|
|
|
|
@property Class classProp;
|
|
@end
|
|
|
|
#define NS_RETURNS_INNER_POINTER __attribute__((objc_returns_inner_pointer))
|
|
#define NS_RETURNS_RETAINED __attribute__((ns_returns_retained))
|
|
#define NS_CONSUMES_SELF __attribute__((ns_consumes_self))
|
|
#define NS_CONSUMED __attribute__((ns_consumed))
|
|
#define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
|
|
|