[PATCH] D50337: [clangd] DexIndex implementation prototype
Kirill Bobyrev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 7 08:23:53 PDT 2018
kbobyrev updated this revision to Diff 159515.
kbobyrev added a comment.
Continue implementing Proof of Concept Dex-based static index replacement.
This diff adds short query processing, the current solution does not utilize iterators framework (unlike the general queries) yet and is a subject to change. As discussed offline, this implementation should lean towards simplicity and usability rather then premature optimization.
The patch is still not ready for a comprehensive review yet, these are few points which should be addressed before the review is live:
- Code duplication should be reduced as much as possible. `DexIndex` is likely to become way more sophisticated than `MemIndex` in the future and hence it does not simply inherit or reuse `MemIndex`, this is also a reason why (as discussed offline) code duplication in unit tests is not that bad keeping in mind that the functionality and implementation of both types of index will diverge in the future. However, it's better to abstract out as much as possible if the implementation does not become less flexible and cross-dependencies are not introduced in the process.
- Slightly cleaning up unit tests (`IndexHelpers.(h|cpp)` is not a very good name for the new file used by both `MemIndex` and `DexIndex` testing framework, code duplication is also a slight concern)
https://reviews.llvm.org/D50337
Files:
clang-tools-extra/clangd/CMakeLists.txt
clang-tools-extra/clangd/index/MemIndex.h
clang-tools-extra/clangd/index/dex/DexIndex.cpp
clang-tools-extra/clangd/index/dex/DexIndex.h
clang-tools-extra/clangd/index/dex/Token.cpp
clang-tools-extra/clangd/index/dex/Token.h
clang-tools-extra/unittests/clangd/CMakeLists.txt
clang-tools-extra/unittests/clangd/DexIndexTests.cpp
clang-tools-extra/unittests/clangd/IndexHelpers.cpp
clang-tools-extra/unittests/clangd/IndexHelpers.h
clang-tools-extra/unittests/clangd/IndexTests.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50337.159515.patch
Type: text/x-patch
Size: 30018 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180807/9ba69c3e/attachment-0001.bin>
More information about the cfe-commits
mailing list