Commit Graph

20 Commits

Author SHA1 Message Date
John McCall
1071ac6d05 Update standard library and test suite for importing
ObjC pointer types as UncheckedOptional.

Some of these changes are totally necessary; others may
simply reflect language/implementation work that hasn't
been done yet.

If anything seems particularly objectionable, bugs welcome.

Swift SVN r15783
2014-04-02 09:37:14 +00:00
Jordan Rose
934eacea61 BlockShims: fix shims with repeated use of BOOL.
Our shim symbols weren't using substitutions, but the real manglings do.

<rdar://problem/16368602>

Swift SVN r15252
2014-03-20 00:07:52 +00:00
John McCall
40be8390c3 Factor BlockShims.mm to make it easier to change the
mangling of imported ObjC pointer types.

Swift SVN r15130
2014-03-17 07:02:00 +00:00
Jordan Rose
5509605e1d Add a void(^)(NSError*, NSString*) block shim.
Requested by Beto in <rdar://problem/16306097>.

Swift SVN r14986
2014-03-13 00:41:55 +00:00
Chris Lattner
d758e0dfe3 Eliminate more "DynamicLookup" in favor of "AnyObject", this is the
bulk of finishing rdar://13327098.


Swift SVN r14653
2014-03-04 22:15:46 +00:00
Jordan Rose
38d176db82 Add a block shim for 'void(^)(NSObject*)'.
Used by XPC.

<rdar://problem/16202338>

Swift SVN r14614
2014-03-03 22:16:08 +00:00
Dave Zarzycki
a85b2a3d78 Runtime: Rename Alloc.* to HeapObject.* (NFC)
Swift SVN r14228
2014-02-21 20:12:07 +00:00
Joe Groff
99ad50b762 SIL: Lower @objc_blocks with the correct calling and ownership conventions.
Force @objc_blocks to use the @cc(cdecl) calling convention, so that calling them undergoes bridging conversions in SILGen, and give them the correct ownership conventions so that the callee, arguments, and result are passed +0. This unfortunately ruins our ability to verify bridge_to_block instructions at all, but bridge_to_block is a hack anyway, and this is a necessary prerequisite to actually being able to call blocks in IRGen.

Swift SVN r13923
2014-02-14 22:08:09 +00:00
Greg Parker
95c2fc43f8 Clena up some 32/64 mismatches. Remove some dead posix stubs.
Swift SVN r13144
2014-01-30 09:34:26 +00:00
Joe Groff
abdb2a7640 Add block shim for void(^)(BOOL).
Fixes <rdar://problem/15931537>.

Swift SVN r13119
2014-01-29 21:50:51 +00:00
Jordan Rose
02e2018197 Fix many extra trailing underscores in block shim symbols.
...which would of course prevent them from being used. Sadly, this includes
the one I just added, since I didn't actually test it against the original
project until now.

Add a regression test that all block shims have valid manglings without
any unmangled suffixes.

Swift SVN r12672
2014-01-21 23:45:06 +00:00
Jordan Rose
e71e3bb887 Fix typo in block shim comment.
Swift SVN r12671
2014-01-21 23:45:04 +00:00
Jordan Rose
b48309716f [runtime] Add a block shim for (NSAnimationContext) -> Void
...which is used for the first argument to
+[NSAnimationContext runAnimationGroup:completionHandler:].

Also, use the existing shims for NSFileCoordinator's NSURL-taking blocks;
they are equivalent to the shims that take id.

We really need to figure out how to do this (a) more generically (i.e. all
id-compatible types are treated the same), and (b) on the fly for the more
esoteric block types.

<rdar://problem/15864611>

Swift SVN r12668
2014-01-21 23:13:29 +00:00
Dave Abrahams
8eb7129b9c [stdlib] Replace String with NewString
This change is as minimal as possible, which means leaving obsolete
functionality in place (e.g. StringByteData) and even keeping the
"NewString" name in many places.  The obsolete functionality was useful
for testing my changes, but expect immediate cleanup commits
addressing all those issues to follow.

* All String bridging now happens in pure Swift code.

* Because String no longer owns an array of UInt8, some assumptions and
  assertions are no longer valid.  As a result, some code was deleted
  and all the code that produces null-terminated strings had to be
  rewritten

* test/Constraints/construction.swift had to have one test commented out
  because it relied on an element of the String interface that I did not
  port forward.  It seems to me that this test should declare its own
  types and not rely on the stdlib, if it's still valid.

* One test in /test/stdlib/Algorithm.swift had to be disabled pending
  <rdar://problem/15736729> and <rdar://problem/15733855>

* This change revealed that test/Interpreter/repl.swift is sensitive to
  type-alias names; I had to change a "NewString" to "String" there.
  This may indicate a bug somewhere?

Swift SVN r11830
2014-01-02 20:16:59 +00:00
Dave Abrahams
eea35fd745 BlockShims: correct a mangled name
Where did the triple underscore come from?  Are the other ones wrong,
too?  We should at least have a trivial test for each of these.

Swift SVN r11255
2013-12-13 16:18:43 +00:00
Dave Abrahams
5c24f790c8 [stdlib] NSStringAPI: create missing block shim
Now we can actually link the implementation of
enumerateLinguisticTagsInRange

Swift SVN r11221
2013-12-12 23:47:07 +00:00
John McCall
b1bbbac19b Correct the mangling of SIL results to include the
ownership convention.

Swift SVN r10598
2013-11-20 18:05:05 +00:00
Doug Gregor
ba6362af8f Update VOID mangling for block shims.
Unbreaks the "Name That Tune" build.


Swift SVN r10593
2013-11-20 16:35:50 +00:00
John McCall
20e58dcf93 Change the type of function values in SIL to SILFunctionType.
Perform major abstraction remappings in SILGen.  Introduce
thunking functions as necessary to map between abstraction
patterns.

Swift SVN r10562
2013-11-19 22:55:09 +00:00
Greg Parker
bca82ea688 Add block<->closure shims for most of Foundation's block object API.
Swift SVN r8942
2013-10-05 04:54:26 +00:00