Commit Graph

7628 Commits

Author SHA1 Message Date
Dmitri Hrybenko
b5d0896828 Un-XFAIL a SceneKit testcase, the blocking issue is fixed
The whole file is still disabled though, because the fix hasn't been
integrated yet.

Swift SVN r27910
2015-04-29 16:55:34 +00:00
Dmitri Hrybenko
dbf1daeb0a Finish the SceneKit overlay for -[SCNSceneSource entryWithIdentifier:withClass:]
rdar://20384835

Swift SVN r27899
2015-04-29 02:22:31 +00:00
Dmitri Hrybenko
4d197dc5b2 Revert "stdlib: change sort() and sorted() into methods"
This reverts commits r27885, r27876.  It looks like they broke iOS on
arm64.

Swift SVN r27893
2015-04-28 23:58:50 +00:00
Dmitri Hrybenko
b05c372c4f stdlib: change sort() and sorted() into methods
Swift SVN r27876
2015-04-28 18:05:37 +00:00
Dmitri Hrybenko
fd14e70e48 stdlib: rename find() to indexOf() per API review
Swift SVN r27849
2015-04-28 00:30:37 +00:00
Doug Gregor
292f57a567 Revert "Add already-fixed test from rdar://problem/20549848."
This reverts r27824; it's redundant since the radar was a dupe.

Swift SVN r27828
2015-04-27 23:02:45 +00:00
Doug Gregor
dfd7ccbb5f Test case from rdar://problem/20588474.
Swift SVN r27826
2015-04-27 22:55:48 +00:00
Doug Gregor
d3d5e9bfd9 Add already-fixed test from rdar://problem/20549848.
Swift SVN r27824
2015-04-27 22:55:45 +00:00
Chris Lattner
20c74c4d32 update validation tests for improved diagnostics.
Swift SVN r27794
2015-04-27 01:00:40 +00:00
Dmitri Hrybenko
f6090c1c89 stdlib: make CollectionType._prext_isEmpty dynamically dispatched
This change makes isEmpty faster for Dictionary and Set, when invoked
from generic algorithms.

Swift SVN r27736
2015-04-26 00:08:14 +00:00
Dmitri Hrybenko
bc50b2f58d stdlib: stop using CFSetCreateCopy() in set bridging
Use -[NSSet copyWithZone:] instead.

CFSetCreateCopy() is buggy in OSes that ship today: it copies the set
unconditionally, even if it is immutable, resulting in O(n) bridging.

Swift SVN r27733
2015-04-26 00:08:13 +00:00
Dmitri Hrybenko
ba6920e69d stdlib: stop using CFDictionaryCreateCopy() in dictionary bridging
Use -[NSDictionary copyWithZone:] instead.

CFDictionaryCreateCopy() is buggy in OSes that ship today: it copies the
dictionary unconditionally, even if it is immutable, resulting in O(n)
bridging.

Swift SVN r27732
2015-04-26 00:08:12 +00:00
Dmitri Hrybenko
ce95ac26cd stdlib: adjust _NSDictionaryCoreType to match Foundation nullability audit
Swift SVN r27729
2015-04-26 00:08:10 +00:00
Doug Gregor
b2cc34c241 Remove '#' for making parameter names into argument labels.
If you want to make the parameter and argument label the same in
places where you don't get the argument label for free (i.e., the
first parameter of a function or a parameter of a subscript),
double-up the identifier:

  func translate(dx dx: Int, dy: Int) { }

Make this a warning with Fix-Its to ease migration. Part of
rdar://problem/17218256.

Swift SVN r27715
2015-04-24 23:58:57 +00:00
Doug Gregor
0523a09560 Update validation testsuite for the argument label default changes.
Swift SVN r27706
2015-04-24 20:31:43 +00:00
Dmitri Hrybenko
7e73f16ba5 The crash test #0272 passes on Linux, annotate it as such
Swift SVN r27578
2015-04-22 08:50:21 +00:00
Dmitri Hrybenko
8bf1deedb0 The ErrorType race test requires ObjC runtime
Swift SVN r27577
2015-04-22 08:50:20 +00:00
Doug Gregor
78cc7b75f8 Basic support for typealiases in protocol extensions.
Handle substitutions properly when a typealias declared in a protocol
extension is used to satisfy an associated type requirement. Fixes
rdar://problem/20564605.

Swift SVN r27490
2015-04-20 20:19:03 +00:00
Doug Gregor
69718f77fa When failing to find a suitable type witness, always record ErrorType.
Fixes the crash in rdar://problem/20564378. In these cases, we end up
swallowing some diagnostics. That will be addressed in a subsequent
commit.

