Commit Graph

17988 Commits

Author SHA1 Message Date
Erik Eckstein
d4cbc48e40 SILCombine: replace switch_value of Builtin.Int1 with a cond_br
cond_br is more common and can be handled by more optimizations
2017-04-27 09:06:55 -07:00
Dave Abrahams
16e42d3d04 [stdlib] UnicodeDecoders: dumber is faster
A really simpleminded Collection view is faster by far than trying to cache all
that information.

I believe we could do even better by storing a simpler cache in the indices of
the view, but performance is already in decent shape, so we can put off
further optimization:

BASELINE
user	0m2.864s
user	0m2.775s
user	0m2.763s

SEQUENCE
user	0m2.632s
user	0m2.571s
user	0m2.553s

COLLECTION
user	0m3.553s
user	0m3.567s
user	0m3.475s
2017-04-27 08:09:00 -07:00
Dave Abrahams
367a8a3178 Merge pull request #9054 from apple/stateful-unicode-decoding
UnicodeDecoders: Basic View proof-of-concept
2017-04-27 07:38:46 -07:00
Alex Blewitt
52a00437ac Merge pull request #9025 from norio-nomura/enable-sourcekit-test-on-linux
Enable SourceKit tests if building SourceKit other than ubuntu 14.04
2017-04-27 12:01:14 +01:00
practicalswift
6f6017c30c [gardening] Use consistent naming for reproducibility tests 2017-04-27 11:31:44 +02:00
David Farler
bf37eb7f34 Merge pull request #9062 from bitjammer/migrator-remap-additional-output
[Migrator] Make remap file an additional output
2017-04-27 01:40:26 -07:00
swift-ci
da7f08b7b0 Merge pull request #9068 from practicalswift/reproducible-builds-bitcode 2017-04-27 01:35:59 -07:00
David Farler
63776b507b When converting some of the old Migrator automation to the new Migrator,
I had set up the driver to invoke a separate frontend invocation with
the "update code" mode. We sort of did this last release, except we
forked to the swift-update binary instead. This is causing problems with
testing in Xcode.

Instead, let's perform a single compile and add the remap file as an
additional output during normal compiles. The driver, seeing
-update-code, will add -emit-remap-file-path $PATH to the -c frontend
invocation.

rdar://problem/31857580
2017-04-27 01:03:00 -07:00
practicalswift
ed401b4757 Add reproducibility test for -emit-bc 2017-04-27 09:56:55 +02:00
practicalswift
9a8ba248b6 Merge pull request #9067 from practicalswift/reproducible-builds-ii
Add reproducibility tests for -emit-module, -emit-sib, -emit-sibgen, -emit-sil and -emit-tbd
2017-04-27 09:14:51 +02:00
Roman Levenstein
ab167ac41c Merge pull request #9053 from swiftix/partial-specialization-fixes
[sil-combine] Fix a subtle bug in getConformanceAndConcreteType related to handling of inherited conformances
2017-04-26 23:38:42 -07:00
practicalswift
51978bc33e Add reproducibility tests for -emit-module, -emit-sib, -emit-sibgen, -emit-sil and -emit-tbd 2017-04-27 08:32:04 +02:00
Roman Levenstein
28d7f80c24 [sil-combine] Fix a subtle bug in getConformanceAndConcreteType related to handling of inherited conformances
This fixes a couple of tests and some of the compatibility suite projects.
rdar://problem/31815540, rdar://problem/31838976
2017-04-26 23:07:32 -07:00
swift-ci
b2d71ecc14 Merge pull request #9064 from DougGregor/typealias-infer-same-type-requirements 2017-04-26 22:44:29 -07:00
swift-ci
1b6cd32a7b Merge pull request #9061 from gottesmm/tbi_fix 2017-04-26 21:17:45 -07:00
Michael Gottesman
6c27e7ef5b Remove all stdlib dependencies from the tbi test.
This should eliminate any deployment target issues that we may run into when
using this test.

