forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
[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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
…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
Remove -sil-merge-partial-modules
[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.
rdar://62895058
…ift. rdar://problem/64298096
…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.
rdar://problem/64995079
…4fc678591175d0628725f99 [gardening] Update SILLowerAggregateInstrs to be of a more modern style.
test: partially undo changes to `PathSanitizingFileCheck`
MaxDesiatov
approved these changes
Jul 10, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]. Want to support this open source service? Please star it : )