forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
Resolve conflicts with upstream main
#3611
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
…l and consolidate all checks for argument and parameter label matches into new Param member function.
Once this flag is set, the type checker will bail out with a “expression to complex” error.
This commit refactors the way ASTs are being built in SourceKit and how `SwiftASTConsumer`s are served by the built ASTs. `SwiftASTManager.h` should give an overview of the new design. This commit does not change the cancellation paradigm in SourceKit (yet). That is, subsequent requests with the same `OncePerASTToken` still cancel previous requests with the same token. But while previously, we were only able to cancel requests that haven’t started an AST build yet, we can now also cancel the AST build of the to-be-cancelled requests. With this change in place, we can start looking into explicit cancellation of requests or other cancellation paradigms.
These should be obviously correct changes. These issues are exposed by our test suite after swiftlang#38675 is applied.
Validate input and set up the module alias map rdar://83316886
More specific diag msgs Add tests
This avoids a hashtable lookup when performing queries.
The use of the term 'uninhabited' does not make sense outside of formal type theoretic contexts. In Swift, we also do not use this term in a standard way - hence the term "structurally uninhabited" since we only consider products and sums eligible for the check. (Aside: We do not do exponentials because... well, Swift's type system implements Harper's "typerec" operator and as a consequence parametricity is just _not a thing_). I digress... So, improve upon the old diagnostic in two ways: 1) Do away with 'uninhabited' - instead, mention that it's either an enum or a tuple with an enum in it that 'has no cases' 2) Since the SIL parameter convention flattens all tuples, point directly at the offending uninhabited element type rdar://83600669
Previously, there was only a frontend flag to influence the LangOpts struct. Now, the flag can be set when running sil-opt which is important for testing.
Previously, the addArgumentToBranch only allowed one to add a single additional argument to a branch. It then verified the argument count. That is a problem if multiple arguments have to be added to arrive at the correct argument count. Specifically, that was a problem when running Mem2Reg on a lexical alloc_stack, where three new phi arguments are added. Here, the function name is changed to addArgumentsToBranch (plural arguments) and the function accepts a SmallVector<SILValue> rather than a single SILValue, allowing one to add all the arguments that are necessary in order to verify that the resulting number of arguments is correct.
When the -enable-experimental-lexical-lifetimes flag is enabled, the alloc_stack instructions which the pass replaces alloc_box instructions with have the lexical attribute.
SILGen turns vars into alloc_boxes. When possible, AllocBoxToStack turns those into alloc_stacks. In order to preserve the lexical lifetime of those vars, the alloc_stacks are annotated with the [lexical] attribute. When Mem2Reg runs, it promotes the loads from and stores into those alloc_stacks to uses of registers. In order to preserve the lexical lifetime during that transformation, lexical borrow scopes must be introduces that encode the same lifetime as the alloc_stacks did. Here, that is done.
…le-lookup AST: GenericSignatures point directly to their RequirementMachine
The goal here is not to eventually implement a concurrent thread pool ourselves. We're just making it easier for integrators who have their own pool and don't want to use Dispatch to build the Swift concurrency runtime. Just hook the right functions and you should be fine. The necessary functions to hook are: - swift_task_enqueueGlobal - swift_task_enqueueGlobalAfterDelay The following functions *would* be necessary to hook: - swift_task_enqueueMainExecutor - swift_task_asyncMainDrainQueue (only if you have an async main?) However, this configuration does not currently properly support the main executor, and so `@MainActor` should be avoided for now. rdar://83513751
Redo The Notes For "Uninhabited" Parameter Types
This is a case where a constructor overload choice might currently have an optional opened type, so make sure we can handle it. Arguably we shouldn't even be introducing constructors into the overload set here though, as it's invalid anyway.
Thanks to Erik for catching this. The instruction doesn't have an operand. It creates storage. The lexical attribute indicates that the storage corresponds to a source-level variable.
Adding build modes for libswift: off, hosttools, bootstrapping, bootstrapping-with-hostlibs The two bootstrapping modes are new. For details see libswift/README.md
…es/alloc_stack-doc-fix
…ss-concurrency-builds Revert "Allow building a concurrent libSwiftConcurrency without libdispatch"
Ignore `_M_realloc_insert` from the C++ standard library which is over-exported in libstdc++.
…freeing the RewriteContext
…tion [SourceKit] Support cancellation of requests while an AST is being built
These new cases match WASI-libc declarations at https://github.com/WebAssembly/wasi-libc/blob/ad513341/libc-bottom-half/headers/public/wasi/api.h#L106
Introduce a module alias option to the frontend. Validate and convert the input to a module alias map to be used by import resolution and sema. rdar://83316886
…ndencies These will be used by the RequirementMachine to compute requirement signatures. For now, they're not hooked up. ProtocolDecl::getStructuralRequirements() produces a list of Requirements with SourceLocs from the structural types written in the protocol's inheritance clause and 'where' clauses. ProtocolDecl::getProtocolDependencies() produces a list of protocols which appear on the right hand side of the protocol's conformance requirements.
ClangImporter: don't import clang SPI attributes by default
…rance Update symbol-visibility-linux.test-sh
RequirementMachine: Don't forget to delete requirement machines when freeing the RewriteContext
…ements AST: Add request to compute protocol structural requirements and dependencies
FileCheck on the rebranch doesn't allow undefined variables. If the variable is defined in a CHECK-NOT and the CHECK-NOT doesn't get hit, the variable isn't actually defined.
[CSSimplify] Fix a bug where the omitted projected value label was missing as an acceptable parameter label for property wrappers
[cxx-interop] A few misc. changes from swiftlang#38675.
…filecheck-vars Removing undefined variables from mem2reg_lifetime.sil
…subclasses Fixes rdar://83636964.
…-sendable-mess
libswift: bootstrapping build
# Conflicts: # stdlib/public/Platform/POSIXError.swift
kateinoigakukun
approved these changes
Sep 29, 2021
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.
The only conflict was caused by f34e321