Commit Graph

8175 Commits

Author SHA1 Message Date
Graydon Hoare
fc3c5196bf Merge pull request #10237 from graydon/rdar-32547102-float-varargs-overflow-to-gp-args-area
Rdar 32547102 float varargs overflow to gp args area
2017-06-13 22:40:13 -07:00
Graydon Hoare
08503998ab [varargs] Don't put excess float varargs in GPR area, fix rdar://32547102 2017-06-13 20:25:45 -07:00
Graydon Hoare
8e6a775181 [varargs] Add comment to help future devs avoid losing a few hours. 2017-06-13 20:25:45 -07:00
Erik Eckstein
ce188682e5 runtime: remove an unnecessary helper function to get the class name 2017-06-13 15:20:07 -07:00
Nate Cook
0ebf95b8ac Merge pull request #10209 from natecook1000/nc-fixes-75-3
Documentation edits
2017-06-13 16:21:42 -05:00
Nate Cook
825e9d077d [stdlib] More documentation revisions / consistency fixes. 2017-06-13 14:08:00 -05:00
Erik Eckstein
1bff67f573 runtime: use class_getName instead of NSStringFromClass in _swift_checkClassAndWarnForKeyedArchiving 2017-06-13 09:25:42 -07:00
Nate Cook
b7af9bfe83 [stdlib] Remove SeeAlso tags 2017-06-13 11:23:51 -05:00
John McCall
3578e20a1f Merge pull request #10213 from rjmccall/cf-create-is-plus-one
Annotate a couple of +1-returning functions appropriately
2017-06-12 23:15:50 -04:00
John McCall
eb6cebdfa2 Annotate a couple of +1-returning functions appropriately instead of
trying to compensate in the caller.

One of the callers was apparently not _cocoaStringSlice trying to compensate,
so this probably also fixes a leak.
2017-06-12 20:42:57 -04:00
Slava Pestov
88f33767c3 stdlib: Make _HeapBufferHeader @_versioned to fix resilient build 2017-06-12 14:41:45 -07:00
Nate Cook
0a7780c213 [stdlib] Various minor documentation revisions 2017-06-12 16:20:11 -05:00
Erik Eckstein
488c43c825 runtime: add a runtime function _swift_checkClassAndWarnForKeyedArchiving
This function checks if a mangled class name is going to be written into an NSArchive.
If yes, a warning should be printed and the return value should indicate that.

TODO: print the actual warning

rdar://problem/32414508
2017-06-07 17:02:00 -07:00
Robert Widmann
b9836e64e2 Merge pull request #9869 from johnno1962a/master
Ensure fatalError message logged on Android
2017-06-07 09:15:04 -07:00
Dave Abrahams
4bfa2bff24 Merge pull request #10131 from natecook1000/nc-dw-sep
[stdlib] Move DoubleWidth into its own file
2017-06-06 16:09:55 -07:00
Nate Cook
41ea7e296c Merge pull request #10113 from natecook1000/nc-dict-tuples
[stdlib] Add dictionary overloads for merging methods
2017-06-06 14:58:15 -07:00
Nate Cook
6133adc413 [stdlib] Move DoubleWidth into its own file 2017-06-06 08:54:15 -07:00
Roman Levenstein
ff1e770e6f Merge pull request #10126 from swiftix/inliner-improvements2
Re-factor Codable.decode functions to reduce the standard library code size
2017-06-05 21:36:42 -07:00
Jordan Rose
485ebefba7 Merge pull request #10083 from jrose-apple/nscoding-diags-take-2
Update and re-enable the diagnostics for unstable runtime names
2017-06-05 19:51:01 -07:00
Jordan Rose
f0aca936c7 Allow '@objc(RuntimeName)' on classes with generic ancestry.
This is accomplished by recognizing this specific situation and
replacing the 'objc' attribute with a hidden '_objcRuntimeName'
attribute. This /only/ applies to classes that are themselves
non-generic (including any enclosing generic context) but that have
generic ancestry, and thus cannot be exposed directly to Objective-C.

This commit also eliminates '@NSKeyedArchiverClassName'. It was
decided that the distinction between '@NSKeyedArchiverClassName' and
'@objc' was too subtle to be worth explaining to developers, and that
any case where you'd use '@NSKeyedArchiverClassName' was already a
place where the ObjC name wasn't visible at compile time.

This commit does not update diagnostics to reflect this change; we're
going to change them anyway.

