-
Notifications
You must be signed in to change notification settings - Fork 344
Make Swift result variables persistent #7141
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
Make Swift result variables persistent #7141
Conversation
rdar://113352990 |
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this a multimap, and why can it now be a (single) map?
I did a quick read of the places where equal_range
was used, but on first look it's not clear to me why it was a multimap, nor is it clear what DeclsAreEquivalent
was used for.
Note: DeclsAreEquivalent
is no longer used now as of this change.
I converted a
Let me check ... |
0aef830
to
57997a5
Compare
Fix call to the wrong version of SmallVector.erase() |
@swift-ci test |
Added a second NFC refactoring on top of this patch. |
@swift-ci test |
c6de5cd
to
97fd4a4
Compare
@swift-ci test |
875d14d
to
e2f7013
Compare
The last patch in the series is still WIP, in the sense of that I still need to add a test for it. |
@swift-ci test |
@swift-ci test windows |
@augusto2112 @kastiglione Would you mind taking another look at this? The goal here is to make Swift result variables portable between different SwiftASTContext instances. |
Generally, LLDB takes compiler plugin search paths from serialized options in Swift modules, however, for the REPL and Playgrounds it is useful to always add the host toolchain plugins by default. Unfortunately this is a property of the toolchain lldb is installed with, so this is not really testable from within an uninstalled build. rdar://112122752
ping :-) |
lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp
Outdated
Show resolved
Hide resolved
lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp
Outdated
Show resolved
Hide resolved
lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp
Outdated
Show resolved
Hide resolved
While also being more efficient and shorter, this is done mainly in preparation for followup changes.
A CompilerDecl is a pair of TypeSystem and Decl *. This is in preparation for a later patch.
…xtFE (NFC) This change is (somewhat surprisingly) NFC, since the list is only consumed by SwiftExpressionParser and only populated by it as well. When SwiftASTContextForExpressions is destroyed the persistent state is too.
4d75540
to
0451375
Compare
@swift-ci test |
@swift-ci test windows |
…ftTypeRefFE This allows result variables to persist across SwiftASTContexts. User declarations become invisible in other contexts (NFC) User imports also don't affect other contexts (NFC)
0451375
to
4cf27d9
Compare
@swift-ci test |
@swift-ci test windows |
1 similar comment
@swift-ci test windows |
While also being more efficient and shorter, this is done mainly in preparation for followup changes.