Commit Graph

221 Commits

Author SHA1 Message Date
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
Jordan Rose
cb2c6a6d08 Demangle 'So' as '__ObjC' rather than 'ObjectiveC'.
And similarly 'SC' as '__C' rather than 'C'.

There's a real module named 'ObjectiveC', and imported decls are not
all in it.

Swift SVN r31225
2015-08-13 21:22:02 +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
Joe Groff
8ec59e5c11 Runtime: Implementation for generic typed boxes.
Provide new swift_{alloc,dealloc,project}Box2 entry points that allocate, project, and deallocate typed boxes using runtime-instantiated metadata. Give these a new metadata kind, so that external tools recognize the difference and can interpret the metadata appropriately.

Swift SVN r29714
2015-06-26 00:06:17 +00:00
Joe Groff
2bf783dfe8 Runtime: Generate a mangled name as the ObjC runtime name of generic class instances.
Our hack to generate a unique name by appending the class pointer doesn't produce a stable class name that can persist in NSKeyedArchiver, or eventually be used as a key for dynamic runtime instantiation. Generate a proper mangled name for the class instance by building a demangling AST from the metadata nodes and feeding it into the remangler. Should fix rdar://problem/18884563, though I need to try using an archiver with a generic class to verify.

Swift SVN r29316
2015-06-05 14:27:58 +00:00
Joe Groff
0c8667f215 whitespace
Swift SVN r28396
2015-05-10 17:25:57 +00:00
Andrew Trick
23b1186467 Removed _swift_isUniquelyReferenced shims. Don't call these from swift.
Swift SVN r28270
2015-05-07 16:39:28 +00:00
Joe Groff
d51acde8c4 Runtime: Add back +[SwiftObject initialize].
It's sent unconditionally by the ObjC runtime, so needs to exist.

Swift SVN r28218
2015-05-06 22:00:55 +00:00
Joe Groff
8b814d377e Runtime: SwiftObject doesn't need +load or +initialize.
The Swift compiler now makes sure to realize classes before any use that requires realization, so this is no longer necessary.

Swift SVN r28214
2015-05-06 19:45:54 +00:00
Joe Groff
9b4dc24721 Runtime: (Almost) cleanse of global constructors and destructors.
Configure the runtime to build with -Wglobal-constructors, and Lazy-fy almost everything that gets flagged. (I gave "swift_isaMask" a pass since that's almost definitely hot enough to warrant a static initialization.) Make some improvements to the Lazy wrapper, using aligned_storage to ensure that it's trivially constructed and destructed.

Swift SVN r28199
2015-05-06 04:59:56 +00:00
Joe Groff
00f7520888 IRGen/Runtime: Combine the separate per-convention function metadata caches into one.
We have enough flag bits on function types now to warrant stashing an extra word in the metadata key alongside the arguments and results, so add one, and pack the number of arguments, function convention, and 'throws' bit in there. This lets us merge the separate metadata caches for thick/thin/block/C functions into one, saving a bit of runtime memory, and simplifying a bunch of repetitive code in the runtime and IRGen.

This also fixes a subtle bug we had where the runtime getFunctionTypeMetadata function expected the result argument to be passed in the arguments array, but IRGen was passing it as a separate argument, which would have caused function type metadata to fail to be uniqued by result type.

Swift SVN r27651
2015-04-23 22:58:11 +00:00
Joe Groff
c4ec47ddea IRGen/Runtime: Metadata for @convention(c) function types.
For now, C&P a new metadata cache for C function pointers, like we do for blocks and thin types.

Swift SVN r27595
2015-04-22 18:06:23 +00:00
Joe Groff
fcf535d682 Runtime: Implement ObjC-free metatype dynamic casts.
Swift SVN r27414
2015-04-17 05:30:35 +00:00
Joe Groff
225a0ebd70 Runtime: Non-ObjC-interoperable version of ErrorObject implementation.
This gets the runtime building again with ObjC interop disabled, though the standard library still has issues.

Swift SVN r27326
2015-04-15 20:27:24 +00:00
Greg Parker
5e8f6116e4 Fix +[SwiftObject description] and +[SwiftObject debugDescription].
rdar://20380089


Swift SVN r26810
2015-04-01 11:04:46 +00:00
Greg Parker
1d7a09d8b4 Implement +[SwiftObject instancesRespondToSelector:].
rdar://20307260


Swift SVN r26808
2015-04-01 09:48:42 +00:00
Greg Parker
3b4ba55cd9 Always return a valid zone from [SwiftObject zone].
Swift SVN r26807
2015-04-01 09:13:10 +00:00
Erik Eckstein
663f08557a stdlib: Use a dedicated pointer spare bit to distinguish between native and ObjC object in BrigeStorage.
This simplifies the code for is-native checking. Now it can be done by a single and-mask operation.



Swift SVN r26591
2015-03-26 14:35:10 +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