Skip to content

[pull] swiftwasm from master #1426

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 60 commits into from
Jul 10, 2020
Merged

[pull] swiftwasm from master #1426

merged 60 commits into from
Jul 10, 2020

Conversation

pull[bot]
Copy link

@pull pull bot commented Jul 9, 2020

See Commits and Changes for more details.


Created by pull[bot]. Want to support this open source service? Please star it : )

xymus and others added 30 commits June 5, 2020 12:25
When emitting the private swiftinterface, the compiler prints the
attribute explicitly even when it is deduced from the context. This can
lead to unparsable private swiftinterface files.

As a narrow fix, check if the decl type is supported before printing the
attribute.

rdar://64039069
Move the ObjC class name stability check logic to the Swift runtime, exposing it as a new SPI called _swift_isObjCTypeNameSerializable.

Update the reporting logic. The ObjC names of generic classes are considered stable now, but private classes and classes defined in function bodies or other anonymous contexts are unstable by design.

On the overlay side, rewrite the check’s implementation in Swift and considerably simplify it.

rdar://57809977
…wiftModuleLoader

It needs to check against the provided ExplicitModuleMap instead of looking into search paths.
…rted member reference

It appears that a long time ago, we didn't enforce that a member
reference to a typealias nested inside a generic type would supply
the generic arguments at all. To avoid breaking source compatibility,
we carved out some exceptions. Tighten up the exception to prohibit
the case where a typealias references another typealias, to fix a
crash.

While this worked in 5.1, it would crash in 5.2 and 5.3, and at
this point it's more trouble than it is worth to make it work
again, because of subtle representational issues. So let's just
ban it.

Fixes <rdar://problem/63535194>.
…rm kind.

This affects module interfaces, interface generation in sourcekitd, and
diagnostics. Also fixes a fixit that was assuming the 'OSX' spelling when
computing the source range to replace.

Resolves rdar://problem/64667960
Because the names are coming from a .def file used for printing too, this
simplifies the printing logic as well.
This simplifies matters if checking an attribute adds members
to the nominal type or extension.
The call to getGenericSignature() might return nullptr if we encounter
a circular reference.

Fixes <rdar://problem/64992293>.
This is now the default behaviour for -merge-modules. Stop
passing it in the driver and remove it from FrontendOptions.td.
Instead, disable tests we cannot run with a targeted platform conditional.
And also removed a test that is semantically a duplicate of the
synthesized initializer test.
In practice, LLVM can only optimize trivial `if` chains into a `switch`.
…rash

Sema: Fix crash on circular reference in checkContextualRequirements()
Request-ify synthesis of the main function for the @main attribute
…reference-nonsense

Sema: Don't look through nested typealiases when checking for unsupported member reference
…iftlang#30914)

This doesn't yet allow including C++ headers on platforms where libc++
isn't the default; see comments in UnixToolChains.cpp for details.

However, it does, for example, allow throwing and catching exceptions in C++
code used through interop, unblocking
https://github.com/apple/swift/pull/30674/files.

The flags (-enable-experimental-cxx-interop and -experimental-cxx-stdlib) carry
"experimental" in the name to emphasize that C++ interop is still an
experimental feature.

Co-authored-by: Michael Forster <[email protected]>
…iftlang#32778)

Reimplement `PullbackCloner` using the pointer-to-implementation pattern.

`PullbackCloner.h` is now tiny: `PullbackCloner` exposes only a `bool run()`
entry point.

All of the implementation is moved to `PullbackCloner::Implementation` in
`PullbackCloner.cpp`.

Benefits of this approach:

- A main benefit is that methods can be defined directly in `PullbackCloner.cpp`
  without needing to separately declare them in `PullbackCloner.h`.
  - There is now no code duplication between `PullbackCloner.h` and
    `PullbackCloner.cpp`.
  - Consequently, method documentation is easier to read because it appears
    directly on method definitions, instead of on method declarations in a
    separate file. This is important for documentation of `PullbackCloner`
    instruction visitor methods, which explain pullback transformation rules.
- Incremental recompilation may be faster since `PullbackCloner.h` changes less
  often.

Partially resolves SR-13182.
The last set of changes to make it backwards compatible with Python 2
required converting the arguments.  That is not compatible on Python 3
unfortunately.  Only perform that on Python 2 to make the utility
compatible with 2 and 3.
[SIL] Convert computeLoweredRValueType to CanTypeVisitor
Appease the python linter.
Two protocol conformance descriptors are passed to
swift_compareProtocolConformanceDecriptors from generic metadata
accessors when there is a canonical prespecialization and one of the
generic arguments has a protocol requirement.

Previously, the descriptors were incorrectly being passed without
ptrauth processing: one from the witness table in the arguments that are
passed in to the accessor and one known statically.

Here, the descriptor in the witness table is authed using the
ProtocolConformanceDescriptor schema.  Then, both descriptors are signed
using the ProtocolConformanceDescriptorsAsArguments schema.  Finally, in
the runtime function, the descriptors are authed.
compnerd and others added 28 commits July 9, 2020 14:07
…eps-back

test: make `test_util` more python 3 friendly
[NFC] AssociatedTypeInference: Improve dumping of an inference solution
…-initializers-test

Rename synthesized initializer test to follow the pattern
…tment

[test] Reenable NSValueBridging tests on i386 CPUs
Organize the utilities in this file by section to make subsequent
diffs easier to read and prepare for adding more utilities.
Return type in the closure signature is often redundant when expanding
placeholders, because the type of the clossures are usually inferred
from the context (i.e. calling function), users don't need to write the
return type explicitly.

They are not only redundant, but also sometimes harmful when the return
type is a generic parameter or its requirement. Actually, there is no
correct spelling in such cases.

So omit the return type and the parentheses around the parameter clause.

rdar://problem/63607976
[Explicit Module Builds] Add canImport functionality to the ExplicitSwiftModuleLoader
…a-prespecialization-components/consider-conformances-ptrauth

[metadata prespecialization] Ptrauth for compared protocol conformances.
The regular expression engine escaped the strings differently across
python 2 and 3.  Using a raw string makes this simpler to understand
and obsoletes the comment.  This change also now properly allows the
replacement to occur in the same way on 2 and 3.
…spelling-when-printing-platform

[AST] Prefer the 'macOS' spelling over 'OSX' when printing the platform kind.
[Foundation] Update & simplify class name stability check
…wiftlang#32803)

Fix SILGen for `@derivative` attributes where the derivative generic signature
is equal to the original generic signature and has all concrete generic
parameters (i.e. all generic parameters are bound to concrete types via
same-type requirements).

SILGen should emit a differentiability witness with no generic signature.
This is already done for `@differentiable` attributes.

Resolves TF-1292.
[build-script] Tie llvm, swift, and lldb to the same sysroot
…eusingastcontext

[swift-ide-test] Add indicator of "reusing ASTContext" to the result
…eplaceholder-rdar63607976

[PlaceholderExpansion] Omit return type in closure signature
This is a really simple pass that isn't going to be touched for a long time
after I am done fixing the pass for ownership. So it makes sense to clean it up
now. I am doing this as a separate commit before updating for ownership.
…tion-test-Runtime-rdar64672291.swift

[Test] Mark executable test appropriately.
…4fc678591175d0628725f99

[gardening] Update SILLowerAggregateInstrs to be of a more modern style.
test: partially undo changes to `PathSanitizingFileCheck`
@pull pull bot merged commit 5a824de into swiftwasm Jul 10, 2020
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.