rdar://24370377
2017-04-26 19:58:27 -07:00
swift-ci
1ec24c37f8 Merge pull request #9051 from huonw/symbol-list-7 2017-04-26 19:47:50 -07:00
Maxim Moiseev
41b00c57ab Merge pull request #9044 from moiseev/substring-in
[stdlib] Substring
2017-04-26 19:25:59 -07:00
swift-ci
ffdc8e15d9 Merge pull request #9058 from rudkx/add-test-for-inout-to-pointer 2017-04-26 18:43:46 -07:00
swift-ci
962c71a2f1 Merge pull request #9056 from atrick/access 2017-04-26 18:10:28 -07:00
Andrew Trick
e8b0947897 [Exclusivity] Allow testing the -Onone pipeline with access markers.
Markers are always eliminated before -O passes.

At -Onone, markers can be enabled via command line for all -Onone passes.
2017-04-26 17:32:48 -07:00
Mark Lacey
66819b6113 Add a targeted test for inout-to-pointer conversions in the context of generic functions.
I was experimenting with type checker changes that resulted in breaking
code like this and we did not have a test in place to catch the problem.
2017-04-26 17:06:08 -07:00
Dave Abrahams
662ea1f8a0 [stdlib] UnicodeDecoders: basic view proof-of-concept
Implements Sequence and Collection views over arbitrary CodeUnits, demonstrating
that indexing is possible.  However, collection-style decoding is approximately
3x slower than sequence-style, because Decoders have a fundamentally
Sequence-oriented interface.  I think I know what needs to be done to get
parity.
2017-04-26 17:01:48 -07:00
Dave Abrahams
63a2033945 [stdlib] UnicodeDecoders: separate EncodedScalar from Buffer
New code I'm writing doesn't seem to make sense with the two things collapsed.
2017-04-26 17:01:48 -07:00
Huon Wilson
9a255607ee [IRGen] Visibility of deleted private method vtable stubs should match original.
Previously this would mean something like

    class C {
        private func f() {}
    }

would end up with the symbol for f being completely public (external,
default visibility), even though it only needs to match the internal
class (external, hidden visibility).
2017-04-26 16:57:54 -07:00
Norio Nomura
459c18dd35 Disable sourcekit’s tests on ubuntu-14.04
https://github.com/apple/swift/pull/8485#issuecomment-296862707
2017-04-27 08:44:13 +09:00
Mark Lacey
2f31479428 Merge pull request #9041 from rudkx/disable-slow-test
Disable an "expression too complex" test for now.
2017-04-26 15:57:28 -07:00
John McCall
1666ebb92f Merge pull request #9039 from rjmccall/optional-to-optional
Fix a semantic bug in CSApply's optional-to-optional application.
2017-04-26 18:38:42 -04:00
Mark Lacey
21fd184e0d Disable an "expression too complex" test for now.
I've opened https://bugs.swift.org/browse/SR-4714 to track fixing the
slowness here and/or moving the test into the validation suite.

We're currently not "too complex" here given the current metric, but we
are still extremely slow, adding several minutes to test runs.
2017-04-26 14:57:04 -07:00
Arnold Schwaighofer
422ab072a6 Merge pull request #8932 from aschwaighofer/irgen_enum_primitive_copy_as_memcpy
IRGen: Enums - Use memcpy for indirectly primitive copying fixed size types
2017-04-26 14:24:34 -07:00
John McCall
7bb263161a Fix a semantic bug in CSApply's optional-to-optional application.
Implicit conversions from T?? to U?? would map nil to some(nil) instead of nil.
2017-04-26 17:24:17 -04:00
practicalswift
aa0ce22dd5 Merge pull request #9028 from practicalswift/reproducible-builds
Add reproducibility tests for -emit-assembly, -emit-ir and -emit-silgen [WIP]
2017-04-26 23:10:27 +02:00
Jordan Rose
93963c58ed [Serialization] Look through unavailable compatibility aliases.
This keeps us from showing Swift 3 names in Swift 4 code;
unfortunately, as the test case shows, we still have a few cases where
Swift /4/ names will leak into Swift /3/ code. I'm considering this an
acceptable state of events for now.
2017-04-26 13:07:04 -07:00
Jordan Rose
dbc148bfb3 [ClangImporter] Tag compatibility aliases as such...
...so we can avoid showing an 'aka' for them...unless they are
themselves typealiases.
2017-04-26 13:07:03 -07:00
Jordan Rose
cb9b9ea734 [ClangImporter] Always import types under their Swift 4 name.
This means all cross-module references and all mangled names will
consistently use the Swift 4 name (the canonical type), no special
handling required.