Swift SVN r27436
2015-04-17 18:11:35 +00:00
Dmitri Hrybenko
02d254047b stdlib: add a hook for dynamic dispatch in CollectionType.find()
This hook allows Set.find() to be equally efficient in static and
generic contexts.

This time, with correct tests.

Swift SVN r27404
2015-04-17 05:03:28 +00:00
Dmitri Hrybenko
e94b0f9b40 Revert "stdlib: add a hook for dynamic dispatch in CollectionType.find()"
This reverts commit r27402.  It broke tests.

Swift SVN r27403
2015-04-17 04:59:29 +00:00
Dmitri Hrybenko
fe53f87dfc stdlib: add a hook for dynamic dispatch in CollectionType.find()
This allows Set.find() to be equally efficient in static and generic
contexts.

Swift SVN r27402
2015-04-17 04:19:49 +00:00
Dmitri Hrybenko
0d6374bb58 stdlib/HashedCollections: skip computing the hash for lookups in empty
collections

Swift SVN r27395
2015-04-17 01:56:19 +00:00
Chris Willmore
f121773690 Update preprocessor directive in validation test for AppleTV.
<rdar://problem/20559420> validation-test/stdlib/StdlibUnittestStdin.swift fails on appletvsimulator-x86_64

Swift SVN r27336
2015-04-15 23:01:59 +00:00
Devin Coughlin
d08b98b1ca Sema: Turn on availability checking by default
Enable checking for uses of potentially unavailable APIs. There is
a frontend option to disable it: -disable-availability-checking.

This commit updates the SDK overlays with @availability() annotations for the
declarations where the overlay refers to potentially unavailable APIs. It also changes
several tests that refer to potentially unavailable APIs to use either #available()
or @availability annotations.

Swift SVN r27272
2015-04-14 06:44:01 +00:00
Dmitri Hrybenko
de1917b597 Disable a crash test in no-asserts builds
Swift SVN r27271
2015-04-14 03:36:20 +00:00
Dmitri Hrybenko
d267b86cb6 stdlib: move the bulk of SequenceType algorithms to protocol extensions
rdar://19895265

Swift SVN r27269
2015-04-14 01:53:19 +00:00
Michael Gottesman
75ea31dba9 Turn on +0 self by default.
The only caveat is that:

1. We do not properly recognize when we have a let binding and we
perform a guaranteed dynamic call. In such a case, we add an extra
retain, release pair around the call. In order to get that case I will
need to refactor some code in Callee. I want to make this change, but
not at the expense of getting the rest of this work in.

2. Some of the protocol witness thunks generated have unnecessary
retains or releases in a similar manner.

But this is a good first step.

I am going to send a large follow up email with all of the relevant results, so
I can let the bots chew on this a little bit.

rdar://19933044

Swift SVN r27241
2015-04-12 22:23:37 +00:00
Dmitri Hrybenko
a84793c60b Fix and re-enable StdlibUnittestRunAllTestsCalledTwice.swift on iOS
Swift SVN r27234
2015-04-11 06:13:52 +00:00
Greg Parker
4fd7e8948f [test] XFAIL StdlibUnittestRunAllTestsCalledTwice.swift on iOS.
The test's check doesn't work on iOS device or simulator; perhaps 
`not --crash` isn't doing its thing.


Swift SVN r27231
2015-04-11 03:35:14 +00:00
Doug Gregor
997136962e Always open existential types in the type checker.
Consistently open all references into existentials into
opened-existential archetypes within the constraint solver. Then,
during constraint application, use OpenExistentialExprs to record in
the AST where an existential is opened into an archetype, then use
that archetype throughout the subexpression. This simplifies the
overall representation, since we don't end up with a mix of operations
on existentials and operations on archetypes; it's all archetypes,
which tend to have better support down the line in SILGen already.

Start simplifying the code in SILGen by taking away the existential
paths that are no longer needed. I suspect there are more
simplifications to be had here.

The rules for placing OpenExistentialExprs are still a bit ad hoc;
this will get cleaned up later so that we can centralize that
information. Indeed, the one regression in the compiler-crasher suite
is because we're not closing out an open existential along an error
path.

Swift SVN r27230
2015-04-11 03:20:22 +00:00
Dmitri Hrybenko
a5d6aec352 StdlibUnittest: add a diagnostic for calling runAllTests() twice
... and fix this issue in the sort() test.

Swift SVN r27215
2015-04-10 21:54:56 +00:00
Dave Abrahams
0464c3d957 [stdlib] [Generator|Sequence]Of => Any[Generator|Sequence]
Retire the old components now that the new ones have passed API review.

