forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
[pull] swiftwasm from master #1119
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
…odule. This is important, for example, for linking correctly to the C++ standard library on Windows, which uses `#pragma comment(lib, ...)` in its headers to specify the correct library to link against.
Make the note on needing to adjust `PYTHON_EXECUTABLE` more prominent, and repeat in in the place where that argument actually needs to be adjusted.
…hr). Ubuntu 20.04 LTS is out now; the last version to support 14.04 was Swift 5.1, so it is ok to delete this.
Added note on which edition of Visual Studio to get.
Previously, whenever name lookup returned two declarations with the same name, we would compute the canonical type of each one as part of the shadowing check. The canonical type calculation is rather expensive for GenericFunctionTypes since it requires constructing a GenericSignatureBuilder to canonicalize type parameters that appear in the function's signature. Instead, let's first shard all declarations that have the same name by their generic signature. If two declarations have the same signature, only then do we proceed to compute their canonical type. Since computing a canonical GenericSignature is cheaper than computing a canonical GenericFunctionType, this should speed up name lookup of heavily-overloaded names, such as operators. Fixes <rdar://problem/56800097>.
Remove reference to the latest release.
Also remove some ancient logic to detect and ignore requests to use LLD. If people want to explicitly use LLD, they probably have a reason and we shouldn't second guess them.
This code is only used on one side of a if/else branch, so let's just move it inside the `else` block.
Add a common helper function `VJPEmitter::createTrampolineBasicBlock`. Change `VJPEmitter::buildPullbackValueStructValue` to take an original basic block instead of a terminator instruction.
This test was disabled in SR-12741 due to iphonesimulator-i386 failures. Enabling the test on other platforms is important to prevent regressions.
This cleans up some more `llvm::` leakage in the runtime when built into a static library. With this change we are down to 3 leaking symbols in the static library related to a missed ADT (`StringSwitch`).
Support differentiation of `is` and `as?` operators. These operators lower to branching cast SIL instructions, requiring control flow differentiation support. Resolves SR-12898.
Hide comments from SPI decls in all swiftdoc files. This applies the same restrictions as private declarations. This is a temporary solution, a long term fix is to emit both a public and an internal swiftdoc file. rdar://63729195
Client code can't override or subclass a `public` declaration already, so although the ABI differs, the API is the same whether something is `final` or not.
…t on tvOS" This reverts commit 7e2c245.
This is used in the standard library for the reflection. Add the missing header. Somehow this was missed in the dynamic version of the standard library.
And remove an unnecessary override, so that further work will allow this method not to need a vtable entry.
In order to fully optimize OptionSet literals, it's important that this function is inlined and fully optimized. So far this was done by chance, but with COW representation it needs a hint to the optimizer.
… an array sub-sequence. In the corner case of a 0 sized replacement in an empty array, we did write the 0 count back to the array singleton. This is not a big problem right now, because it would just overwrite a 0 with a 0, but it shouldn't be done. But with COW representation in Array, it would break the sanity checks.
This has two advantages: 1. It does not force the Array in memory (to pass it as inout self to the non-inlinable _createNewBuffer). 2. The new _consumeAndCreateNew is annotated to consume self. This helps to reduce unnecessary retains/releases. The change applies for Array and ContiguousArray.
Revert "Disable objc_mangling.swift and SwiftObjectNSObject.swift tes…
Update WindowsBuild.md
…casts [AutoDiff] Support differentiation of branching cast instructions.
Make `SILCloner:visitAllocStack` correctly propagate the `[dynamic_lifetime]` attribute. Resolves SR-12886: differentiation transform error related to the `VJPEmitter` subclass of `SILCloner`.
…ftlang#31823) `Differentiable` conformance derivation now supports `Differentiable.zeroTangentVectorInitializer`. There are two potential cases: 1. Memberwise derivation: done when `TangentVector` can be initialized memberwise. 2. `{ TangentVector.zero }` derivation: done as a fallback. `zeroTangentVectorInitializer` is a closure that produces a zero tangent vector, capturing minimal necessary information from `self`. It is an instance property, unlike the static property `AdditiveArithmetic.zero`, and should be used by the differentiation transform for correctness. Remove `Differentiable.zeroTangentVectorInitializer` dummy default implementation. Update stdlib `Differentiable` conformances and tests. Clean up DerivedConformanceDifferentiable.cpp cruft. Resolves TF-1007. Progress towards TF-1008: differentiation correctness for projection operations.
Fix SIL locations and debug scopes in `VJPEmitter` for: - Pullback struct `struct` instructions - Predecessor enums `enum` instructions These instructions are not directly cloned from the original function and should have auto-generated locations. Resolves SR-12887: debug scope error for `VJPEmitter`-generated function.
[CMake] Simplify two binary variables into one tri-state variable
[IRGen] NFC: Narrow the scope of some code
Emit `/DEFAULTLIB` directive for `#pragma comment(lib, ...)` in a C module
stdlib: some small Array improvements to prepare for COW representation
stdlib: add `StringSwitch` to LLVMSupport fork
…ll-vector runtime: further isolate runtime from LLVMSupport
[Serialization] Skip SPI documentation in swiftdoc files
When resolving direct dependencies for a given Swift module, we go over all Clang module dependencies and add, as additional dependencies, their Swift overlays. We find overlays by querying `ASTContext::getModuleDependencies` with the Clang module's name. If the Clang module in question is a dependency of a Swift module with the same name, we will end up adding the Swift module as its own dependence. e.g. - Swift A depends on Clang A - Add Clang A to dependencies of Swift A - We look for overlays of Clang A, by name, and find Swift A - Add Swift A to dependencies of Swift A From what I can tell, the logic upstream is sound, and `getModuleDependencies` is doing the right thing, so this change is simply restricting what gets added when we are looking for overlays. Resolves rdar://problem/63731428
…hadowed-decls AST: Optimize removeShadowedDecls()
When generic metadata for a class is requested in the same module where the class is defined, rather than a call to the generic metadata accessor or to a variant of typeForMangledNode, a call to a new accessor--a canonical specialized generic metadata accessor--is emitted. The new function is defined schematically as follows: MetadataResponse `canonical specialized metadata accessor for C<K>`(MetadataRequest request) { (void)`canonical specialized metadata accessor for superclass(C<K>)`(::Complete) (void)`canonical specialized metadata accessor for generic_argument_class(C<K>, 1)`(::Complete) ... (void)`canonical specialized metadata accessor for generic_argument_class(C<K>, count)`(::Complete) auto *metadata = objc_opt_self(`canonical specialized metadata for C<K>`); return {metadata, MetadataState::Complete}; } where generic_argument_class(C<K>, N) denotes the Nth generic argument which is both (1) itself a specialized generic type and is also (2) a class. These calls to the specialized metadata accessors for these related types ensure that all generic class types are registered with the Objective-C runtime. To enable these new canonical specialized generic metadata accessors, metadata for generic classes is prespecialized as needed. So are the metaclasses and the corresponding rodata. Previously, the lazy objc naming hook was registered during process execution when the first generic class metadata was instantiated. Since that instantiation may occur "before process launch" (i.e. if the generic metadata is prespecialized), the lazy naming hook is now installed at process launch.
[Fast Dependency Scanner] Ensure Swift modules don't depend on self.
…ning [AutoDiff] Fix differentiation crashes related to definite initialization.
…a-prespecialization-components/classes [metadata prespecialization] Support for classes.
Make an internal KeyPath helper final.
[test] Shortened filenames for Windows.
…trust [NFC] Remove bits and pieces referring to Ubuntu 14.04 LTS (Trusty Tahr)
[ConstraintSystem] Add missing handling of `Stmt *` to `getLoc`
Make note on `PYTHON_EXECUTABLE` more prominent in WindowsBuild.md
MaxDesiatov
approved these changes
May 30, 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 : )