Commit Graph

7628 Commits

Author SHA1 Message Date
Alex Hoppen
97368698d4 Merge pull request #59664 from ahoppen/pr/cast-with-no-type
[TypeChecker] Don’t crash if a ExplicitCastExpr doesn’t have a cast type
2022-06-29 09:31:38 +02:00
swift-ci
aa5f56d983 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-28 16:53:21 -07:00
Anthony Latsis
087eba83a2 Merge pull request #59757 from AnthonyLatsis/close-issues-2
Add regression tests to close several issues p. 2
2022-06-29 02:48:54 +03:00
swift-ci
408a2417ec Merge remote-tracking branch 'origin/main' into rebranch 2022-06-28 03:14:28 -07:00
Egor Zhdan
6754c3cf82 [cxx-interop] Add CxxSequence protocol to the stdlib overlay
This change adds basic helper protocols and structs that are going to be used for making C++ sequences and collection safe and Swifty by adding conformances to `Swift.Sequence`, `Swift.Collection`, etc.

This is not meant to be a final design.
2022-06-27 20:40:12 +01:00
Alex Hoppen
28a8e0762d [TypeChecker] Don’t crash if a ExplicitCastExpr doesn’t have a cast type
If the type of an `ExplicitCastExpr` is not valid, it is a null type, which causes a crash when checking if the cast type has parameterized existentials.

