forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
[pull] swiftwasm from main #5531
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
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
…an't be passed in registers This ensures that a C++ record with only ObjC ARC pointers with trivial other members is passed by value in SIL Fixes swiftlang#61929
…ntDistinctOverloads`
…same type If there are multiple overloads, let's skip locations that produce the same type across all of the solutions, such location is most likely a consequence of ambiguity and not its source. Resolves: rdar://109245375
Instead of diagnosing in CSApply, let's create a fix and diagnose in the solver instead. Additionally, make sure we assign ErrorTypes to any VarDecls bound by the invalid pattern, which fixes a crash. rdar://110638279
Allow keywords after `#` in freestanding macro expansions There is no reason why we shouldn’t allow keywords here. I also thought about allowing keywords after `@` but things become tricky here for two reasons: - In the parser, we parse a type after the `@`, which could start with a keyword itself (e.g. `any`). If we want to keep the parser logic to parse a type after `@` (which I think we should), then it becomes unclear what `@any T` should parse as. - We allow a space between `@` and the type name. This makes it very hard for recovery to tell whether `@ struct` refers to an attribute with name `struct` or if the user forgot to write the attribute name after `@`. Since almost all keywords are lowercase and attached member macros are usually spelled with an uppercase name, there are a lot fewer chances for clashes here, so I don’t think it’s worth allowing keywords after `@`. swiftlang#66444 rdar://110472060
…ed properties that have `init` accessor Initialization expressions are not allowed on computed properties but if a property has `init` accessor it should be allowed because it could be used by a memberwise initializer.
…t failure on macOS
While collecting originalLiveBlocks, walking backward from consuming blocks, if a visited block is already in originalLiveBlocks, don't visit its predecessors. Continuing the backwards walk is wasteful. rdar://110854874
Previously only stored properties could be initializable but with introduction of init accessors computed properties gained an ability to specify initialzer expression and participation in memberwise initialization for structs.
…rties for memberwise init
Record up to two errors emitted when we fail to load a module for interface generation, and include these errors in the message we pass back to the editor. This should help us better pin down the reason why interface generation failed. rdar://109511099
Previously plugin search options were serialized for each option kind. Instead serialize them in the order specified.
…tanding-macro-names [Macros] Allow keywords after `#` in freestanding macro expansions
…empty-impls [Distributed] Harden typechecker against completely empty DAS types
[CanonicalizeOSSALifetime] Bail early in lifetime extension backwards walk.
[Build] Set swift-stdlib-tracing=0 for minimal stdlib builds.
[cxx-interop] Itanium ABI C++ records should have address-only layout when they can't be passed in registers
ConditionalClauseInitializerScope often create redundant scopes, however, they are needed to correctly represent the scopes in an expression such as: if case .something(let foo), let foo = foo. This patch changes SILGen to lower them 1:1 from ASTScopes. rdar://110841130
Vars of such types should be given lexical `alloc_stack`s by `AllocBoxToStack` which requires that the `alloc_box` insts formed for them have an associated borrow scope which in turn requires that type lowering for move only structs and enums have their lexical bits set. rdar://110901430
Fix the failures on the oss-swift_tools-RA_stdlib-DA_test-device-non_executable bot.
Vars of such types should be given lexical `alloc_stack`s by `AllocBoxToStack` which requires that the `alloc_box` insts formed for them have an associated borrow scope which in turn requires that type lowering for move only structs and enums have their lexical bits set. rdar://110901430
…pipeline The last dead-store-elimination pass can expose opportunities for dead object elimination. rdar://110846405
[Diagnostics] Skip overloaded locations where all solutions have the same type
According to language rules, such lifetimes are fixed and the relative order of their deinits is guaranteed. rdar://110913116
…ipeline Optimizer: add an additional DeadObjectElimination at the end of the pipeline
[TypeLowering] Move-only types are lexical.
According to language rules, such lifetimes are fixed and the relative order of their deinits is guaranteed. rdar://110913116
The previous lazy discovery did not always work because sometimes a debug_value is emitted before the first SIL instruction in the variable's scope. rdar://110841130
The members were declared but undefined.
Its storage vector is intended to be of some type like `std::vector<std::pair<Key, Optional<Value>>>`, i.e., some collection of pairs whose `second` is an `Optional<Value>`. So when constructing a default instance of that pair, just construct an Optional in the None case.
Corresponding to swiftlang/swift-driver#1377, this adds some default plugin paths for Darwin SDKs and platforms. Fixes rdar://110819604.
…-plugin-paths [Macros] Add default plugin paths for Darwin SDKs and platforms.
…pluginopts [Macros] Update plugin search options serialization
…nsuming this was staged in as a warning initially but it was intended to be an error if it is not written so that we can move to a world where these pattern matches are done as a borrowing operation instead. rdar://110908714
swiftlang#66707) * [IRGen] Use EnumImplStrategy to generate getEnumTag function for layout strings rdar://110794898 The implementation in TypeLayout seems to have a bug causing wrong tags to be returned on 32 bit systems. * Don't use unsupported types in tests
Enable IRGen/protocol_metadata test on Apple Silicon
[SILOptimizer] Don't optimize move-only lifetimes.
require `consume x` for noncopyable pattern bindings since they're consuming
FieldSensitivePrunedLiveness is used as a vectorization of PrunedLiveness. An instance of FSPL with N elements needs to be able to represent the same states as N instances of PL. Previously, it failed to do that in two significant ways: (1) It attempted to save space for which elements were live by using a range. This failed to account for instructions which are users of non-contiguous fields of an aggregate. apply( @owned (struct_element_addr %s, #S.f1), @owned (struct_element_addr %s, #S.f3) ) (2) It used a single bit to represent whether the instruction was consuming. This failed to account for instructions which consumed some fields and borrowed others. apply( @owned (struct_element_addr %s, #S.f1), @guaranteed (struct_element_addr %s, #S.f2) ) The fix for (1) is to use a bit vector to represent which elements are used by the instruction. The fix for (2) is to use a second bit vector to represent which elements are _consumed_ by the instruction. Adapted the move-checker to use the new representation. rdar://110909290
Dumped more info and called llvm_unreachable on bad state.
Previously, the checker inserted destroys after each last use. Here, extend the lifetimes of fields as far as possible within their original (unchecked) limits. rdar://99681073
It's always the first line of the function, so try to do better.
Passing ``` -Xllvm -move-only-address-checker-disable-lifetime-extension=true ``` will skip the maximization of unconsumed field lifetimes.
…debug_info_opaque_ptrs [DebugInfo] Update tests to use opaque ptrs
SILDebugScopes: Don't ignore ConditionalClauseInitializerScope.
[FieldSensitivePL] Fix vectorization.
[MoveOnlyAddressChecker] Maximize lifetimes.
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]
Can you help keep this open source service alive? 💖 Please sponsor : )