The main thing we lose here is that the Swift 4 names of imported
types become usable in Swift 3 mode without any diagnostics, similar
to how most language features introduced in Swift 4 are available in
Swift 3 mode. It also implies that the Swift 4 name will show up in
demangled names.

rdar://problem/31616162
2017-04-26 13:07:03 -07:00
Max Moiseev
13da5f5c5f Removing warning in test 2017-04-26 12:31:35 -07:00
Max Moiseev
e1f502f6cd Swift 3 compatible String and Substring range subscripts 2017-04-26 12:13:43 -07:00
practicalswift
3e27346eb3 Add reproducibility tests for -emit-assembly, -emit-ir and -emit-silgen 2017-04-26 21:05:38 +02:00
John McCall
338825e73d Fix the emission of r-value pointer conversions to delay the
conversions and extend lifetimes over the call.

Apply this logic to string-to-pointer conversions as well as
array-to-pointer conversions.

Fix the AST verifier to not blow up on optional pointer conversions,
and make sure we SILGen them correctly.  There's still an AST bug
here, but I'll fix that in a follow-up patch.
2017-04-26 14:15:44 -04:00
Jordan Rose
90647e4cdd [test] Add some basic tests for typealiases in various positions. 2017-04-26 10:58:01 -07:00
Nate Cook
e2328885c1 [stdlib] Dictionary/Set enhancements
A variety of enhancements from SE-154 and SE-165:

- Custom Keys and Values collections for Dictionary
- Two sequence-based Dictionary initializers
- Merging methods for Dictionary
- Capacity checking and reserving for Dictionary and Set
- Type-specific filter(_:) methods for Dictionary and Set
- A mapValues(_:) method for Dictionary
- A grouping Dictionary initializer
2017-04-26 11:21:16 -05:00
Michael Ilseman
111d6200eb Merge pull request #8979 from milseman/parse_my_tweets_faster
[stdlib] Parse my tweets faster! 2x forwards, 3x reverse
2017-04-26 07:36:18 -07:00
Norio Nomura
3da7926a5e Revert "Revert "Enable SourceKit tests if building SourceKit""
This reverts commit a383adf9df.
2017-04-26 21:16:36 +09:00
practicalswift
ab5aaeb359 Merge pull request #9001 from practicalswift/gardening-20170425
[gardening] Unused variables. Unused diagnostics. Namespace comments. Typos.
2017-04-26 09:28:24 +02:00
Dave Abrahams
1753e66d55 [stdlib] UnicodeDecoders: further 10% speedup
Handling in bit counts rather than shuttling back and forth between bit counts
and code unit counts saves a lot.
2017-04-25 23:51:34 -07:00
Dave Abrahams
65daf5d7e6 [stdlib] UnicodeDecoders: follow some naming conventions 2017-04-25 23:41:17 -07:00
Dave Abrahams
1247164fe8 [stdlib] UnicodeDecoders: eliminate a redundant check
This finally makes us measurably faster than the BASELINE, existing code in
master:

BASELINE
user	0m2.869s
user	0m2.890s
user	0m2.893s
FORWARD
user	0m2.727s
user	0m2.730s
user	0m2.737s
REVERSE
user	0m2.417s
user	0m2.418s
user	0m2.416s
2017-04-25 23:26:24 -07:00
Dave Abrahams
e0e18a986e [stdlib] UnicodeDecoders: traffic in high-level buffers 2017-04-25 23:17:12 -07:00
swift-ci
98995265a2 Merge pull request #9019 from apple/stateful-unicode-decoding 2017-04-25 21:03:11 -07:00
Dave Abrahams
8a2ca78e50 [stdlib] UnicodeDecoders: Actually using high-level buffer 2017-04-25 20:08:39 -07:00