<rdar://20406937> covers the migration fallout of this change.

Swift SVN r27092
2015-04-07 20:32:31 +00:00
Dave Abrahams
ac3f047496 [stdlib] Renaming fallout from Mirror API review
toString(x)      => String(x)
toDebugString(x) => String(reflecting: x)
Printable        => CustomStringConvertible
DebugPrintable   => CustomDebugStringConvertible

Also updated comments to clarify these protocols

Swift SVN r27090
2015-04-07 20:32:26 +00:00
Michael Gottesman
2c143aee96 Revert "[stdlib] [Generator|Sequence]Of => Any[Generator|Sequence]"
This reverts commit r27081. It broke the build.

Swift SVN r27086
2015-04-07 17:21:03 +00:00
Dave Abrahams
a80b1a4caa [stdlib] [Generator|Sequence]Of => Any[Generator|Sequence]
Retire the old components now that the new ones have passed API review.

<rdar://20406937> covers the migration fallout of this change.

Swift SVN r27081
2015-04-07 15:20:40 +00:00
Greg Parker
c253072f05 [test] Disable bin8 decode test on arm64.
<rdar://20448082> Possible miscompile in MsgPackDecoder.readBinary() 
on optimized arm64


Swift SVN r27078
2015-04-07 12:38:49 +00:00
Greg Parker
67ed0ef62a [test] Fix typo in validation-test/stdlib/SceneKit.swift for 32-bit.
Swift SVN r27074
2015-04-07 07:43:31 +00:00
Dmitri Hrybenko
ed99e14f54 SDK overlay: create an overlay for SceneKit
rdar://20384803
rdar://20384835

Swift SVN r27069
2015-04-07 06:41:55 +00:00
Jordan Rose
cc45a8e86a [test] Don't run still-crashing compiler_crashers under no-asserts builds.
Per discussion on the list. From now on, when you fix a compiler_crashers
test case, move it to compiler_crashers_fixed so that we get no-asserts and
ASan coverage.

Swift SVN r27055
2015-04-07 03:05:02 +00:00
Dmitri Hrybenko
1b9ca12c5b stdlib: remove old declarations that were marked unavailable
rdar://20169533

Swift SVN r27020
2015-04-05 09:15:49 +00:00
Dmitri Hrybenko
ff2dd6320a stdlib: fix coding style
When colon specifies is-a relationship between types, we put spaces on
both sides of the colon.

Swift SVN r27016
2015-04-05 05:54:55 +00:00
Joe Groff
fe3d75eec8 Update for feedback from Dmitri.
Simplify the observation evaluation in the ErrorType race test by using evaluateObservationsAllEqual, and run the test for real. Apparently round-trip NSString and NSDictionary bridging doesn't produce a stable object, so use valueForKey as a hack to sidestep bridging so we can verify that the identities of the bridged domain and code aren't racy.

Swift SVN r27003
2015-04-05 03:07:42 +00:00
Joe Groff
41f73d43ae Runtime: Try to make lazy ErrorType-to-NSError bridging thread-safe.
Atomically initialize and load the NSError bridging fields within an ErrorType box so that we do the right thing when two threads concurrently coerce the box to NSError.

Swift SVN r26996
2015-04-05 00:17:34 +00:00
Mark Lacey
c3245dac9a Update tests that pass in no-assertions builds so that they do not run.
Also remove one 'XFAIL: no_asserts' in a test that no longer fails in
no-asserts builds.

Swift SVN r26965
2015-04-04 00:29:08 +00:00
Chris Lattner
192da7e0bf it looks like my changes regressed this test, xfail it for now.
Swift SVN r26960
2015-04-03 23:11:25 +00:00
Mark Lacey
0fcea2dbb5 Remove XFAIL as this passes with no-asserts builds.
Swift SVN r26947
2015-04-03 19:05:31 +00:00
Mark Lacey
3290b0dd0f Fix run line for real this time.
This test compiles successfully.

Swift SVN r26917
2015-04-02 23:44:37 +00:00
Mark Lacey
c85afb8405 Fix run line of compiler crasher that no longer crashes.
Apparently fixed by tuple-related fixes that went in today.

Swift SVN r26915
2015-04-02 23:25:24 +00:00
Michael Gottesman
0255a5b948 Revert "[stdlib] [Generator|Sequence]Of => Any[Generator|Sequence]"
This reverts commit r26904. Fixing the build.

Swift SVN r26912
2015-04-02 22:55:30 +00:00