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
Arjun Nayini
a3e94cc1d1
Merge branch 'master' into bugfix/SR-4172
2017-06-07 09:37:45 -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
Dave Abrahams
eb04df45f4
[stdlib] Eliminate over-constraint on StringProtocol
2017-06-03 17:18:20 -07: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
Roman Levenstein
d6bddd20b9
Merge pull request #10040 from swiftix/inliner-improvements2
...
[sil-generic-specializer] Add @_semantics("optimize.sil.specialize.generic.partial.never") to disable partial specialization on specific functions
2017-06-01 21:56:10 -07:00
Dave Abrahams
562fd79aa6
[stdlib] Encode small Characters as UTF-16
...
This takes care of the standard library portion, but we need a new
BuiltinUTF16ExtendedGraphemeClusterLiteralConvertible protocol in order to
fully recover the performance of character literals.
Note that part of the character_literals.swift test is currently disabled. That
will need to be fixed before we can merge this work.
2017-06-01 20:57:25 -07:00
Roman Levenstein
00d663d172
[sil-generic-specializer] Add @_semantics("optimize.sil.specialize.generic.partial.never") to disable partial specialization on functions
...
This new @_semantics is used to annotate some very big functions in the standard library. It reduced the code size of the stdlib by 2%.
2017-06-01 16:33:18 -07:00
Arnold Schwaighofer
d457adb776
stdlib: Outline integer parsing code in FixedWidthInteger.init(_: radix:) on the slow paths
...
This reduces code size by 20k on an app that uses this function.
rdar://32519912
2017-06-01 15:18:54 -07:00
Ben Cohen
28c470da45
Test if two ascii string pointers are equal before memcmp ( #10018 )
2017-06-01 15:01:42 -07:00
Greg Parker
318f6c1ac5
[runtime] Add swift_unownedIsEqual and swift_unknownUnownedIsEqual.
...
It is safe to test pointer equality of an unowned variable, even if
the unowned variable refers to a dead object. Allowing this operation
without an unnecessary unowned abort enables some kinds of caching
schemes more cheaply than can be done with weak variables.
rdar://32142240
2017-06-01 13:53:19 -07:00
Nate Cook
42efcdb246
One more from @xwu + 80-column fixes
2017-06-01 12:53:05 -05:00
Michael Ilseman
022c973d77
Merge pull request #10002 from milseman/i_dream_of_grapheme
...
[stdlib] Grapheme break fast-paths for Cyrillic, Arabic, Hangul
2017-06-01 08:59:25 -07:00
swift-ci
3ba644c782
Merge pull request #10020 from dabrahams/nix-_HeapBuffer2
2017-06-01 06:17:44 -07:00
Dave Abrahams
b2e4bd5d09
[stdlib] Replace _HeapBuffer with a thin wrapper
...
...over ManagedBufferPointer
2017-06-01 04:40:52 -07:00