forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
[pull] swiftwasm from main #4276
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
This adds the memoryapi submodule to WinSDK which isolates the memoryapi contract. This enables additional functions such as `QueryVirtualMemoryRegion` to now be available.
Previously, ImportDiagnosticTarget was a PointerUnion of five types. This required more spare bits than were available on 32-bit platforms, so the compiler (and more importantly, lldb) could not be built for those. Fortunately, it turns out that there’s no good reason for `clang::ModuleMacro` to be part of the pointer union—we always convert it to `clang::MacroInfo` before looking up diagnostics anyway. Removing it gets us back into territory which ought to be 32-bit-safe. Fixes rdar://88922618.
This is ported from the SavedInsertionPointRAII at the SIL level. I thought that I needed this to accomplish some of my recent work, but I was wrong. Still seemed useful enough to upstream it.
[NFC] 32-bit-safe ImportDiagnosticTarget
This fix unblocks unrelated optimizer commits. A unit test will be introduced with those commits. The RAUW utility does not correctly handle reborrows. It is in the middle of being rewritten. For now, simply bail out since this isn't an important case to optimize.
Update the links for Package bot and drop Ubuntu 16.04
Temporary fix for OSSA RAUW utilities.
…mbers Platform: add a new submodule to WinSDK
Both instance members and static methods.
…rite Use Swift.def to define enums and switch cases for swift5 reflection sections
Comments are not rendered as justified by spacing. This corrects the spacing of the comment to match the style of the codebase.
Convert 'ContextFreeCodeCompletionResult' constructor overloads to 'create()' factory methods. This is the consistent interface with 'CodeCompletionString'. NFC
The classifyInstruciton function shouldn't modify state.
Add a new member functino UniqueStorageUseVisitor::visitBeginAccess and call it when GatherUniqueStorageUses runs.
In addition to hoisting destroy_addrs for alloc_stacks and function arguments, also hoist begin_access [modify] insts. Hoist starting from innermost scopes and proceeding outwards.
To create more opportunities for hoisting.
Restructured its DeinitBarrier's type a bit to avoid having to pass KnownStorageUses and ignoreDeinitBarriers around too much.
Extract code for classifying instructions out of the one data flow where it is currently used into the DeinitBarriers type. This will facilitate a second data flow which needs to access the same info and adding an isBarrier member function to DeinitBarriers for use by folding.
If the destroy_addr's barrier is an end_access, try to fold with copies or loads that occur inside the scope so long as there are no barriers between the destroy_addr and the instruction it is to be fold with.
Added a second backward reachability data flow that determines whether any open access scopes contain barriers. The end_access instructions for those access scopes are themselves barriers.
Tested that import enum case is optimized appropriately without the classic DestroyHoisting pass.
[cxx-interop] Remove no-op casts.
…ent-types [cxx-interop] Fix calling methods with dependent types.
When calling a generic function with an argument of existential type, implicitly "open" the existential type into a concrete archetype, which can then be bound to the generic type. This extends the implicit opening that is performed when accessing a member of an existential type from the "self" parameter to all parameters. For example: func unsafeFirst<C: Collection>(_ c: C) -> C.Element { c.first! } func g(c: any Collection) { unsafeFirst(c) // currently an error // with this change, succeeds and produces an 'Any' } This avoids many common sources of errors of the form protocol 'P' as a type cannot conform to the protocol itself which come from calling generic functions with an existential, and allows another way "out" if one has an existention and needs to treat it generically. This feature is behind a frontend flag `-enable-experimental-opened-existential-types`.
This reverts commit 6e7fff7e65283ae9b25116fa6b75ba92fd2f2a58. The asymmetry between opening for optional parameters and optional arguments is surprising enough that we're currently opting not to allow them.
DiagnosticVerifier: Support line offsets in fix-it verification ranges
Filter name for completion item is always used. Also, for cached items, they are used multiple times for filtering. So precomputing and caching it improves performance. rdar://84036006
Also, use StringRef.copy() instead of copyString().
This is convenient for clients to pass these fields values to C functions. Introduce NullTerminatedStringRef to guarantee that.
IRGen: tweak spacing in comment (NFC)
Before hoisting destroy_addrs, we split store [assign]s into destroy_addrs and store [init]s. If those destroy_addrs were not able to be hoisted, though, recombine the two back into a store [assign]. Doing so avoids introducing extra ARC traffic.
…b363ce49caf55b57bb51abc [irgen] Implement irgen::IRBuilder::SavedInsertionPointRAII.
If an overload locator couldn't be simplified to its anchor, fallback to the anchor of the locator instead. Also add an assert so that we can track down whether this is actually valid or not. Resolves rdar://89097800.
Unblock the bots while I find a solution to the crash.
…-on-i386-to-fix-bots [nfc] XFAIL dependent-types.swift on i386 while I fix the issue.
…e contexts". We used to incorrectly forward inout paramters in the thunk for both template paramters that aren't used in the signature and in the thunk for dependent types as Any. Now this works in the simple case. We'll need to do something more complicated when we have an `inout Any` for dependent types because we will need to somehow cast without copying. This will probably require synthesising the SIL of the thunk manually.
…cleanup [runtime][NFC] Unify reportOnCrash implementations into a single function
When compiling with Swift 6 mode, but using a serialized module that is using Swift 5 that contains a struct with global-actor isolation on its stored property, we should not emit an error for that stored property. Only a warning was emitted when compiling that module, but the checks here were treating that module as being type-checked again under a Swift 6 world.
…es/lexical_destroy_addr_hoisting/handle-access-scopes [SSADestroyHoisting] Handle access scopes.
…precompute [CodeCompletion] Precompute "filter name"
…back [CS] Add a fallback for overload locators that failed to simplify
accept serialized modules with superflous global-actor annotations
MaxDesiatov
approved these changes
Feb 19, 2022
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 : )