Skip to content

[pull] swiftwasm from main #3077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2,998 commits into from
Closed
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
2998 commits
Select commit Hold shift + click to select a range
fafc1e0
git: ensure that dosbatch files use CRLF for line endings
compnerd Aug 22, 2021
46b45b6
Merge pull request #38980 from compnerd/artifacts
compnerd Aug 22, 2021
00124ea
Merge pull request #38979 from nkcsgexi/compile-interface-gen-abi-bas…
nkcsgexi Aug 22, 2021
fe4ba18
[Distributed] Ensure _remote funcs synthesized before dynamic replace…
ktoso Aug 23, 2021
beaf8a3
Revert "[Distributed] Ensure _remote funcs synthesized before dynamic…
ktoso Aug 23, 2021
56cfab2
libswift: add more instruction classes
eeckstein Aug 20, 2021
edf0ba0
libswift: add UseList.isSingleUse property
eeckstein Aug 20, 2021
90c71ad
libswift: improve and simplify pass invocation
eeckstein Aug 20, 2021
8be0ca0
SIL optimizer: remove unbalanced retains/releases from immortal objects
eeckstein Aug 20, 2021
68d72cd
Merge pull request #38993 from ktoso/wip-revert-38974
swift-ci Aug 23, 2021
b371b44
Add SE-0315 to the changelog (#38976)
Jumhyn Aug 23, 2021
f6ae9f3
Revert "Merge pull request #38938 from drexin/wip-dist-resolve" (#38994)
ktoso Aug 23, 2021
fe3d329
[Tests] Mark TypeRoundTrip as unsupported on use_os_stdlib.
al45tair Aug 23, 2021
9bec7c2
[test] Disable a couple of AutoDiff tests
hamishknight Aug 23, 2021
474eafd
Merge pull request #38996 from hamishknight/disable-couple-of-tests
hamishknight Aug 23, 2021
6976ead
[Tests] Don't use dirname() - it isn't safe. Also, use asprintf().
al45tair Aug 23, 2021
67db14e
Merge pull request #38995 from al45tair/problem/82171600
swift-ci Aug 23, 2021
6b219a9
[stdlib] fix another accidental infinite-recursion bug (#38950)
glessard Aug 23, 2021
deb02c1
Merge pull request #38951 from eeckstein/fix-cmo-crash
eeckstein Aug 23, 2021
cf33010
[Test] Remove test/Constraints/trailing_closures_objc.swift.
hborla Aug 23, 2021
01a7a0e
Merge pull request #38985 from xedin/improve-pointer-diagnostics
xedin Aug 23, 2021
6752925
Merge pull request #38973 from eeckstein/simplify-retain-release
eeckstein Aug 23, 2021
2460639
Merge pull request #38986 from varungandhi-apple/vg-refactor-runtime-…
varungandhi-apple Aug 23, 2021
4b826b7
[Gardening] Document An ABI Breaking Case For Moving Extension Members
CodaFi Aug 23, 2021
d195b09
Update the Simulator device to iPhone 12
shahmishal Aug 23, 2021
76c4ac8
Add a temporary flag to stage in back-deployment of concurrency.
DougGregor Aug 23, 2021
9518286
Merge pull request #38912 from xedin/generalize-unitialized-var-target
xedin Aug 23, 2021
7249903
Merge pull request #38999 from hborla/remove-trailing-closures-objc-test
hborla Aug 23, 2021
1e22b92
Switch Test to the Mock SDK
CodaFi Aug 23, 2021
259cf54
Merge pull request #39008 from CodaFi/mockito
swift-ci Aug 23, 2021
d7f5dc4
ABIChecker: diagnose mangled name changes
nkcsgexi Aug 23, 2021
9b8d9e2
Merge pull request #38981 from apple/skip-underscore
bnbarham Aug 24, 2021
382f04a
Do not set alignment and don't set disableAddressSanitizer on @llvm.u…
kubamracek Aug 24, 2021
7c29aaf
Sema: Fix generics invariant violations in override checking
slavapestov Aug 21, 2021
62e7139
Disable bincompat checks in Bincompat.cpp when SWIFT_RUNTIME_OS_VERSI…
kubamracek Aug 24, 2021
c079c08
Split SWIFT_DARWIN_PLATFORMS and SWIFT_APPLE_PLATFORMS in CMake. SWIF…
kubamracek Aug 24, 2021
aaff37f
Add a SWIFT_STDLIB_HAS_DARWIN_LIBMALLOC flag to allow/disallow uses o…
kubamracek Aug 24, 2021
855eeaf
Fix ci test failure
RAJAGOPALAN-GANGADHARAN Aug 24, 2021
d43ea45
Revert "Revert "Merge pull request #38938 from drexin/wip-dist-resolv…
drexin Aug 24, 2021
7e001ec
Merge pull request #38960 from al45tair/problem/82124292
al45tair Aug 24, 2021
c916c0a
[Distributed] decode init for DistributedActor (#38998)
ktoso Aug 24, 2021
e1bfc46
Merge pull request #39003 from CodaFi/abitis
CodaFi Aug 24, 2021
67e34d5
ClosureSpecializer: avoid an infinite optimization loop.
eeckstein Aug 23, 2021
ee43ea8
[Distributed] fix AnyActorIdentity equality impl
ktoso Aug 24, 2021
549460d
Merge pull request #39019 from ktoso/wip-ktoso-assign-self-decode
swift-ci Aug 24, 2021
eae515c
Only run executable tests (--only-executable-test) with standalone st…
kubamracek Aug 24, 2021
bcbe8e7
Remove SWIFTLIB_SINGLE_TARGET_LIBRARY (#38978)
kubamracek Aug 24, 2021
4c5e22f
Merge pull request #39010 from nkcsgexi/diff-demangled
nkcsgexi Aug 24, 2021
b201d48
Merge pull request #39015 from slavapestov/override-generics-checking
slavapestov Aug 24, 2021
07f889f
Merge pull request #39005 from apple/shahmishal-patch-1
shahmishal Aug 24, 2021
57c4b6a
[ResultBuilders] Fix handling of multiple pattern bindings
xedin Aug 24, 2021
6f938c3
Sema: Prefer lookupDirect() over getMembers() for iterating over cons…
slavapestov Aug 24, 2021
bffce66
SourceKit: Don't call subst() with generic parameters that don't exis…
slavapestov Aug 24, 2021
7fd5d46
Revert "[test] Disable a couple of AutoDiff tests"
hamishknight Aug 24, 2021
1a394e8
AST: repair the build after #39010
compnerd Aug 24, 2021
67416a5
Merge pull request #39026 from apple/compnerd/39010
shahmishal Aug 24, 2021
0a292fd
Differentiation: correct the storage annotation for runtime functions
compnerd Aug 24, 2021
609ca72
[ConstraintSystem] Store pattern binding associated with uninitialize…
xedin Aug 24, 2021
cda25b7
IRGen: Mangle DWARF types with the right generic signature
slavapestov Aug 25, 2021
2f0ce4c
IRGen: GenericContextScope always resets CurGenericSignature to old v…
slavapestov Aug 25, 2021
685f3f2
AST: Use correct generic signature to mangle retroactive conformances
slavapestov Aug 25, 2021
178804c
[silgen] Mark CleanupManager::dump() as used and wrap it in a debugge…
gottesmm Aug 25, 2021
be922b9
[silgen] Ensure that the outer cleanup is emitted along failure paths…
gottesmm Aug 25, 2021
4a3ffd3
Merge pull request #39004 from eeckstein/fix-closure-specializer
eeckstein Aug 25, 2021
0045fe3
Merge pull request #39036 from gottesmm/pr-9b9cc7e94e7e77a3db8df6cfb0…
swift-ci Aug 25, 2021
fcfad6c
[test] Add %target-codesign to BigInt.swift
hamishknight Aug 25, 2021
85d5d46
Merge pull request #39023 from slavapestov/sourcekit-subst-map-cleanup
slavapestov Aug 25, 2021
3be3a36
Merge pull request #39022 from slavapestov/sema-remove-some-get-membe…
slavapestov Aug 25, 2021
de21ba6
Merge pull request #39035 from slavapestov/irgen-wrong-signature
slavapestov Aug 25, 2021
d5c0469
[Concurrency] Replace SWIFT_TASK_PRINTF_DEBUG with a SWIFT_TASK_DEBUG…
mikeash Aug 25, 2021
3e93958
[Tests] Disable RemoteMirror/interop on use_os_stdlib builds.
al45tair Aug 25, 2021
ae2f9eb
Merge pull request #39024 from apple/revert-38996-disable-couple-of-t…
hamishknight Aug 25, 2021
073c6f1
Merge pull request #39020 from xedin/fix-decls-with-multiple-patterns
xedin Aug 25, 2021
83cc918
Merge pull request #39031 from xedin/fix-uninit-var-pattern-binding
xedin Aug 25, 2021
1506188
Merge pull request #38992 from compnerd/crlf
compnerd Aug 25, 2021
e4d099f
Merge pull request #39043 from al45tair/problem/82124292
swift-ci Aug 25, 2021
1491232
Merge pull request #39040 from hamishknight/fix-test-crash
shahmishal Aug 25, 2021
29e26eb
Merge pull request #39044 from DougGregor/back-deploy-flag
swift-ci Aug 25, 2021
4c9cb0c
Fix use-after-free in DestroyHoisting
meg-gupta Aug 19, 2021
5882e03
Merge pull request #38819 from etcwilde/ewilde/remove-runAsyncAndBloc…
etcwilde Aug 25, 2021
37ee480
Merge pull request #39037 from gottesmm/pr-47b8f7980de816ebf7790df2bf…
gottesmm Aug 25, 2021
51231e4
ASTMangler: Pass around generic signature explicitly and remove CurGe…
slavapestov Aug 25, 2021
ed75273
ASTMangler: Use the right generic signature when mangling conformance…
slavapestov Aug 25, 2021
37e9c7b
Add a flag to only view the shape of the cfg and disable instruction …
meg-gupta Aug 25, 2021
45eaaa2
Merge pull request #39042 from mikeash/swift-task-debug-printf-cleanup
swift-ci Aug 25, 2021
b5dbb69
[Sema][SR-14408] Increase the impact of missing member fix when membe…
LucianoPAlmeida Aug 25, 2021
41e31e4
[tests] Add regression diagnostics tests for SR-14408
LucianoPAlmeida Aug 25, 2021
f3b7706
[SIL] Added defined flag to begin_borrow.
nate-chandler Aug 25, 2021
e983655
disable concurrentTypeByName test to unblock CI
kavon Aug 25, 2021
eecaa44
disable SourceKit/Sema/sema_build_session.swift to unblock CI
kavon Aug 26, 2021
9024f95
Update the Xcode version to Xcode 13 beta 4
shahmishal Aug 26, 2021
7c1ed40
[Distributed] the distributed module may not be available
ktoso Aug 26, 2021
9ab8763
Merge pull request #38965 from meg-gupta/fixdestroyhoisting
meg-gupta Aug 26, 2021
e97e07a
Fix SIL parsing of ownership qualifiers.
atrick Aug 26, 2021
15aff43
Revert "Revert "[build-script] Use a builder to setup pass pipelines …
gottesmm Aug 24, 2021
09ea921
Merge pull request #39055 from ktoso/wip-fix-compute-mutable-self-in-…
swift-ci Aug 26, 2021
49b33bb
[Distributed] Remove unused code from SILGenDistributed (#39052)
drexin Aug 26, 2021
1a92b17
Merge pull request #39049 from slavapestov/mangler-generic-signature-…
slavapestov Aug 26, 2021
923aeac
[Distributed] always emit the distributed thunk
ktoso Aug 26, 2021
fb097ae
RequirementMachine: Relax cross-check assert for areSameTypeParameter…
slavapestov Aug 11, 2021
e29b081
RequirementMachine: Dump conformance access paths
slavapestov Aug 21, 2021
463d591
RequirementMachine: Verify that generic parameter symbols are valid w…
slavapestov Aug 21, 2021
e270ab4
Merge pull request #39056 from ktoso/wip-always-emit-distributed-thunk
swift-ci Aug 26, 2021
0a0926b
Merge pull request #39034 from gottesmm/pr-6e394897459d5200a1d5412f2a…
gottesmm Aug 26, 2021
90d8816
[Distributed] Move property synthesis to DerivedConformanceDistribute…
ktoso Aug 25, 2021
e408fa9
[Distributed] unlock distributed_actor_deinit test again
ktoso Aug 25, 2021
fa1b4b2
fix test: decl/protocol/special/DistributedActor.swift
ktoso Aug 25, 2021
a1ae362
[Distributed] remove duplicated code
ktoso Aug 25, 2021
1669fb4
introducer
ktoso Aug 25, 2021
1f9fbed
Merge pull request #39039 from LucianoPAlmeida/SR-14408-ambiguity-enum
LucianoPAlmeida Aug 26, 2021
ec67d1b
COWOpts: handle debug_value instructions
eeckstein Aug 26, 2021
351f6e7
[Tests] Disable RemoteMirror/interop for remote run tests.
al45tair Aug 26, 2021
1aafbed
Merge pull request #39050 from nate-chandler/lexical_lifetimes/borrow…
nate-chandler Aug 26, 2021
0ace8fe
Merge pull request #39054 from atrick/fix-ossa-parse
atrick Aug 26, 2021
3f749dc
Add an option to build the concurrency library for back deployment.
DougGregor Aug 25, 2021
f2995a3
Optionally build the compiler and _Concurrency library for back deplo…
DougGregor Aug 26, 2021
602937d
Clean up build-script test failures and linter errors
DougGregor Aug 26, 2021
ebd7b49
Build compiler, other libraries, and tests for back-deployed concurre…
DougGregor Aug 26, 2021
6d5b0c7
Merge pull request #39060 from al45tair/problem/82124292
swift-ci Aug 26, 2021
a35ae7a
Merge pull request #39057 from slavapestov/minor-rqm-tweaks
slavapestov Aug 26, 2021
5357a1d
Merge pull request #39048 from meg-gupta/viewcfgfix
meg-gupta Aug 26, 2021
ce7358d
SIL: create hop_to_executor instructions with "auto-generated" debug …
eeckstein Aug 26, 2021
4a63884
Add missing Sendable requirements and a conformance
DougGregor Aug 26, 2021
51e4fd2
Address a few more warnings in the concurrency library
DougGregor Aug 26, 2021
9de5d6e
Merge pull request #39059 from eeckstein/fix-perf-regressions
eeckstein Aug 26, 2021
07a85b4
[Sema] Build the TRC for delayed functions bodies
xymus Aug 24, 2021
3fc18f3
Merge pull request #39062 from DougGregor/concurrency-lib-sendable-pa…
swift-ci Aug 26, 2021
f96057e
Merge pull request #33767 from theblixguy/chore/remove-self-or-associ…
ktoso Aug 26, 2021
b6f6713
Merge pull request #39051 from DougGregor/concurrency-back-deploy-lib…
DougGregor Aug 26, 2021
c868bdd
[Distributed] resolve synthesis via DerivedConformanceDistributedActo…
ktoso Aug 26, 2021
c0607b3
Revert "Merge pull request #33767 from theblixguy/chore/remove-self-o…
kavon Aug 26, 2021
4681d41
Merge pull request #39046 from ktoso/wip-derive-style
swift-ci Aug 26, 2021
4f149d0
[build-script] Split the build-script-impl pipeline into two pipeline…
gottesmm Aug 16, 2021
bc8657b
Merge pull request #39067 from kavon/revert-unlock-existential
kavon Aug 26, 2021
2800464
[Typechecker] Drop the 'Self or associated type' diagnostic
theblixguy Sep 2, 2020
61c8f86
Enable concurrency back deployment in CI configurations.
DougGregor Aug 26, 2021
f150ad0
Don't build the benchmarks part of toolchain build
shahmishal Aug 27, 2021
4a058ae
Fix test/stdlib/VarArgs.swift on the minimal/standalone bot (#39029)
kubamracek Aug 27, 2021
e6ced29
[Demangler] Fix incorrect assertions in OldRemangler and NodePrinter.
al45tair Aug 27, 2021
a168227
[testing] Add missing `REQUIRES: concurrency`
davezarzycki Aug 27, 2021
9043c7d
[testing] Add missing `-lm`
davezarzycki Aug 27, 2021
8be85c0
[Sema] Have isValidTypeExprParent consider its child
hamishknight Aug 27, 2021
f6d0723
Merge pull request #39070 from davezarzycki/pr39070
swift-ci Aug 27, 2021
db65543
Merge pull request #39072 from davezarzycki/pr39072
swift-ci Aug 27, 2021
e235256
Merge pull request #38888 from gottesmm/stage2-swift-split-build-scri…
gottesmm Aug 27, 2021
6d6c2e6
[build-script] Add `--install-back-deploy-concurrency`.
DougGregor Aug 27, 2021
497751b
Install the back-deployment concurrency libraries in most configurati…
DougGregor Aug 27, 2021
65c9a8f
[Sema] Test that we don't generate a TRC for skipped functions
xymus Aug 27, 2021
ac485b0
[CSApply] Mark initializer as checked after it is set
xedin Aug 27, 2021
418e87e
[CSApply] Adjust flags for un-initialized pattern coercion
xedin Aug 27, 2021
0e13fcd
Merge pull request #38750 from RAJAGOPALAN-GANGADHARAN/sr_14122
varungandhi-apple Aug 27, 2021
de1dc0e
[TypeChecker] Only type-check default initializer when computing prop…
xedin Aug 27, 2021
646df73
disabling flaky test to unblock CI
kavon Aug 27, 2021
027a41d
Merge pull request #39077 from kavon/disable-flaky-test
kavon Aug 27, 2021
49547a5
[NFC][Basic] Import llvm::isa_and_nonnull to 'swift' namespace
rintaro Aug 27, 2021
aa3e7fb
Fix Python linting/testing issues
DougGregor Aug 27, 2021
53d65b0
Merge pull request #39064 from xymus/rdar82269657
xymus Aug 27, 2021
b519489
[IRGen] Support back-deployment of concurrency-related function types.
varungandhi-apple Aug 27, 2021
75a5831
Build the back-deployed _Concurrency library with an `@rpath` install…
DougGregor Aug 27, 2021
8224df3
Merge pull request #38913 from akyrtzi/link-with-demangle-along-with-…
akyrtzi Aug 27, 2021
d3523d3
Merge pull request #39073 from hamishknight/i-understood-that-reference
hamishknight Aug 27, 2021
0573f1e
[Test] Add back-deployed concurrency library path for runtime OS testing
DougGregor Aug 27, 2021
bbd516f
Merge pull request #39069 from apple/shahmishal/dont-build-benchmarks
shahmishal Aug 28, 2021
f9a951e
[CMake] Normalize boolean spelling for lit.site.cfg comparisons
bnbarham Aug 28, 2021
8ae8f1d
[Completion] Remove unused DocWords
bnbarham Aug 27, 2021
857490e
Merge pull request #39078 from rintaro/isa_and_nonnull
rintaro Aug 28, 2021
73a1353
Infer a reasonable build subdirectory when building a toolchain
DougGregor Aug 28, 2021
9f1fedb
WIP serialization, many files etc
ktoso Aug 28, 2021
e004e6a
[Distributed] fix access level of synthesized default dist init
ktoso Aug 28, 2021
529abee
Merge pull request #39061 from DougGregor/concurrency-back-deploy-lib…
DougGregor Aug 28, 2021
20f9be1
[testing] Add missing `REQUIRES: standalone_build`
davezarzycki Aug 28, 2021
36f25c3
ClangImporter: teach clang importer to import Clang SPI symbols and m…
nkcsgexi Aug 26, 2021
8b32792
Merge pull request #39088 from davezarzycki/pr39088
swift-ci Aug 28, 2021
3616872
Merge pull request #39068 from nkcsgexi/73902734
nkcsgexi Aug 28, 2021
9d4ce58
Merge pull request #38930 from DougGregor/concurrency-compatibility-l…
DougGregor Aug 29, 2021
5999743
Enable concurrency back-deployment in the compiler by default.
DougGregor Aug 29, 2021
7763528
[Distributed] Harden distributed_actor_deinit.swift
ktoso Aug 29, 2021
51176d4
Fix diagnostics to produce valid rename fixit for SubscriptExpr
mininny Aug 28, 2021
a82dda5
Always use the older available for concurrency in tests
DougGregor Aug 29, 2021
2950c38
Merge pull request #39090 from DougGregor/back-deploy-concurrency-com…
DougGregor Aug 29, 2021
d377749
Merge pull request #39063 from eeckstein/fix-hte-debuginfo
eeckstein Aug 30, 2021
d9110de
Merge pull request #39071 from al45tair/problem/82252704
al45tair Aug 30, 2021
d76690e
[Distributed] improve getting _remote funcs; cache gets
ktoso Aug 30, 2021
a9a1a15
Merge pull request #39076 from varungandhi-apple/vg-concurrency-mangling
varungandhi-apple Aug 30, 2021
9cb3702
[Driver] Make -library-level a driver argument and pass it to the fro…
xymus Aug 30, 2021
2fe8d03
Disable job-based dispatch integration in the back-deployed library.
DougGregor Aug 30, 2021
c126988
[ConstraintSystem] Allow IUO types to be unrelated while forming a di…
xedin Aug 30, 2021
ccaa670
Docs: Reattach, rewrite and rename the «associated-type-requirements»…
AnthonyLatsis Aug 16, 2021
a864d4e
Don't enable GlobalISel on arm64e
aschwaighofer Aug 30, 2021
db6cec9
caches: add a cache for a i686 build of the runtime on Windows
compnerd Aug 30, 2021
7aa00e8
build: repair the sub-build for libdispatch on Windows i686
compnerd Aug 30, 2021
38c8544
Merge pull request #39087 from ktoso/wip-serialization-dist
ktoso Aug 30, 2021
af9b5b9
Merge pull request #39098 from aschwaighofer/disable_global_isel_arm64e
swift-ci Aug 30, 2021
1a756d1
Merge pull request #39079 from xedin/pb-application-improvements
xedin Aug 30, 2021
4336084
Merge pull request #39094 from xymus/driver-library-level
xymus Aug 30, 2021
0c122a5
Merge pull request #38673 from buttaface/skip-clean
swift-ci Aug 30, 2021
6fd85ac
Clone exclusivity save/restore for tasks into back-deployment library
DougGregor Aug 30, 2021
0a0dcac
Merge pull request #39085 from apple/normalize-bools
bnbarham Aug 31, 2021
a375ffe
Merge pull request #39084 from apple/remove-keywords
bnbarham Aug 31, 2021
5d2c887
Limit test to macOS
DougGregor Aug 31, 2021
068291c
Merge pull request #39104 from DougGregor/limit-test
DougGregor Aug 31, 2021
4bdc8e3
Copy the code units into a temporary buffer in the invalid UTF8 handl…
Catfish-Man Aug 31, 2021
8e1e167
Merge pull request #39096 from xedin/rdar-80271666-take-2
xedin Aug 31, 2021
f6f756e
[Concurrency] repair cooperative global executor (#39092)
kateinoigakukun Aug 31, 2021
3e8b076
PR Review
mininny Aug 31, 2021
adbfc75
Merge pull request #39028 from compnerd/swiftDifferentiationRuntime
compnerd Aug 31, 2021
a7e999e
Merge pull request #39101 from compnerd/targets
compnerd Aug 31, 2021
cec3e11
[build][test] Don't test '--skip-clean-xctest' on Darwin as the sourc…
finagolfin Aug 31, 2021
ce17877
Remove unnecessary _fixLifetime
Catfish-Man Aug 31, 2021
45b74bd
Merge pull request #39108 from buttaface/macos-xctest
shahmishal Aug 31, 2021
52f9c77
Revert "Remove unnecessary _fixLifetime"
Catfish-Man Aug 31, 2021
4209361
Revert "Copy the code units into a temporary buffer in the invalid UT…
Catfish-Man Aug 31, 2021
8914430
Keep the __StringStorage alive while we're using its buffer
Catfish-Man Aug 31, 2021
d844d0b
Merge pull request #39102 from DougGregor/back-deploy-standalone
DougGregor Aug 31, 2021
3f716e3
Tests for invalid UTF8 handling
Catfish-Man Aug 31, 2021
4cc1506
[Test] Add additional tests for new behavior
theblixguy Sep 2, 2020
396087d
[Test] Update existing tests
theblixguy Sep 2, 2020
c2e5d04
Test: Find better locations for some updated tests
AnthonyLatsis Aug 12, 2021
15f88e9
[NFC, Typechecker] Remove UnsupportedProtocolVisitor and checkUnsuppo…
theblixguy Sep 2, 2020
eb1bd07
NFC: Remove the now dead ProtocolDecl::existentialTypeSupported()
AnthonyLatsis Mar 20, 2021
64b8f61
AST: Account for protocol compositions and nested types in «findProto…
AnthonyLatsis Aug 13, 2021
e49ca21
Sema: Check for invalid reference *before* checking for unsupported e…
AnthonyLatsis Aug 13, 2021
06b2f55
Hack: Avoid devirtualizing calls to requirements with covariant Self …
AnthonyLatsis Aug 30, 2021
33ec01a
[SIL][DebugInfo] PATCH 1/3: Add support for `expr op_deref`
mshockwave Aug 20, 2021
5b3c687
Fix an edge case in OSSA RLE for loops
meg-gupta Aug 30, 2021
9a8847d
[swift-inspect] Make sure to initialize backtrace flags.
DougGregor Aug 31, 2021
1389dce
Merge pull request #39105 from Catfish-Man/uninitialized-invalid-2
Catfish-Man Aug 31, 2021
e1023bc
[DebugInfo] PATCH 2/3: Duplicate logics regarding debug_value_addr
mshockwave Aug 23, 2021
343d842
[SIL][DebugInfo] PATCH 3/3: Deprecate debug_value_addr SIL instruciton
mshockwave Aug 27, 2021
20271cb
Mark test as unsupported on windows to unblock CI
kavon Aug 31, 2021
726f086
Merge pull request #39113 from kavon/disable-dist-test-windows
kavon Aug 31, 2021
1d86a22
[build-script] Add a SKIP_XCODE_VERSION_CHECK to all dry-run build-sc…
gottesmm Aug 31, 2021
6c74c0f
Merge pull request #39097 from meg-gupta/rlefix
meg-gupta Aug 31, 2021
9c8cfb3
Merge pull request #39091 from mininny/fix-rename-subscript
xedin Aug 31, 2021
3072a2a
Merge pull request #39114 from gottesmm/pr-700d21d9c3303cd3dd50ec26da…
gottesmm Aug 31, 2021
8109819
[build-script-impl] Do not actually try to extract symbols when we pe…
gottesmm Aug 18, 2021
e4f0815
Merge pull request #38814 from varungandhi-apple/vg-aeic-lib-evo
swift-ci Sep 1, 2021
8cba09a
Merge pull request #39109 from DougGregor/swift-inspect-fix
DougGregor Sep 1, 2021
6e35487
Merge pull request #38919 from gottesmm/pr-26b1714e21e106018d965c705a…
gottesmm Sep 1, 2021
12ff361
[CodeCompletion] Explicitly support enum pattern matching
ahoppen Sep 1, 2021
5dea77e
Merge pull request #38627 from ahoppen/pr/enum-matching-completion
ahoppen Sep 1, 2021
b769654
Merge pull request #39082 from mshockwave/dev-deprecate-debug-val-addr
mshockwave Sep 1, 2021
90cb550
Merge pull request #39099 from compnerd/windows-i686
compnerd Sep 1, 2021
8aaf9d6
Add missing REQUIRES: CPU=x86_64 to Concurrency test.
varungandhi-apple Sep 1, 2021
5bb4ad0
Merge pull request #39120 from varungandhi-apple/vg-add-cpu-requires
shahmishal Sep 1, 2021
8f59173
Add missing REQUIRES: CPU=x86_64 to Reflection test.
varungandhi-apple Sep 1, 2021
1907a82
Merge pull request #39122 from varungandhi-apple/vg-add-cpu-requires
shahmishal Sep 1, 2021
d2bdbd6
[ConstraintSystem] Fix a silly crash in repairFailures.
hborla Sep 1, 2021
1dad0f8
Merge pull request #39124 from hborla/repair-failures-crash
hborla Sep 2, 2021
b73050e
Merge pull request #39095 from AnthonyLatsis/se-309
ktoso Sep 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions cmake/modules/SwiftUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,35 @@ function(swift_create_post_build_symlink target)
COMMENT "${CS_COMMENT}")
endfunction()

# Once swift-frontend is built, if the standalone (early) swift-driver has been built,
# we create a `swift-driver` symlink adjacent to the `swift` and `swiftc` executables
# to ensure that `swiftc` forwards to the standalone driver when invoked.
function(swift_create_early_driver_symlinks target)
# Early swift-driver is built adjacent to the compiler (swift build dir)
set(driver_bin_dir "${CMAKE_BINARY_DIR}/../earlyswiftdriver-${SWIFT_HOST_VARIANT}-${SWIFT_HOST_VARIANT_ARCH}/release/bin")
set(swift_bin_dir "${SWIFT_RUNTIME_OUTPUT_INTDIR}")
# If early swift-driver wasn't built, nothing to do here.
if(NOT EXISTS "${driver_bin_dir}/swift-driver" OR NOT EXISTS "${driver_bin_dir}/swift-help")
message(STATUS "Skipping creating early SwiftDriver symlinks - no early SwiftDriver build found.")
return()
endif()

message(STATUS "Creating early SwiftDriver symlinks.")
message(STATUS "From: ${driver_bin_dir}/swift-driver")
message(STATUS "To: ${swift_bin_dir}/swift-driver")
swift_create_post_build_symlink(swift-frontend
SOURCE "${driver_bin_dir}/swift-driver"
DESTINATION "${swift_bin_dir}/swift-driver"
COMMENT "Creating early SwiftDriver symlinks: swift-driver")

message(STATUS "From: ${driver_bin_dir}/swift-help")
message(STATUS "To: ${swift_bin_dir}/swift-help")
swift_create_post_build_symlink(swift-frontend
SOURCE "${driver_bin_dir}/swift-help"
DESTINATION "${swift_bin_dir}/swift-help"
COMMENT "Creating early SwiftDriver symlinks: swift-help")
endfunction()

function(dump_swift_vars)
set(SWIFT_STDLIB_GLOBAL_CMAKE_CACHE)
get_cmake_property(variableNames VARIABLES)
Expand Down
133 changes: 133 additions & 0 deletions docs/DebuggingTheCompiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ benefit of all Swift developers.
- [Bisecting on SIL optimizer pass counts to identify optimizer bugs](#bisecting-on-sil-optimizer-pass-counts-to-identify-optimizer-bugs)
- [Using git-bisect in the presence of branch forwarding/feature branches](#using-git-bisect-in-the-presence-of-branch-forwardingfeature-branches)
- [Reducing SIL test cases using bug_reducer](#reducing-sil-test-cases-using-bug_reducer)
- [Debugging the Compiler Build](#debugging-the-compiler-build)
- [Build Dry Run](#build-dry-run)
- [Debugging the Compiler Driver](#debugging-the-compiler-driver-build)
- [Swift Compiler Driver F.A.Q](#swift-compiler-driver-f.a.q.)
- [Building the compiler without using the standalone driver](#building-the-compiler-without-the-standalone-driver)
- [Invoking the compiler without forwarding to the standalone driver](#invoking-the-compiler-without-forwarding-to-the-standalone-driver)
- [Reproducing the Compiler Driver build steps](#reproducing-the-compiler-driver-build-steps)
- [Installing the Compiler Driver](#installing-the-compiler-driver)
- [Debugging Swift Executables](#debugging-swift-executables)
- [Determining the mangled name of a function in LLDB](#determining-the-mangled-name-of-a-function-in-lldb)
- [Manually symbolication using LLDB](#manually-symbolication-using-lldb)
Expand Down Expand Up @@ -807,6 +815,131 @@ reducing SIL test cases by:
For more information and a high level example, see:
./swift/utils/bug_reducer/README.md.

# Debugging the Compiler Build

## Build Dry Run

A "dry-run" invocation of the `build-script` (using the `--dry-run` flag) will
print the commands that would be executed in a given build, without executing
them. A dry-run script invocation output can be used to inspect the build stages
of a given `build-script` configuration, or create script corresponding to one
such configuration.

# Debugging the Compiler Driver

The Swift compiler uses a standalone compiler-driver application written in
Swift: [swift-driver](https://github.com/apple/swift-driver). When building the
compiler using `build-script`, by default, the standalone driver will be built
first, using the host toolchain, if the host toolchain contains a Swift
compiler. If the host toolchain does not contain Swift, a warning is emitted and
the legacy compiler-driver (integrated in the C++ code-base) will be used. In
the future, a host toolchain containing a Swift compiler may become mandatory.
Once the compiler is built, the compiler build directory (`swift-<OS>-<ARCH>`)
is updated with a symlink to the standalone driver, ensuring calls to the build
directory's `swift` and `swiftc` always forward to the standalone driver.

For more information about the driver, see:
[github.com/apple/swift-driver/blob/main/README.md](https://github.com/apple/swift-driver/blob/main/README.md)

## Swift Compiler Driver F.A.Q.
> What's the difference between invoking 'swiftc' vs. 'swift-driver' at the top
level?

Today, `swift` and `swiftc` are symbolic links to the compiler binary
(`swift-frontend`). Invoking `swiftc` causes the executable to detects that it
is a compiler-driver invocation, and not a direct compiler-frontend invocation,
by examining the invoked program's name. The compiler frontend can be invoked
directly by invoking the `swift-frontend` executable, or passing in the
`-frontend` option to `swiftc`.

The standalone [Compiler Driver](https://github.com/apple/swift-driver) is
installed as a separate `swift-driver` executable in the Swift toolchain's `bin`
directory. When a user launches the compiler by invoking `swiftc`, the C++ based
compiler executable forwards the invocation to the `swift-driver` executable if
one is found alongside it. This forwarding mechanism is in-place temporarily, to
allow for an easy fallback to the legacy driver via one of the two escape
hatches:

- `-disallow-use-new-driver` command line flag
- `SWIFT_USE_OLD_DRIVER` environment variable

If the user is to directly invoke the `swift-driver` executable, the behaviour
should be the same as invoking the `swiftc` executable, but without the option
for a legacy driver fallback.

Once the legacy driver is deprecated, `swift` and `swiftc` executables will
become symbolic links to the `swift-driver` executable directly.


> Will 'swiftc ... -###' always print the same set of commands for the old/new
driver? Do they call 'swift-frontend' the same way?

The standalone [Compiler Driver](https://github.com/apple/swift-driver) is meant
to be a direct drop-in replacement for the C++-based legacy driver. It has the
exact same command-line interface. The expectation is that its behaviour closely
matches the legacy driver; however, during, and after the transition to the new
driver being the default its behaviour may start to diverge from the legacy
driver as par for the course of its evolution and gaining new features, etc.
Today, broadly-speaking, sets of `swift-frontend` invocations generated by the
two drivers are expected to be very similar.

## Building the compiler without the standalone driver
One can build the compiler that does not rely on the standalone driver and
instead uses the legacy, built-in driver using the `build-script` option:
`--skip-early-swift-driver`.

## Invoking the compiler without forwarding to the standalone driver
The Swift compiler can currently be invoked in an execution mode that will use
the legacy C++-based compiler driver using one of the following two options:
- Passing `-disallow-use-new-driver` argument to the `swiftc` invocation
- Setting the `SWIFT_USE_OLD_DRIVER` environment variable

## Reproducing the Compiler Driver build steps
A "[dry-run](#build-dry-run)" invocation of the `build-script` can be used to
examine the SwiftDriver build stage and commands, without executing it. For
example:
```
$ utils/build-script --release-debuginfo --dry-run
+ mkdir -p /SwiftWorkspace/build/Ninja-RelWithDebInfoAssert
--- Building earlyswiftdriver ---
+ /SwiftWorkspace/swift-driver/Utilities/build-script-helper.py build --package-path /SwiftWorkspace/swift-driver --build-path /SwiftWorkspace/build/Ninja-RelWithDebInfoAssert/earlyswiftdriver-macosx-x86_64 --configuration release --toolchain /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr --ninja-bin /Applications/Xcode.app/Contents/Developer/usr/local/bin/ninja --cmake-bin /Applications/Xcode.app/Contents/Developer/usr/local/bin/cmake --local_compiler_build
Building the standard library for: swift-test-stdlib-macosx-x86_64
...
```
One of the first steps is an invocation of the driver's
`build-script-helper.py` script which specifies that the driver us to be built
(`build`) using the host toolchain (`--toolchain`) to a specified location
(`--build-path`).

## Installing the Compiler Driver
In order to create a Swift compiler installation (`--install-swift`), the
standalone driver must be built as a separate build product using the
*just-built* Swift compiler and toolchain (the ones built in the same
`build-script` invocation, preceeding the SwiftDriver build product). The
additional build product is added to the build by specifying the
`--swift-driver` option of the `build-script`. The driver product is istalled
into the resulting toolchain installation by specifying the
`--install-swift-driver` option of the `build-script`.

Note, a "dry-run" `build-script` invocation when installing the standalone
driver will demonstrate the commands required to build and install the driver as
a standalone build product:
```
$ utils/build-script --release-debuginfo --dry-run --swift-driver --install-swift-driver
...
--- Cleaning swiftdriver ---
+ /SwiftWorkspace/swift-driver/Utilities/build-script-helper.py clean --package-path /SwiftWorkspace/swift-driver --build-path /SwiftWorkspace/build/Ninja-RelWithDebInfoAssert/swiftdriver-macosx-x86_64 --configuration release --toolchain /SwiftWorkspace/build/Ninja-RelWithDebInfoAssert/toolchain-macosx-x86_64/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr --ninja-bin /Applications/Xcode.app/Contents/Developer/usr/local/bin/ninja --cmake-bin /Applications/Xcode.app/Contents/Developer/usr/local/bin/cmake
--- Building swiftdriver ---
+ /SwiftWorkspace/swift-driver/Utilities/build-script-helper.py build --package-path /SwiftWorkspace/swift-driver --build-path /SwiftWorkspace/build/Ninja-RelWithDebInfoAssert/swiftdriver-macosx-x86_64 --configuration release --toolchain /SwiftWorkspace/build/Ninja-RelWithDebInfoAssert/toolchain-macosx-x86_64/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr --ninja-bin /Applications/Xcode.app/Contents/Developer/usr/local/bin/ninja --cmake-bin /Applications/Xcode.app/Contents/Developer/usr/local/bin/cmake
--- Installing swiftdriver ---
+ /SwiftWorkspace/swift-driver/Utilities/build-script-helper.py install --package-path /SwiftWorkspace/swift-driver --build-path /SwiftWorkspace/build/Ninja-RelWithDebInfoAssert/swiftdriver-macosx-x
86_64 --configuration release --toolchain /SwiftWorkspace/build/Ninja-RelWithDebInfoAssert/toolchain-macosx-x86_64/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr --ninja-bin /Applications/Xcode.app/Contents/Developer/usr/local/bin/ninja --cmake-bin /Applications/Xcode.app/Contents/Developer/usr/local/bin/cmake
```
These invocations of the driver's `build-script-helper.py` script specify the
individual build actions (`clean`, `build`, `install`), the product build path
(`--build-path`), and the *just-built* toolchain which should be used
(`--toolchain`).

# Debugging Swift Executables

One can use the previous tips for debugging the Swift compiler with Swift
Expand Down
4 changes: 2 additions & 2 deletions include/swift/AST/Decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ class PatternBindingDecl final : public Decl,
bool isComputingPatternBindingEntry(const VarDecl *vd) const;

/// Is this an "async let" declaration?
bool isSpawnLet() const;
bool isAsyncLet() const;

/// Gets the text of the initializer expression for the pattern entry at the
/// given index, stripping out inactive branches of any #ifs inside the
Expand Down Expand Up @@ -4945,7 +4945,7 @@ class VarDecl : public AbstractStorageDecl {
bool isLet() const { return getIntroducer() == Introducer::Let; }

/// Is this an "async let" property?
bool isSpawnLet() const;
bool isAsyncLet() const;

Introducer getIntroducer() const {
return Introducer(Bits.VarDecl.Introducer);
Expand Down
57 changes: 30 additions & 27 deletions include/swift/AST/DiagnosticsSema.def
Original file line number Diff line number Diff line change
Expand Up @@ -4246,8 +4246,8 @@ ERROR(throwing_interpolation_without_try,none,
"interpolation can throw but is not marked with 'try'", ())
ERROR(throwing_call_without_try,none,
"call can throw but is not marked with 'try'", ())
ERROR(throwing_spawn_let_without_try,none,
"reading 'spawn let' can throw but is not marked with 'try'", ())
ERROR(throwing_async_let_without_try,none,
"reading 'async let' can throw but is not marked with 'try'", ())
ERROR(throwing_prop_access_without_try,none,
"property access can throw but is not marked with 'try'", ())
ERROR(throwing_subscript_access_without_try,none,
Expand Down Expand Up @@ -4276,8 +4276,8 @@ NOTE(async_access_without_await,none,

NOTE(async_call_without_await_in_autoclosure,none,
"call is 'async' in an autoclosure argument", ())
NOTE(async_call_without_await_in_spawn_let,none,
"call is 'async' in an 'spawn let' initializer", ())
NOTE(async_call_without_await_in_async_let,none,
"call is 'async' in an 'async let' initializer", ())

WARNING(no_async_in_await,none,
"no 'async' operations occur within 'await' expression", ())
Expand All @@ -4290,7 +4290,7 @@ ERROR(await_in_illegal_context,none,
"%select{<<ERROR>>|a default argument|a property wrapper initializer|a property initializer|a global variable initializer|an enum case raw value|a catch pattern|a catch guard expression|a defer body}0",
(unsigned))
ERROR(async_in_nonasync_function,none,
"%select{'async'|'async' call|'await'|'spawn let'|'async' property access|'async' subscript access}0 in "
"%select{'async'|'async' call|'await'|'async let'|'async' property access|'async' subscript access}0 in "
"%select{a function|an autoclosure}1 that does not support concurrency",
(unsigned, bool))
NOTE(note_add_async_to_function,none,
Expand All @@ -4317,21 +4317,18 @@ NOTE(protocol_witness_async_conflict,none,
ERROR(async_autoclosure_nonasync_function,none,
"'async' autoclosure parameter in a non-'async' function", ())

WARNING(async_let_is_spawn_let,none,
"'async let' is now 'spawn let'", ())

ERROR(spawn_not_let,none,
"'spawn' can only be used with 'let' declarations", ())
ERROR(spawn_let_not_local,none,
"'spawn let' can only be used on local declarations", ())
ERROR(spawn_let_not_initialized,none,
"'spawn let' binding requires an initializer expression", ())
ERROR(spawn_let_no_variables,none,
"'spawn let' requires at least one named variable", ())
NOTE(spawn_let_without_await,none,
"reference to spawn let %0 is 'async'", (DeclName))
ERROR(spawn_let_in_illegal_context,none,
"spawn let %0 cannot be referenced in "
ERROR(async_not_let,none,
"'async' can only be used with 'let' declarations", ())
ERROR(async_let_not_local,none,
"'async let' can only be used on local declarations", ())
ERROR(async_let_not_initialized,none,
"'async let' binding requires an initializer expression", ())
ERROR(async_let_no_variables,none,
"'async let' requires at least one named variable", ())
NOTE(async_let_without_await,none,
"reference to async let %0 is 'async'", (DeclName))
ERROR(async_let_in_illegal_context,none,
"async let %0 cannot be referenced in "
"%select{<<ERROR>>|a default argument|a property wrapper initializer|a property initializer|a global variable initializer|an enum case raw value|a catch pattern|a catch guard expression|a defer body}1",
(DeclName, unsigned))

Expand Down Expand Up @@ -4428,8 +4425,8 @@ ERROR(actor_isolated_from_concurrent_closure,none,
ERROR(actor_isolated_from_concurrent_function,none,
"actor-isolated %0 %1 cannot be %select{referenced|mutated|used 'inout'}2 from a concurrent function",
(DescriptiveDeclKind, DeclName, unsigned))
ERROR(actor_isolated_from_spawn_let,none,
"actor-isolated %0 %1 cannot be %select{referenced|mutated|used 'inout'}2 from 'spawn let' initializer",
ERROR(actor_isolated_from_async_let,none,
"actor-isolated %0 %1 cannot be %select{referenced|mutated|used 'inout'}2 from 'async let' initializer",
(DescriptiveDeclKind, DeclName, unsigned))
ERROR(actor_isolated_keypath_component,none,
"cannot form key path to actor-isolated %0 %1",
Expand All @@ -4451,9 +4448,6 @@ NOTE(actor_isolated_sync_func,none,
NOTE(actor_mutable_state,none,
"mutation of this %0 is only permitted within the actor",
(DescriptiveDeclKind))
NOTE(actor_isolated_let,none,
"use `nonisolated` to allow synchronous access to 'let' from outside "
"the actor", ())
WARNING(shared_mutable_state_access,none,
"reference to %0 %1 is not concurrency-safe because it involves "
"shared mutable state", (DescriptiveDeclKind, DeclName))
Expand Down Expand Up @@ -4486,12 +4480,13 @@ WARNING(non_concurrent_property_type,none,
WARNING(non_concurrent_keypath_capture,none,
"cannot form key path that captures non-sendable type %0",
(Type))
WARNING(non_concurrent_keypath_access,none,
"cannot form key path that accesses non-sendable type %0",
(Type))
ERROR(non_concurrent_type_member,none,
"%select{stored property %1|associated value %1}0 of "
"'Sendable'-conforming %2 %3 has non-sendable type %4",
(bool, DeclName, DescriptiveDeclKind, DeclName, Type))
ERROR(non_sendable_nonisolated_let,none,
"non-isolated let property %0 has non-Sendable type %1", (DeclName, Type))
ERROR(concurrent_value_class_mutable_property,none,
"stored property %0 of 'Sendable'-conforming %1 %2 is mutable",
(DeclName, DescriptiveDeclKind, DeclName))
Expand All @@ -4507,13 +4502,21 @@ ERROR(concurrent_value_inherit,none,
"%select{| other than 'NSObject'}0",
(bool, DeclName))

ERROR(actorindependent_let,none,
"'@actorIndependent' is meaningless on 'let' declarations because "
"they are immutable",
())
ERROR(actorindependent_mutable_storage,none,
"'@actorIndependent' can not be applied to stored properties",
())
ERROR(actorindependent_local_var,none,
"'@actorIndependent' can not be applied to local variables",
())

ERROR(nonisolated_let,none,
"'nonisolated' is meaningless on 'let' declarations because "
"they are immutable",
())
ERROR(nonisolated_mutable_storage,none,
"nonisolated' can not be applied to stored properties",
())
Expand Down
3 changes: 3 additions & 0 deletions include/swift/AST/GenericSignature.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class ConformanceAccessPath {
ConformanceAccessPath(ArrayRef<Entry> path) : path(path) {}

friend class GenericSignatureImpl;
friend class GenericSignatureBuilder;

public:
typedef const Entry *const_iterator;
Expand All @@ -88,6 +89,8 @@ class ConformanceAccessPath {
const_iterator begin() const { return path.begin(); }
const_iterator end() const { return path.end(); }

const Entry &back() const { return path.back(); }

void print(raw_ostream &OS) const;

SWIFT_DEBUG_DUMP;
Expand Down
Loading