Commit Graph

181843 Commits

Author SHA1 Message Date
Evan Wilde
aa6b5c2d37 [CMake] Copy StringProcessing files into stdlib
We want to move StringProcessing sources out of the experimental string
processing repository. Use the Resync script to copy the files from the
experimental repository into position in the StringProcessing library.
2025-03-26 16:45:23 -07:00
Arnold Schwaighofer
007266869f Merge pull request #80306 from aschwaighofer/fix_cond_fail_message_annotation_help_text
Fix enable-cond-fail-message-annotation option's help text
2025-03-26 14:07:08 -07:00
Gábor Horváth
07929331d0 Merge pull request #80305 from swiftlang/gaborh/string-unsafe
[cxx-interop] Fix a regression making std::string unsafe
2025-03-26 20:16:13 +00:00
Saleem Abdulrasool
e42cd5074f Merge pull request #80298 from compnerd/wiring
Runtimes: allow building the Overlay against SwiftCore
2025-03-26 12:59:27 -07:00
Slava Pestov
86bfe3a0a4 Merge pull request #80302 from slavapestov/anthony-fixed-it-already
Add regression test for fixed crasher
2025-03-26 15:44:10 -04:00
Andrew Trick
97b249bd11 Merge pull request #80263 from atrick/markdep-addr
SIL: add mark_dependence_addr
2025-03-26 10:33:42 -07:00
Alexis Laferrière
a4aaa1063a Merge pull request #80098 from xymus/upstream-swiftmodule-blocklist
Frontend: Upstream blocklist check when ignoring adjacent swiftmodule files
2025-03-26 10:28:30 -07:00
John McCall
4da795fd61 Merge pull request #80297 from rjmccall/zero-objc-async-result-on-error-path
Pass a zero normal result to ObjC async completion handlers on the error path
2025-03-26 12:42:38 -04:00
Arnold Schwaighofer
4143d93031 Fix enable-cond-fail-message-annotation option's help text 2025-03-26 09:26:17 -07:00
Joe Groff
98d6480ddb Merge pull request #80275 from jckarter/classify-address-projections
SILGen: Properly classify LValue component projections in more cases.
2025-03-26 09:16:09 -07:00
Gábor Horváth
9d6305c7c3 Merge pull request #80270 from swiftlang/gaborh/opt-foreign-reference-type
[cxx-interop] Support foreing reference types in generic context
2025-03-26 15:44:34 +00:00
Adrian Prantl
84d313fedf Merge pull request #80283 from adrian-prantl/145226754
[LLDB] Turn off resilience bypass for textual swiftinterface files
2025-03-26 08:41:57 -07:00
Gabor Horvath
ff42f2ee79 [cxx-interop] Fix a regression making std::string unsafe
Currently, we only get warnings for using unsafe types in expressions
but not in the function signature. The tests did not use the std::string
object in the function body. As a result, we regressed and std::string
was considered unsafe.

The reason is that the annotation only mode for calculating escapability
of a type did not do what we intended. std::basic_string is
conditionally escapable if the template argument is escapable. We
considered 'char' to have unknown escapability in annotation only mode.
The annotation only mode was introduced to avoid suddenly importing
certain types as not escapable when they have pointer fields and break
backward compatibility.

