Commit Graph

141974 Commits

Author SHA1 Message Date
Egor Zhdan
be972c2ab0 Merge pull request #61354 from apple/egorzhdan/cxx-docs-update
[cxx-interop][docs] Update getting started guide
2022-09-30 13:02:03 +01:00
Alastair Houghton
93c7643498 Merge pull request #61330 from al45tair/eng/PR-100424460
[Demangler] Fix isThunkSymbol() to handle continuations.
2022-09-30 09:00:46 +01:00
Anthony Latsis
18156d1177 Merge pull request #61347 from AnthonyLatsis/migrate-compiler-to-gh-issues
Gardening: Migrate compiler sources to GitHub issues
2022-09-30 10:48:52 +03:00
Alastair Houghton
7d840f1e8e Merge pull request #61352 from al45tair/eng/PR-100236038-2
[Threading] Improve ConditionVariable wait behaviour
2022-09-30 07:31:11 +01:00
swift-ci
27964ad689 Merge pull request #61373 from apple/maxd/ubuntu-2204-gs-md
docs: link to Ubuntu 22.04 deps in `GettingStarted.md`
2022-09-29 22:35:00 -07:00
Alex Lorenz
89813ddd6a Merge pull request #61359 from hyp/eng/stdlib-overlay
[interop][SwiftToCxx] add a Swift stdlib overlay header
2022-09-29 19:12:05 -07:00
Max Desiatov
46a032f0d9 docs: link to Ubuntu 22.04 deps in GettingStarted.md
Currently, only a link to Ubuntu 20.04 dependencies is present. Those dependencies won't work for Ubuntu 22.04.
2022-09-29 22:58:54 +01:00
Hamish Knight
c5268e2388 Merge pull request #61351 from hamishknight/undercover 2022-09-29 22:46:23 +01:00
Anthony Latsis
2843e0c871 Gardening: Migrate compiler sources to GitHub issues 2022-09-29 23:58:55 +03:00
Slava Pestov
a14b5fd913 Merge pull request #61149 from simanerush/unboundGenericType-crash-fix
Sema: Fix compiler crash when resolving Extension declaration with UnboundGenericType
2022-09-29 16:15:45 -04:00
swift-ci
67da6c6469 Merge pull request #61356 from mikeash/re-disable-arm64e-reflection-tests
[Test] Re-disable some Reflection tests on ARM64e.
2022-09-29 12:56:02 -07:00
Arnold Schwaighofer
af640519a5 Merge pull request #61361 from aschwaighofer/no_back_deploy_interpreter_keypath
test/Interpreter/keypath.swift does not work in back-deployment scenarios anymore
2022-09-29 12:00:06 -07:00
Egor Zhdan
e8ae3f7100 [cxx-interop][docs] Update getting started guide
* Do not use `Cxx` as a user module name, since we now ship a built-in module called `Cxx`.
* Describe creating an Xcode target that builds the C++ module.
* Do not provide libc++ include paths manually to the Swift compiler, Swift should detect the C++ stdlib automatically.
2022-09-29 18:47:15 +01:00
Artem Chikin
af276b77f5 Merge pull request #60882 from apple/jan_svoboda/cherry-pick
WIP: [importer] Adjust for new dependency scanner API
2022-09-29 10:20:43 -07:00
nate-chandler
4dec19388b Merge pull request #61344 from nate-chandler/copy-propagation/remove-poison
[CopyPropagation] Removed poison mode.
2022-09-29 10:15:07 -07:00
Slava Pestov
b752d7883c Merge pull request #61346 from slavapestov/test-case-for-protocol-extension-where-clause-typealias
Add missing test case
swift-DEVELOPMENT-SNAPSHOT-2022-09-29-a
2022-09-29 12:16:02 -04:00
Alastair Houghton
d0f42cad11 [Threading][Win32] Fix the wait functions for Win32 to always over-wait.
Rather than bodging the test to make it more robust, fix the functions
in the Threading layer to behave the same as they do on other platforms,
i.e. to guarantee that they always wait *at least* the amount of time
you asked for.

rdar://100236038
2022-09-29 17:01:59 +01:00
Arnold Schwaighofer
f9a56205a3 test/Interpreter/keypath.swift does not work in back-deployment scenarios anymore
The file check expectations (the way we print stuff) is different after #60133.

rdar://100564676
2022-09-29 08:50:13 -07:00
Alastair Houghton
33e74cd1d8 [Threading] Rename chrono.h to match the namespace name.
rdar://100236038
2022-09-29 15:44:29 +01:00
Alex Lorenz
dd7e068391 [interop][SwiftToCxx] add a Swift stdlib overlay header
It currently provides begin and end functions for array iteration
2022-09-29 07:41:54 -07:00
Alastair Houghton
10ab608707 [UnitTests][Threading] Tweak ConditionVariable test for Windows.
Windows' behaviour wrt `Sleep` family functions can be odd.  Apparently,
if you specify a time lower than a system tick, they can return early.
This makes the test flaky when it shouldn't be.  To fix it, we use the
Multimedia functions to adjust the system tick count as low as we can
get it.

rdar://100236038
2022-09-29 15:41:38 +01:00
Mike Ash
373000eb1d [Test] Re-disable some Reflection tests on ARM64e.
These tests are still broken on ARM64e:

Reflection/conformance_descriptors.swift
Reflection/typeref_decoding_imported.swift
Reflection/typeref_decoding_objc.swift
Reflection/typeref_lowering.swift

rdar://100558042
2022-09-29 09:07:20 -04:00
Egor Zhdan
599874a9f4 Merge pull request #61338 from apple/egorzhdan/cxx-string-non-ascii
[cxx-interop] Do not crash for non-ASCII strings
2022-09-29 13:23:58 +01:00
Alastair Houghton
54ea4b2d80 [Demangler] Fix isThunkSymbol() and getThunkTarget() to handle continuations.
`isThunkSymbol()` was returning false for await resume and suspend resume thunks
because the `Node` tree for those has an `AsyncAwaitResumePartialFunction`
and/or `AsyncSuspendResumePartialFunction` as the first child of the top level
`Global`, with the actual thunk in the _second_ child location.

rdar://100424460
2022-09-29 12:17:41 +01:00
Alex Hoppen
71a76ebcf9 Merge pull request #61341 from ahoppen/ahoppen/disable-sourcekit-test-asan
[SourceKit] Disable SourceKit/CompileNotifications/diagnostics.swift in ASAN
2022-09-29 12:25:19 +02:00
Alastair Houghton
fcf3bfa4a6 [Threading] Always round up when converting std::chrono::durations.
We were inadvertently rounding down, which was fine almost 100% of the
time, but on Windows where the timer resolution is only 1ms, it made
the test _very slightly_ flaky because we were asking to wait for
9ms rather than 10ms, then checking we'd waited at least 10ms.

We should explicitly round up, for that reason.

rdar://100236038
2022-09-29 10:31:26 +01:00
Hamish Knight
0b25742b9e [SIL] Remove SILDeclRef::isAnyThunk
This perfectly duplicates the logic in
`SILDeclRef::isThunk`.
2022-09-29 10:08:19 +01:00
Hamish Knight
c9d96bcd01 [Profiler] Assert that we always have function bodies
It seems like this defensive logic was written
back when we could create SILProfilers for
declarations in addition to definitions. Now we
should only ever create SILProfilers for
definitions, so we can assert that we always have
a function body available.
2022-09-29 10:08:18 +01:00
Hamish Knight
0eba486442 [SILGen] Remove setUpForProfiling
Instead, setup the profilers when emitting
function definitions. This is consistent with
what we do for all the other kinds of SILDeclRef.
2022-09-29 10:08:17 +01:00
Hamish Knight
5b1ca3f0e0 [SILGen] Avoid forcing function bodies for profiling
This is no longer necessary now that we ensure we
always SILGen functions that contain user code.
2022-09-29 10:08:17 +01:00
Hamish Knight
bd18c37b82 [Profiler] Adopt SILDeclRef::hasUserWrittenCode
This replaces some of the existing checks, and
ensures that we don't emit coverage maps for
property wrapper backing initializers that don't
contain user code.

