Skip to content

[pull] swiftwasm from main #4364

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

Merged
merged 24 commits into from
Mar 13, 2022
Merged

[pull] swiftwasm from main #4364

merged 24 commits into from
Mar 13, 2022

Conversation

pull[bot]
Copy link

@pull pull bot commented Mar 12, 2022

See Commits and Changes for more details.


Created by pull[bot]

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

adrian-prantl and others added 20 commits March 11, 2022 13:53
I've seen an LLDB crash log that suggests that this can happen, but I don't have
a reproducer for it.

rdar://89177494
Add a separate pass to consider rules with unresolved names which are
not simplified.
…tocol typealias rule

If a rule is not a protocol typealias rule, and does not contain any unresolved
symbols, do not attempt to eliminate it via a protocol typealias rule.

This fixes a bunch of cases where the RequirementMachine was overly-eager to
remove rules.
… the general version

We had two copies of this code that had drifted apart. Bring them back
together so there is just one place where we compute the type of a
reabstraction thunk.
…bled

The Clang Importer when C++ interop is not enabled, disambigate an Obj-C
class and protocol that are named the same by appending `Protocol` to
the protocol. This was not happening when C++ interop was enabled, but
should also apply to Obj-C++ modules.

The fix is providing an starting scope for the search, which the C++
name lookup need to actually find the similarly named counterpart.

Includes a test to avoid this problem creeping in again, and locally it
did not break any other tests.
This reverts commit a182a70.

I also fixed the tests as well.

NOTE: In the generic case of debug_value_addr, the self parameter with asserts
seems to be a var and without asserts a let. This is apparent at the AST level
before we even get to anything that I have changed. This seems to suggest that
there is some sort of uninitialized memory or something like that. Regardless
that is more of an AST level thing, so I just put in a regex that match both
patterns and send rdar://89237318 over to Robert Widmann!
…e-clash

[ClangImporter] Suffix ambiguous protocol names if C++ interop is enabled
…nd substitution to parse and validated generated C++ header in multiple C++ language modes

This ensures that we validate C++14, C++17, and C++20
…wiftlang#41530)

Until recently, `MemoryReader` had a single function `resovlePointer` which did two things, and has a somewhat vague name. The two things were:

1. Tool-specific mapping between real addresses and tagged addresses (first implemented in `swift-reflection-dump` and then later in lldb)
2. Finding a "symbol" for a given address

Recently, `resolvePointerAsSymbol` was added, which overloaded the term "resolve" and it added another way to deal with symbols for addresses. Symbols themselves were a bit muddled, as `swift-reflection-dump` was dealing with dynamic symbols aka bindings, while lldb was dealing in regular (static) symbols.

This change separates these two parts of functionality, and also divides symbol lookup into two cases. The API surface will now be:

1. `resolvePointer` for mapping/tagging addresses
3. `getSymbol` for looking up a symbol for an address
4. `getDynamicSymbol` for looking up a dyld binding for an address

Note: each of these names could be improved. Some alternative terms: `lookup` instead of `get`, `Binding` or `BindingName` instead of `DynamicSymbol`. Maybe even another term instead of "resolve". Suggestions welcome!

Currently, `swift-reflection-dump` supports `getDynamicSymbol` but not `getSymbol`. For lldb it's the reverse, `getSymbol` is supported but `getDynamicSymbol` needs to be implemented.

For everything but lldb, this change is NFC. For lldb it fixes a bug where `LLDBMemoryReader` returns regular symbols where we should instead be returning dynamic symbols.
    [cxx-interop][test] add %check-interop-cxx-header-in-clang test command substitution to parse and validate generated C++ header in multiple C++ language modes
MaxDesiatov
MaxDesiatov previously approved these changes Mar 12, 2022
MaxDesiatov
MaxDesiatov previously approved these changes Mar 12, 2022
gottesmm and others added 2 commits March 12, 2022 10:30
…ea88bc8ee166c0dc1d1f1c4

Revert "[test] Disable a couple of DebugInfo tests"
sema: reject enum element call with payloads as compile-time constant
…ocol-typealias-minimization

RequirementMachine: Overhaul handling of protocol typealiases with concrete underlying type
@kateinoigakukun kateinoigakukun merged commit 3d4401c into swiftwasm Mar 13, 2022
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.