rdar://95629905
2022-06-27 17:21:53 +02:00
Anthony Latsis
7158760dbb Add fixed crasher to close #43187 2022-06-24 05:03:28 +03:00
swift-ci
28c78ed05b Merge remote-tracking branch 'origin/main' into rebranch 2022-06-23 10:54:26 -07:00
Anthony Latsis
15acfa9a5b Merge pull request #59535 from AnthonyLatsis/close-issues-1
Add regression tests to close some issues
2022-06-23 20:43:51 +03:00
Anthony Latsis
767423a3c9 Add regression test to close #59572 2022-06-22 22:17:33 +03:00
swift-ci
b8f39b56be Merge remote-tracking branch 'origin/main' into rebranch 2022-06-22 09:15:09 -07:00
Alejandro Alonso
95da55b182 [stdlib] Implement String.WordView (#42414)
* Implement String.WordView

* Add isWordAligned bit

* Hide WordView for now (also separate Index type)

add bidirectional conformance

Fix tests

* Address comments from Karoy and Michael

* Remove word view, use index methods

* Address Karoy's comments

aaa
2022-06-22 09:10:09 -07:00
Tim Kientzle
ea54c3ba40 First sketch of indirect enum support
This is basically an attempt to expand the test harness
to fully dump indirect enums using the existing RemoteMirror
facilities.
2022-06-16 09:54:49 -07:00
swift-ci
b6539ba8fe Merge remote-tracking branch 'origin/main' into rebranch 2022-06-14 20:54:35 -07:00
Alejandro Alonso
2a2f70f944 Fix tests who aren't using %target-cpu (#59433)
don't import string processing
2022-06-14 20:39:03 -07:00
swift-ci
c947fe7457 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-14 13:55:04 -07:00
Doug Gregor
774a94f69d Make sure we can dig out the (distributed) actor from an archetype.
Fixes #59356 / rdar://94976378.
2022-06-14 10:57:29 -07:00
swift-ci
ed378ecae8 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-13 19:54:01 -07:00
Karoy Lorentey
3bd45ec979 Merge pull request #59417 from lorentey/fix-generic-set-intersection
[stdlib] Fix handling of duplicate items in generic `Set.intersection`
2022-06-13 19:46:27 -07:00
swift-ci
0ad0a83c3f Merge remote-tracking branch 'origin/main' into rebranch 2022-06-13 16:53:32 -07:00
Alejandro Alonso
1891677f3e Remove StringMemoryTest (#59413) 2022-06-13 16:34:07 -07:00
Karoy Lorentey
01d7b5799c [stdlib] Fix handling of duplicate items in generic Set.intersection
If the sequence passed to `Set.intersection` has exactly as many duplicate items as items missing from `self`, then the new implementation in 5.6 will mistakenly return `self` unchanged. (It counts duplicate hits as distinct items in the result.)

rdar://94803458
2022-06-13 14:12:48 -07:00
swift-ci
d6fceb79c5 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-13 11:53:47 -07:00
Karoy Lorentey
2da382dc6b Merge pull request #59243 from rctcwyvrn/lily-dictionary-optimization
Optimize Dictionary.filter for native dictionaries
2022-06-13 11:47:12 -07:00
swift-ci
fe9cb517c7 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-10 19:13:29 -07:00
Andrew Trick
cafe5ccbd1 Merge pull request #59308 from atrick/comment-fixedpoint-test
Remove a FIXME from validation-test/stdlib/FixedPoint.swift.gyb
2022-06-10 19:01:42 -07:00
swift-ci
1fc7eb905e Merge remote-tracking branch 'origin/main' into rebranch 2022-06-10 18:53:38 -07:00
Slava Pestov
56f2f44592 Merge pull request #59369 from slavapestov/rqm-unavailable-conformance-fix
RequirementMachine: Fix handling of unavailable Sendable conformances in concretizeNestedTypesFromConcreteParent()
2022-06-10 21:41:10 -04:00
Slava Pestov
0254c0ee7c RequirementMachine: Fix handling of unavailable Sendable conformances in concretizeNestedTypesFromConcreteParent()
We can't just ignore unavailable conformances because the
generic signature we're computing might itself be attached
to an unavailable declaration.

Until we get a proper fix, only drop unavailable conformances
to Sendable here.

Fixes rdar://problem/94305457.
2022-06-10 17:46:40 -04:00
swift-ci
1ee42620c7 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-09 11:53:31 -07:00
swift-ci
48ee0a6cff Merge pull request #59279 from buttaface/droid
[android][test] Fix several tests on the Android CI
2022-06-09 11:40:21 -07:00
swift-ci
3f0d94e444 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-09 10:13:28 -07:00
Pavel Yaskevich
5ed21c6842 Merge pull request #59328 from xedin/rdar-94619388
[TypeChecker/CodeCompletion] Re-introduce expression sanitization bef…
2022-06-09 10:03:47 -07:00
swift-ci
3597ca75f0 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-09 02:52:39 -07:00
Alastair Houghton
a9fe9716da Merge pull request #59287 from al45tair/eng/PR-90776105-2
[Build][Runtime] Add a new threading library.
2022-06-09 02:41:53 -07:00
Butta
3933fc0006 [android][test] Fix several tests on the Android CI
- #58975 switched many tests from XFAIL on linux to linux-gnu, so seven
  fail on the Android CI and two natively. They are now explicitly excluded.
- #39605 added several C++ Interop tests, 11 of which fail on the Android CI,
  so disable them for now.
- #42478 removed the @noescape attribute for the non-Android
  SIL/clang-function-types tests, so I remove it for Android too.
- My pull #40779 moved the Swift pointer tags to the second byte, so
  SILOptimizer/concat_string_literals.64 will need to be updated for that,
  disabled it for now.
- Compiler-rt moved the directory in which it places those libraries for
  Android, llvm/llvm-project@a68ccba, so lit.cfg is updated for that.
2022-06-09 14:35:41 +05:30
Pavel Yaskevich
3159591234 [TypeChecker/CodeCompletion] Re-introduce expression sanitization before solving
A call to `SanitizeExpr` has been incorrectly removed from
`typeCheckForCodeCompletion` by refactoring to use `ASTNode`.

It is still required because fallback calls could have partially
type-checked AST.

Resolves: https://github.com/apple/swift/issues/59315
Resolves: rdar://94619388
2022-06-08 13:26:54 -07:00
swift-ci
4e68d78107 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-08 13:15:12 -07:00
Pavel Yaskevich
965a54f037 Merge pull request #59304 from xedin/rdar-94506352
[CSClosure] Fix handling of property wrapped pattern bindings
2022-06-08 13:11:53 -07:00
Alex Hoppen
55051a71b2 [test] Explicitly specify --cmake %cmake for build_lld.test
I believe this was causing CMake to get built for the test case and make the test case take ~5min on Linux instead of ~15sec.
2022-06-08 18:36:19 +02:00
Andrew Trick
9db9c1438e Remove a FIXME from validation-test/stdlib/FixedPoint.swift.gyb
Leave this test in long_test because it takes so long to compile. This
issue has nothing to do with the FIXME comment.
2022-06-07 18:02:26 -07:00
Pavel Yaskevich
066bbd18eb [CSClosure] Fix handling of property wrapped pattern bindings
Property wrappers trigger initializer synthesis. Synthesized
initializers should not be re-typechecked when encountered e.g.
 while re-solving closure with a different contextual type.

Resolves: https://github.com/apple/swift/issues/59294
Resolves: rdar://94506352
2022-06-07 13:41:53 -07:00
Alastair Houghton
f5bdb858e0 [Threading] Create new threading library and use it.
Moved all the threading code to one place.  Added explicit support for
Darwin, Linux, Pthreads, C11 threads and Win32 threads, including new
implementations of Once for Linux, Pthreads, C11 and Win32.

rdar://90776105
2022-06-07 07:39:51 +01:00
Alastair Houghton
0cf687aa2b [Build][Runtime] Replace SWIFT_STDLIB_SINGLE_THREADED_RUNTIME.
SWIFT_STDLIB_SINGLE_THREADED_RUNTIME is too much of a blunt instrument here.
It covers both the Concurrency runtime and the rest of the runtime, but we'd
like to be able to have e.g. a single-threaded Concurrency runtime while
the rest of the runtime is still thread safe (for instance).

So: rename it to SWIFT_STDLIB_SINGLE_THREADED_CONCURRENCY and make it just
control the Concurrency runtime, then add a SWIFT_STDLIB_THREADING_PACKAGE
setting at the CMake/build-script level, which defines
SWIFT_STDLIB_THREADING_xxx where xxx depends on the chosen threading package.

This is especially useful on systems where there may be a choice of threading
package that you could use.

rdar://90776105
2022-06-07 07:39:51 +01:00
swift-ci
44cd35310e Merge remote-tracking branch 'origin/main' into rebranch 2022-06-06 11:53:15 -07:00
Anthony Latsis
7a11b43058 Merge pull request #59271 from AnthonyLatsis/sr-2063
Add regression tests to close several fixed issues
2022-06-06 21:50:41 +03:00
Anthony Latsis
4bcb3713d0 Add regression test to close #56100 2022-06-05 21:59:10 +03:00
Lily Lin
fbd70fe6eb Fix build error for linux builds and add basic validation test 2022-06-03 15:26:06 -07:00
swift-ci
4b0a85f076 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-02 10:34:25 -07:00
Pavel Yaskevich
27419446b6 Merge pull request #59064 from xedin/issue-59058
[CSSimplify] If function types mismatch on labels record a contextual…
2022-06-02 10:18:54 -07:00