Skip to content

Importer refactor #4737

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 7 commits into from
Sep 13, 2016
Merged

Importer refactor #4737

merged 7 commits into from
Sep 13, 2016

Conversation

milseman
Copy link
Member

Finally separates out importFullName from the Impl, and it now only
relies on relevant Swift and Clang information, but no importer
state. Convenience functionality, better APIs, and more clean up
coming soon.

Pull omitNeedlessWordsInFunctionName off of the Impl, and into a
static function local to ImportName.cpp. Separate it out from the Impl
entirely. Though this adds a couple of extra ugly parameters, it's one
of the last bits of tie-in between importFullName and the Impl.

By refactoring out PlatformAvailability from the ClangImporter, we can
more easily refactor out isUnavailableInSwift from the impl, which
will free us up to do more flexible import naming.

Introduces new files ClangAdapter.h/cpp, which will serve as a
convenient place to put code reasoning about Clang details. Refactors
out most Clang-related is*, has*, and get* methods from the
ImporterImpl. In the future, an adapter class could help serve to
seperate the concerns of the importer from the details of how to
correctly use Clang APIs.

Introduces new files ClangAdapter.h/cpp, which will serve as a
convenient place to put code reasoning about Clang details. Refactors
out most Clang-related is*, has*, and get* methods from the
ImporterImpl. In the future, an adapter class could help serve to
seperate the concerns of the importer from the details of how to
correctly use Clang APIs.

Pull off the caching code from the Impl and onto a new EnumInfoCache
class, that will be useful as we decouple import naming from the Impl
class state.

Delete stray comment

static-ize more methods

Resolves SR-NNNN.

Pull off the caching code from the Impl and onto a new EnumInfoCache
class, that will be useful as we decouple import naming from the Impl
class state.
Introduces new files ClangAdapter.h/cpp, which will serve as a
convenient place to put code reasoning about Clang details. Refactors
out most Clang-related is*, has*, and get* methods from the
ImporterImpl. In the future, an adapter class could help serve to
seperate the concerns of the importer from the details of how to
correctly use Clang APIs.
By refactoring out PlatformAvailability from the ClangImporter, we can
more easily refactor out isUnavailableInSwift from the impl, which
will free us up to do more flexible import naming.
Pull omitNeedlessWordsInFunctionName off of the Impl, and into a
static function local to ImportName.cpp. Separate it out from the Impl
entirely. Though this adds a couple of extra ugly parameters, it's one
of the last bits of tie-in between importFullName and the Impl.
Finally separates out importFullName from the Impl, and it now only
relies on relevant Swift and Clang information, but no importer
state. Convenience functionality, better APIs, and more clean up
coming soon.
@milseman
Copy link
Member Author

@swift-ci please smoke test

@milseman
Copy link
Member Author

flaky LLDB

@milseman
Copy link
Member Author

@shahmishal I thought LLDB tests were disabled?

@shahmishal
Copy link
Member

Linux smoke test still has LLDB test enabled, is this failure related to this change?

=============
Issue Details
=============
ERROR: [EXCEPTIONAL EXIT 6 (SIGABRT)] <no_running_test_method> (lang/cpp/stl/TestSTL.py)

Master Linux LLDB bot has been passing, https://ci.swift.org/job/oss-lldb-incremental-linux-ubuntu-14_04/

@milseman
Copy link
Member Author

Unless horribly misnamed (definitely a possibility), I don't see how a test named "lang/cpp/stl/TestSTL.py" would be relevant to the Swift project.

@milseman
Copy link
Member Author

@swift-ci please smoke test Linux Platform

@milseman milseman merged commit c4a37ce into swiftlang:master Sep 13, 2016
@milseman milseman deleted the importer_refactor_5 branch September 21, 2016 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants