forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
[pull] swiftwasm from main #4551
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
…t part of the AST The code completion might occur inside an attriubte that isn’t part of the AST because it’s missing a `VarDecl` that it could be attached to. In these cases, record the `CustomAttr` and type check it standalone, pretending it was part of a `DeclContext`. This also fixes a few issues where code completion previously wouldn’t find the attribute constructor call and thus wasn’t providing code completion inside the property wrapper. rdar://92842803
… rename Previously, we only walked the parent scope of the decl context that declared the value to rename if it was a TopLevelCodeDecl. But also functions can have locally declared types that can be used in sibling scopes. Thus, we always need to walk the parent DeclContext of the one declaring the value we are renaming. rdar://89836229
When a reflection section has a size that only fits a partial record, we detect it, log an error, and abort. However, things like Remote Mirror need to be robust to bad data, so instead handle this by terminating iteration at the last full record.
…nction call For enum cases with associated values, their construction is modelled by a function. E.g. if you have ```swift enum Foo { case first(associated: Int) } ``` then `Foo.first` is a function of type `(Int) -> Foo`. But if you write `Foo.first(associated: 2)` in source code, we consider this construct as a referenced, not a call. This causes us to miss renaming of associated value labels during local refactoring. rdar://84061868
…t succeed. The shared cache tables can only point to things within the shared cache, so if the protocol, ObjC class, or type descriptor are outside the shared cache, we know that the lookup will fail and we can skip it. rdar://90427793
…ry results When a variable is re-declared using shorthand syntax (`[foo]` closure capture or `if let foo {`), the user doesn’t perceive this as a new variable declaration. Thus, we should return the original declaration as a secondary result. rdar://91311033 rdar://75455650
Previously, we weren’t annotation code completion results for variables with async or throwing getters as 'async' or 'throws'. rdar://93085311
Treat a prefix operator containing `/` the same as the unapplied infix operator case, where we tentatively lex. This means that we bail if there is no closing `/` or the starting character is invalid. This leaves binary operator containing `/` in expression position as the last place where we know that we definitely have a regex literal.
Previously we would only check for a starting character of `)` when performing a tentative lex of a regex literal. Expand this to cover the entire range of the regex literal, ensuring to take escapes and custom character classes into account.
…on-hole-prop [Sema] Allow optional hole propagation in code completion mode
…d-cache-protocol-conformances [Runtime] Skip shared cache protocol conformance queries we know won't succeed.
…n-size-handling [Reflection] Gracefully handle reflection sections with bad sizes.
…ftlang#58729) * properly handle `isolated` and `_const` type reprs when printing rdar://92756749 * make switch non-exhaustive
This just deletes some outdated material, but really the whole paper needs an overhaul and some major additions to describe generic signature minimization too.
I don’t see much of a reason to limit these to validation-test. rdar://91972087
…Ref and not a String and introduce the StringRef struct. It's more efficient. Also, rename the `HasName` protocol to `HasShortDescription`, which introduces the new requirement `shortDescription`. This is need because `name` now has `StringRef` type and not `String` anymore
* add the `Ownership` enum and the `Value.ownership` getter * add `Function.hasOwnership`
* split the PassUtils.swift file into PassContext.swift and Passes.swift * rework `Builder` bridging allowing more insertion point variations, e.g. inserting at the end of a block. * add Builder.create functions for more instructions * add `PassContext.splitBlock` * move SIL modification functions from PassContext to extensions of the relevant types (e.g. instructions). * rename `Location.bridgedLocation` -> `Location.bridged`
and re-factor `Value.definingInstruction`
... to get the enum case index with a given name.
…AvailableIn:) Utilities to make a value available to be used in another basic block. Inserts required `copy_value` and `destroy_value` operations in case the destination block is in a different control region than the value. For example, if the destination block is in a loop while the value is not in that loop, the value has to be copied for each loop iteration.
Generation of valid JSON output for parseable output depends on being able to determine file types of inputs and outputs of compilation tasks. FileTypes.def defines multiple file kinds with multiple '.' extensions, such as '.abi.json' or '.features.json', but existing code attempted to compute file outputs only using the trailing suffix of the path after the last '.'. This led to some files not being recognized, which led to us not being able to generate valid JSON. Resolves rdar://92961252
RequirementMachine: Minor documentation updates
…WhenEarlyFail [Parseable Output] Compute file extensions using full extension strings
[Docs] Updating Getting started documentation from JIRA to Swift Issues
'AnyObject' cannot be instantiated, we shouldn't be providing any initializers on 'AnyObject' type. 'AnyObject(<HERE>' and global completions with initializers (i.e. `addinitstotoplevel`) showed all initializers from objc classes. Note that, 'lookupVisibleMemberDecls()' on 'AnyObject' (i.e. 'AnyObject.<HERE>') doesn't return initializers even before this change. But 'QualifiedLookup' did. rdar://93059166
…ttest-modules [test] Always build StdlibCollectionUnittest and StdlibUnicodeUnittest
…ectinit-rdar93059166 [CodeCompletion] Don't suggest initializers on 'AnyObject'
Improvements and additions to Swift SIL infrastructure
[CodeCompletion] Annotate variables with effectful getters
…property-attribute [CodeCompletion] Support type checking attributes even if they are not part of the AST
This reverts commit 3be4a03. The tests were failing on linux because of C++ string interop is now used in Function.name. As Function.name now returns a StringRef, this should not be a problem anymore. Though, the underlying problem is not fixed.
Revert "Gating failing SILOptimizer tests"
Previously if you changed `libstdcxx.h` or `libstdcxx.modulemap` locally and ran an incremental build, the artifacts weren't updated.
…info [CursorInfo] Report values shadowed using shorthand syntax as secondary results
…s-call [Index] Consider construction of enums with associated values as a function call
…ifferent [cxx-interop] Copy libstdc++ resources again if the sources changed
rdar://93247418 rdar://92963081
disable 3 tests on linux
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 : )