Commit Graph

12 Commits

Author SHA1 Message Date
Michael Ilseman
948655e850 [String] Cleanups, comments, documentation
After rebasing on master and incorporating more 32-bit support,
perform a bunch of cleanup, documentation updates, comments, move code
back to String declaration, etc.
2018-11-04 10:42:42 -08:00
Azoy
b8fc8b333c Remove _interface 2018-07-29 10:41:22 -04:00
Michael Gottesman
5648ef219d [+0-all-args] Clean up remains of +1 convention from the runtime. 2018-07-06 23:10:12 -07:00
Saleem Abdulrasool
b432249a17 stubs: silence pedantic warning (NFC)
C requires that there is at least one declaration in a translation unit.
Because this file is ObjC and not ObjC++, this restriction applies.  Add
a declaration to silence the warning in the case that ObjC interop is
disabled.
2018-04-06 09:29:05 -07:00
Michael Gottesman
bc48a66c77 [+0-all-args] Remove autoreleasepool on non-x86_64 platforms from String stubs.
This is only necessary on x86-64. On arm/arm64 we are already ok since the
assembly marker that we use there does not suffer from this issue.

For x86-64 we need to solve the problem upstream by not tailing calling
objc_retainAutoreleasedReturnValue.

rdar://38675842
2018-04-02 10:50:08 -07:00
Michael Gottesman
e567bc9028 [+0-all-args] Enable +0 normal arguments.
rdar://34222540
2018-03-19 20:25:31 -07:00
Michael Gottesman
18bcc1e143 [+0-args] Change SWIFT_CC(Swift) functions to use SWIFT_NS_RELEASES_ARGUMENT instead of NS_RELEASES_ARGUMENT.
rdar://34222540
2018-01-23 16:01:27 -08:00
Arnold Schwaighofer
f9c004945f Update comments 2017-10-07 09:15:55 -07:00
Arnold Schwaighofer
f691657f3e Use an autorelease pool on i386 instead 2017-10-06 14:41:56 -07:00
Arnold Schwaighofer
362f91052a Not a doc comment 2017-10-06 14:11:38 -07:00
Arnold Schwaighofer
513303fd63 Also fix and test uppercased and lowercased 2017-10-06 13:04:03 -07:00
Arnold Schwaighofer
ec5f40f12f runtime: Move String implementation stubs that want need the auto-released return value optimization to an ARC compiled file
String's hashValue function is implemented in terms of Foundation's hash
function in a runtime function on darwin platforms. For non-ASCII strings we
will call str.decomposedStringWithCanonicalMapping inside this runtime function
which will allocate a new NSString and return the result in the current
autorelease pool. We implemented this function in a file compiled without ARC.
This meant that we would leak said NSString into the current active autorelease
pool.
This patch moves the implementation to a file compiled with ARC. ARC will insert
objc_retainAutoreleasedReturnValue call and on platforms that require it an
marker for the hand-off of the autoreleased return value optimization.

SR-4889
rdar://32199117
2017-10-06 11:12:22 -07:00