rdar://99931619
2022-09-29 10:08:15 +01:00
Hamish Knight
54993b773f Merge pull request #61332 from hamishknight/write-that-down 2022-09-29 09:55:26 +01:00
Anthony Latsis
e1d1760c87 Merge pull request #61141 from AnthonyLatsis/migrate-test-suite-to-gh-issues-28
Gardening: Migrate test suite to GH issues p. 28
2022-09-29 10:01:18 +03:00
Alex Lorenz
cec9cd49dd Merge pull request #61343 from hyp/eng/ship-interop-hdr-toolchain
[interop][SwiftToCxx] install _SwiftCxxInteroperability.h header as p…
2022-09-28 22:01:40 -07:00
Alex Lorenz
43848fdb14 Merge pull request #61342 from apple/eng/fwd-decl-no-bridge
[interop][SwiftToCxx] forward declare - do not use bridged types in C…
2022-09-28 21:57:59 -07:00
Slava Pestov
649e6a6778 Add missing test case 2022-09-28 22:41:45 -04:00
Sima Nerush
fb49d8a445 Sema: Fix compiler crash when resolving Extension declaration with Unbound Generic Type 2022-09-28 18:33:14 -07:00
Nate Chandler
129dadbe70 [CopyPropagation] Removed poison mode.
The Onone strategy will be to shorten lifetimes as little as possible
while eliminating as many copies as are eliminated at -O.
2022-09-28 17:13:24 -07:00
Alex Lorenz
a24ebeaa51 [interop][SwiftToCxx] install _SwiftCxxInteroperability.h header as part of compiler build, not stdlib
The _SwiftCxxInteroperability.h is too tightly coupled to the compiler right now and should not be shipped with the standard library. In the future it could be moved back to the standard library.
2022-09-28 16:14:33 -07:00
Alex Lorenz
1336277bdc Merge pull request #61331 from hyp/eng/stdlib-one-header-dep
[interop][SwiftToCxx] add support for emitting Swift stdlib dependenc…
2022-09-28 14:28:45 -07:00
Alex Lorenz
3dfcb96ad5 [interop][SwiftToCxx] forward declare - do not use bridged types in C++ mode
This allows SDK's stdlib Array to correctly decl String forward declaration
2022-09-28 14:11:13 -07:00
Mike Ash
410a4ee66c Merge pull request #61248 from mikeash/reenable-arm64e-reflection-tests
[Test] Reenable Reflection tests disabled on ARM64e.
2022-09-28 16:48:33 -04:00
Alex Hoppen
6a4f929b19 [SourceKit] Disable SourceKit/CompileNotifications/diagnostics.swift in ASAN
Disable the test case while we are investigating.
2022-09-28 21:50:48 +02:00
swift-ci
ea21d79285 Merge pull request #61209 from keith/ks/handle-driver-mode-when-using-new-driver
Handle --driver-mode= when using new driver
2022-09-28 12:45:15 -07:00
swift-ci
dcd35fa1cf Merge pull request #61336 from eeckstein/fix-array-test
fix the readonly_arrays.swift test
2022-09-28 12:31:15 -07:00
Eric Miotto
cc454f650f Clear up stale values for swift-darwin-supported-archs from CMake caches (#61333)
This will prevent weird build failures when a run was made with the
argument set.
2022-09-28 11:58:04 -07:00
Egor Zhdan
dc8ff65195 [cxx-interop] Do not crash for non-ASCII strings
This fixes a crash that happened when creating an instance of `std::string` from a `Swift.String` that contains non-ASCII characters.

When converted to a UTF-8 array, such characters might be represented by numbers that fall out of `CChar`'s boundaries if they have a sign bit set to 1. This is normal and shouldn't trigger a crash or an assertion failure.
2022-09-28 18:30:20 +01:00
swift-ci
51d937cf2a Merge pull request #61276 from mikeash/fix-concurrent-type-by-name-again
[Runtime] Fix concurrent lookups of types by name (again).
2022-09-28 10:22:53 -07:00
Artem Chikin
c5bd61bf25 [Dependency Scanning] Adapt 'ClangModuleDependencyScanner' output to clang frontend-only results coming from scan-deps 2022-09-28 09:00:59 -07:00
Erik Eckstein
662a051941 fix the readonly_arrays.swift test
Also, add a comment for the changed metadata symbol name for static read-only arrays.
2022-09-28 17:32:33 +02:00