Skip to content

Conversation

@iMostfa
Copy link
Owner

@iMostfa iMostfa commented Jun 16, 2024

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves #NNNNN, fix apple/llvm-project#MMMMM.

nate-chandler and others added 30 commits June 8, 2024 10:15
Utilize and expand the pre-existing peephole.

rdar://127115078
[Concurrency] Don't ignore mismatching isolation for overrides of Clang-imported superclass methods.
Distributed actors can be treated as actors by accessing the `asLocalActor`
property. When lowering `#isolation` in a distributed actor initializer,
use a separate builtin `flowSensitiveDistributedSelfIsolation` to
capture the conformance to `DistributedActor`, and have Definite
Initialization introduce the call to the `asLocalActor` getter when
needed.
…or-init-isolation

Teach `#isolation` to respect the flow-sensitive nature of actor initializers
…uest

When doing solver-based completion, the request
will fail, avoid falling back to a regular call
expression in that case; we only care about
whether we got the callback.

rdar://129024996
If the extension does not match the protocol type
that we're doing the lookup for, check whether the
`Self` type conforms to the protocol; in that case
we have e.g an extension for an inherited protocol.

rdar://129024996
In Swift, we can have enum elements and methods with the same name, they are overloaded.
Unfortunately, this feature is not supported by C++ interop at the moment. This patch
avoids emitting the methods with name collisions to make sure the resulting header
can be compiler. A proper fix should follow in a later PR.

rdar://128162252
…cker.

If a protocol provides a deprecated default implementation for a requirement
that is not deprecated, the compiler should emit a warning so the programmer
can provide an explicit implementation of the requirement. This is helpful
for staging in new protocol requirements that should be implemented in
conforming types.
Fixes a crash in case a lazy var is declared after a return statement

swiftlang#73736
The Getting Started guide offers a build-script command that new contributors can use to quickly build a debug compiler on their local machine. The command already has `--skip-tvos` and `--skip-watchos` flags since most compiler contributors don't need to build for those platforms. This change adds `--skip-xros` flag to the command.
…guage-feature

Make BorrowingSwitch a LANGUAGE_FEATURE.
… types

Non-loadable types don't necessarily need metadata, for example, structs with `@_rawLayout`

swiftlang#73951
…ft runtime

Having a Swift array of C++ reference types without crashing at runtime only became possible recently (swiftlang#73615). When building against an older runtime, one would still see runtime crashes. This is expected because part of the fix is in the Swift runtime.

This makes sure we don't try to run tests for C++ reference types with an older Swift runtime.

rdar://128681137
Fix the cross-compiling Windows ARM64 build.
[MoveOnly] Call mutating methods on existentials.
…tion/20240606/1

[LifetimeCompletion] Removed "with leaks" mode.
Make it a bit clearer which function actually cares
about the closure it's handed.
Unfortunately we've encountered another source
breaking case here:

```
class C {
  func method() {}

  func foo() {
    Task { [weak self] in
      Task {
        method()
      }
    }
  }
}
```

In 5.10 we'd only do the unqualified lookup for
`self` when directly in a `weak self` closure,
but with the implicit self rework, we'd start
using the `weak self` here, leading to a
type-checker error.

At this point, adding more edge cases to the
existing logic is going to make things much more
complicated. Instead, reinstate the 5.10 implicit
self lookup behavior and diagnostic logic,
switching over to the new logic only under Swift 6
mode.

rdar://129475277
…hod-name-clash

[cxx-interop] Avoid emitting methods that cause name clash
…decl

SILGen: ignore unreachable var decls
egorzhdan and others added 26 commits June 14, 2024 20:23
We now may have constrained existentials that have no primary associated
types, so there won't be any arguments for the parameterized protocol
type. Because the "constrained" part is that there's an inverse.

resolves rdar://128695929
…31d7649c1005be9c49d771c

[region-isolation] Implement function sub typing rules
PR swiftlang#74394 removed a field from `struct MetadataSections` whose layout is ABI.
So restore that field as an unused padding field to preserve the layout of all
the other fields in that struct.
…g-in-dump

[ASTDumper] Avoid parsing decl members
[SwiftCompilerSources] add unknown default case for bridged function serializedkind.
Update the SDK deployment to include the static libraries as well. This
is primarily needed for the C++ interop libraries.
…ror-no-more-mpe-metadata-partial"

This reverts commit a1708ef, reversing
changes made to b593062.
…e-only-test

[cxx-interop] Fix a test for move-only types
Demangler: edge case in existential demangling
…ilds.

The implementation of this experimental feature is not complete and it's
not ready to be enabled in production.
Drop old comment that's very dated and very unnecessary
The parser is supposed to avoid looking inside unmatched `#if` compiler (et al) blocks.
This usually means that the following code builds fine

  #if compiler(>=100)
  foo bar
  #endif
  
however, a logical bug meant that if the check was nested inside an already-inactive
`#if` block, it would not adhere to this evaluation-skipping behavior

  #if false
  #if compiler(>=100)
  foo bar // error!
  #endif
  #endif
  
This PR fixes this specific case.
…-throws

[Features] `FullTypedThrows` should only be enable-able in asserts builds.
utils: copy static libraries for Android SDK
…ocols

Delete binary file commited by mistake.
[Sema] Score non-settable overload choices higher in RValueToLValue fix
…ormances

Tests: fixup "report public conformances to non-publicly imported protocols"
@iMostfa iMostfa force-pushed the feature/issue-72662-Bad-diagnostic-for-force-unwrapped-p branch from 71d3c4f to 9e3e2aa Compare June 16, 2024 16:27
iMostfa pushed a commit that referenced this pull request Jul 19, 2024
This inserts a suitably named function into the stack trace whenever
a dynamic cast failure involves a NULL source or target type.
Very often, crash logs include backtraces with function names but
no log output; with this change, such a backtrace might look like
the following -- note `TARGET_TYPE_NULL` in the function name
here to mark the missing type information:

```
 frame #0: __pthread_kill + 8
 frame #1: pthread_kill + 288
 frame #2: abort + 128
 frame #3: swift::fatalErrorv()
 frame #4: swift::fatalError()
 frame #5: swift_dynamicCastFailure_TARGET_TYPE_NULL()
 frame #6: swift::swift_dynamicCastFailure()
 frame swiftlang#7: ::swift_dynamicCast()
```

Resolves rdar://130630157
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.