rdar://problem/32414557
2017-06-05 17:32:25 -07:00
Roman Levenstein
890c2d5015 Re-factor Codable.decode functions to reduce the standard library code size
Move the error reporting slow-path into a separate function, which is not inlined or specialized.
This reduced the stdlib code size by almost 1%.
2017-06-05 16:28:37 -07:00
Nate Cook
b2e9d74d5a [stdlib] Add dictionary overloads for merge/merging methods
This resolves the issue where a dictionary can’t be passed to
the Dictionary.merge and .merging methods. rdar://problem/32352586
2017-06-05 15:54:11 -07:00
Max Moiseev
6738a2afd7 [overlay] Add unavailble x/y to CGRect to redirect to minX/minY 2017-06-05 14:01:14 -07:00
Maxim Moiseev
0c108340d1 Merge pull request #9367 from natecook1000/nc-doublewidth
[stdlib] DoubleWidth Implementation
2017-06-05 10:03:42 -07:00
Itai Ferber
71819ef4e0 Merge pull request #10105 from linqingmo/dictionary-decodable-fix
Dictionary decodable fix
2017-06-05 09:33:53 -07:00
sushangjin
279f4d9f8e ditionary-decodable-fix 2017-06-05 11:40:12 +08:00
Roman Levenstein
0f788727bf Merge pull request #10096 from swiftix/inliner-improvements2
Reduce code size of the stdlib
2017-06-04 20:29:13 -07:00
John Holdsworth
ed38b57a48 Revert "Remove cause of crash on Android"
This reverts commit 8248322be0.
2017-06-05 01:59:47 +01:00
John Holdsworth
8248322be0 Remove cause of crash on Android 2017-06-04 23:34:23 +01:00
Roman Levenstein
ecff16cba3 Reduce code size of the stdlib
This should reduce the code size of the stdlib by 1.5%.
2017-06-03 14:22:12 -07:00
Dave Abrahams
9050d74647 [stdlib] Inline fast paths of String append 2017-06-03 13:33:58 -07:00
Dave Abrahams
508e9a627d [stdlib] ASCII fastpath for UTF16.transcodedLength 2017-06-03 13:08:11 -07:00
Dave Abrahams
ceff7a5573 [stdlib] Rewrite UTF16.transcodedLength 2017-06-03 13:08:11 -07:00
Dave Abrahams
7db9ba8dd2 [stdlib] Replace UTF8.EncodedScalar
This is a way of testing infrastructure for an updated UTF8View iterator
2017-06-03 13:08:11 -07:00
Ben Cohen
d0c0043f93 [stdlib] Use ephemeral string for substring comparison (#10009)
* Use _ephemeralString for substring comparison

Add back != for String/Substring comparison

* OK fine, Linux, if you're going to be difficult

* Different forms of comparison, tests
2017-06-03 11:20:01 -07:00
Roman Levenstein
f98f1269be Merge pull request #10080 from swiftix/inliner-improvements2
[sil-generic-specializer] Do not specialize Mirror._superclassIterator to reduce the stdlib code size
2017-06-03 10:16:59 -07:00
Arnold Schwaighofer
23b30aa76b Merge pull request #10077 from aschwaighofer/irgen_delete_unused_value_witnesses
Delete unused existential value witnesses from the old existential implementation
2017-06-02 19:24:59 -07:00
swift-ci
dbad2eb785 Merge pull request #10082 from dabrahams/inline-character-comparison-fast-paths 2017-06-02 18:44:24 -07:00
Dave Abrahams
8fdee4cdb7 [stdlib] Inline Character comparison fast paths 2017-06-02 16:28:48 -07:00
Roman Levenstein
28c14a976d [sil-generic-specializer] Do not specialize Mirror._superclassIterator to reduce the stdlib code size
This shaves off 3.2% of the stdlib’s code size.
2017-06-02 15:29:41 -07:00
Arnold Schwaighofer
ca63326e1b Delete unused existential value witnesses from the old existential
implementation

And remove the SWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS flag.
2017-06-02 14:34:41 -07:00
Arnold Schwaighofer
326ff7efad Merge pull request #10044 from aschwaighofer/stdlib_outline_parseASCII
stdlib: Outline integer parsing code in FixedWidthInteger.init(_: radix:) on the slow paths
2017-06-02 12:49:39 -07:00
Dave Abrahams
f212fac717 [stdlib] Access a Character's .unicodeScalars without allocation 2017-06-02 11:52:33 -07:00
Dave Abrahams
3a7a30a822 Merge pull request #10059 from apple/utf16-small-character
[stdlib] Encode small Characters as UTF-16
2017-06-02 11:49:40 -07:00
swift-ci
5ecbde9a42 Merge pull request #10051 from apple/debug-only-single-grapheme-check 2017-06-02 11:37:33 -07:00
Arnold Schwaighofer
3f7fcfadeb Address review comments
Rename _parseASCIIOutlined to _parseASCIISlowPath.
Change doc comment to regular comment.
2017-06-02 11:27:42 -07:00
Dave Abrahams
51bf3a615f [stdlib] Make single-grapheme check debug-only
Because of the way grapheme breaking changes across updates to ICU and the Unicode standard, it may not even be legit to check this at all.  It's certainly not unsafe to skip the check, so let's see if we can do that in release builds, as grapheme breaking is expensive.
2017-06-02 09:53:22 -07:00
Amr Aboelela
dace2686ab Removed && !defined(__ANDROID__) to fix https://bugs.swift.org/browse/SR-5059 (#10060) 2017-06-02 08:10:11 -07:00
Arnold Schwaighofer
d289236f79 stdlib: Move _parseASCIIOutlined into the FixedWidthInteger extension 2017-06-02 07:24:20 -07:00
Dave Abrahams
2778dc85ea Add and use _ExpressibleByBuiltinUTF16ExtendedGraphemeClusterLiteral 2017-06-02 07:01:03 -07:00