Commit Graph

5 Commits

Author SHA1 Message Date
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