The solution is to make annotation only mode to still consider char and
co as escapable types and only fall back to unknown when the inference
otherwise would have deduced non-escapable (for unannotated typed).
2025-03-26 15:25:37 +00:00
Slava Pestov
c200b0ba44 Add regression test for fixed crasher
This was fixed by 89f5066fb4.
2025-03-26 10:55:46 -04:00
eeckstein
964f081e69 Merge pull request #80284 from eeckstein/diagnose-infinite-recursion
DiagnoseInfiniteRecursion: re-implement the pass in swift and fix a bug
2025-03-26 14:17:30 +01:00
Dario Rexin
c89cb49a14 [Concurrency] Properly set task create flags in TaskGroup.startTaskSynchronously (#80299)
rdar://147907609

When starting tasks synchronously on task groups, the task create flags for isSynchronousStart and isDiscardingTask were always set to `false`. With this change the former will always be `true` and the latter conditionally `true` for discarding task groups.
2025-03-26 22:00:33 +09:00
Konrad `ktoso` Malawski
8430749e81 [Distributed] Allow @Resolvable to work with available on specific func (#80296)
resolves rdar://147892011
2025-03-26 05:30:51 -07:00
Hamish Knight
b719498369 Merge pull request #80242 from hamishknight/mutable-problems-require-mutable-solutions
[AST] Always walk folded SequenceExpr if available
2025-03-26 10:43:50 +00:00
Saleem Abdulrasool
276ced666b Merge pull request #80294 from jeffdav/win-build-fix-toolchaininstallroot
utils: Add back missing ToolchainInstallRoot properties.
2025-03-26 02:45:36 -07:00
Erik Eckstein
8b2d27007f DiagnoseInfiniteRecursion: re-implement the pass in swift and fix a bug
Fixes a false alarm in case of recursive calls with different type parameters.
For example:

```
protocol P {
  associatedtype E: P
}

func noRecursionMismatchingTypeArgs1<T: P>(_ t: T.Type) {
  if T.self == Int.self {
    return
  }
  noRecursionMismatchingTypeArgs1(T.E.self)
}
```
2025-03-26 09:14:38 +01:00
Erik Eckstein
ac55dae26c AST: add the possibility to compare SubstitutionMaps 2025-03-26 08:45:38 +01:00
Erik Eckstein
85a6df30d6 SIL: add lookup(method:) in VTable and WitnessTable 2025-03-26 08:45:23 +01:00
Erik Eckstein
1844c14c44 SIL: add var ClassMethodInst.member 2025-03-26 08:45:07 +01:00
Erik Eckstein
67556cfbf4 SIL: add some Function APIs
* `var wasDeserializedCanonical`
* `var genericSignature`
* `func mapTypeIntoContext`
* `var forwardingSubstitutionMap`
2025-03-26 08:45:07 +01:00
Erik Eckstein
59ad8b6623 Optimizer: add var Context.currentModuleContext 2025-03-26 08:43:55 +01:00
Erik Eckstein
1ce545ba3d SIL: add some DeclRef APIs
* `var decl`
* `func ==`
* `func calleesAreStaticallyKnowable`
2025-03-26 08:43:55 +01:00
Erik Eckstein
b39a6cdd22 AST: add var GenericSignature.genericParameters 2025-03-26 07:30:11 +01:00
Erik Eckstein
42bba8f484 AST: add some Declaration APIs
* `var Declaration.parentModule`
* `var AbstractFunctionDecl.isOverridden`
2025-03-26 07:30:11 +01:00
Erik Eckstein
e1af31bc19 AST: add var Conformance.rootConformance 2025-03-26 07:30:10 +01:00
Erik Eckstein
d523e303c3 SIL/AST: move some SIL.Type APIs to the TypeProperties protocol which makes them also available for AST.Type and AST.CanonicalType 2025-03-26 07:30:10 +01:00
Erik Eckstein
380ea889bc SIL: fix self-argument APIs in Function
`var selfArgument` should return an optional, i.e. nil if the function doesn't have a self argument.
2025-03-26 07:30:10 +01:00
Andrew Trick
69b6b1d309 LifetimeDependenceDefUseWalker: handle addressable dependencies 2025-03-25 23:02:45 -07:00
Andrew Trick
d9dd93560d Support mark_dependence_addr in SIL passes. 2025-03-25 23:02:45 -07:00
Andrew Trick
e7000e4668 SIL: Add mark_dependence_addr 2025-03-25 23:02:42 -07:00
Andrew Trick
edf02f9aff [docs] SIL mark_dependence 2025-03-25 23:02:06 -07:00
Saleem Abdulrasool
78ed9ad478 Runtimes: allow building the Overlay against SwiftCore
Wire up the SwiftCore project to the Overlay project. This allows us to
build against the just built SwiftCore.
2025-03-25 22:37:04 -07:00
Kuba (Brecka) Mracek
e41bba3d37 Merge pull request #80285 from kubamracek/fix-whitespace
Fix a 'misleading indentation' warning in CompilerInvocation.cpp, NFC
2025-03-25 22:00:27 -07:00
John McCall
e9ebc7c848 Pass a zero normal result to ObjC async completion handlers on the error path.
Fixes #65199
2025-03-26 00:58:27 -04:00
Jeff
828a3470e8 utils: Add back missing ToolchainInstallRoot properties. 2025-03-25 21:43:36 -07:00
Anthony Latsis
631a04e56c Merge pull request #80159 from AnthonyLatsis/danaus-plexippus-5
Sema: Extend adoption mode for `AsyncCallerExecution` to storage declarations
2025-03-26 04:40:58 +00:00
John McCall
3fe70968cc Remove the substitution map from zeroInitializer builtin in SIL.
This is a value operation that can work just fine on lowered types,
so there's no need to carry along a formal type. Make the value/address
duality clearer, and enforce it in the verifier.
2025-03-26 00:34:15 -04:00
Doug Gregor
06985fe933 Merge pull request #80292 from DougGregor/recursively-remove-unsafe-inlinable
Properly recurse when removing "unsafe" from inlinable code
2025-03-25 21:07:28 -07:00
Saleem Abdulrasool
a17cf9b785 Merge pull request #80250 from compnerd/dependencies
Runtimes: establish dependency on the registrar
2025-03-25 18:59:25 -07:00
Anthony Latsis
a75b63ab6d Merge pull request #77920 from AnthonyLatsis/fissidens
AST: Rename debugger pretty printer `Type::dumpPrint` to `print`
2025-03-25 23:42:36 +00:00
Doug Gregor
1b2fad1e78 Properly recurse when removing "unsafe" from inlinable code
I forgot that I have to manually recurse in the syntactic rewriter. Do so.
Fixes rdar://147877042
2025-03-25 16:27:37 -07:00
Anthony Latsis
a95785c5b2 Merge pull request #80260 from AnthonyLatsis/eutrema-japonicum
DiagnosticEngine: Print the ID of the wrapped, not wrapper, diagnostic
2025-03-25 23:14:43 +00:00
Doug Gregor
97de71be40 Merge pull request #80279 from DougGregor/stdlib-remaining-memory-safety-warnings
[Standard library] Address remaining memory-safety warnings
2025-03-25 15:44:27 -07:00
Dave Lee
c51e10a827 RemoteInspection: Update DefaultActorImpl layout (#80278)
The definition of `DefautlActorImpl` changed in https://github.com/swiftlang/swift/pull/73998. This change reflects those changes on to RemoteInspection's platform independent definition.
2025-03-25 15:42:46 -07:00
Mike Ash
5f5d1cfae6 Merge pull request #80119 from mikeash/allocation-failure-fatal-error
[Runtime] Include size/alignment in allocation failure fatal error message.
2025-03-25 18:32:21 -04:00
Evan Wilde
521e2f66b2 Merge pull request #80276 from etcwilde/ewilde/build-cmake-before-ninja
[build-script] Build CMake before Ninja
2025-03-25 15:22:40 -07:00