Skip to content
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

[pull] swiftwasm from main #5295

Merged
merged 14 commits into from
Feb 14, 2023
Merged

[pull] swiftwasm from main #5295

merged 14 commits into from
Feb 14, 2023

Conversation

pull[bot]
Copy link

@pull pull bot commented Feb 14, 2023

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

jckarter and others added 14 commits January 30, 2023 16:35
… actually be escaping.

People can call `withoutActuallyEscaping` and give it a `do:` body function
that, well, doesn't actually take an escaping closure argument as in:

```swift
func foo(_ f: (() -> Void) -> Void, _ b: () -> Void) {
    return withoutActuallyEscaping(b, do: f)
}
```

and this wouldn't really work because the did-it-escape checking relies on
having a refcounted object to probe, aside from triggering a bunch of
assertion failures in SILGen which assumed the parameter would be escaping.
Fixes rdar://104477418.
previously we were blindly rejecting anything
that such extensions conformed to, but Sendable
is now allowed for move-only types.
enums with only cases that have no associated values
automatically get Equatable and Hashable synthesized.

That's not valid for move-only enums, so we were
just getting errors about broken conformances when
we hadn't specified any explicitly.

This PR just prevents the synthesis from the start
so we don't get any errors.

fixes rdar://104986597
Re-enable `static_vs_class_spelling.swift` - it was just missing the
`-target` in the `sourcekitd-test` lines.

While here, cleanup all the cursor info tests that used `split_file` to
use `split-file` instead.

Resolves rdar://105287822.
This is a wild guess at what might be causing our persistent, random
String failures on the main branch:

```
  Swift(macosx-x86_64) :: Prototypes/CollectionTransformers.swift
  Swift(macosx-x86_64) :: stdlib/NSSlowString.swift
  Swift(macosx-x86_64) :: stdlib/NSStringAPI.swift
  Swift(macosx-x86_64) :: stdlib/StringIndex.swift
  Swift-validation(macosx-x86_64) :: stdlib/String.swift
  Swift-validation(macosx-x86_64) :: stdlib/StringBreadcrumbs.swift
  Swift-validation(macosx-x86_64) :: stdlib/StringUTF8.swift
```

FWIW, it appears this is *not* caused by apple#62717:
that change has also landed on release/5.8, and I haven’t seen these
issues on that branch.

Our atomic breadcrumbs initialization vs its non-atomic loading
gives me an uneasy feeling that this may in fact be a long standing
synchronization issue that is only now causing problems (for whatever
reason). I am unable to reproduce these issues locally, so this guess
may be (and probably is) wildly off the mark, but this PR is likely
to be a good idea anyway, if only to rule out this possibility.

rdar://104751936
Some guaranteed forwarding instructions have multiple operands:
mark_dependence, ref_to_bridge_object.

The corresponding instruction types checked here already have
documentation that the forwarded operand is the first operand. The
assert is overly cautious, and checking for indiviudal opcodes would be
tedious maintenance.

(cherry picked from commit 2d92af4)
Some guaranteed forwarding instructions have multiple operands:
mark_dependence, ref_to_bridge_object.

The corresponding instruction types checked here already have
documentation that the forwarded operand is the first operand. The
assert is overly cautious, and checking for indiviudal opcodes would be
tedious maintenance.
…not-actually-escaping-param

Coerce the parameter of the parameter to `withoutActuallyEscaping` to actually be escaping.
[move-only] fix conformance synthesis & conformances in extensions
Remove an assert from visitForwardedGuaranteedOperands
[Test] Re-enable and cleanup some cursor info tests
[stdlib] Rework String breadcrumbs initialization/loading
@kateinoigakukun kateinoigakukun merged commit 5126044 into swiftwasm Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants