[PATCH] D51982: [clangd] Introduce PostingList interface

2018-09-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE342155: [clangd] Introduce PostingList interface (authored by omtcyfz, committed by ). Changed prior to commit: https://reviews.llvm.org/D51982?vs=165324&id=165325#toc Repository: rCTE Clang Tools

[PATCH] D51982: [clangd] Introduce PostingList interface

2018-09-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 165324. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Pull `DocID` to `Iterator.h`. https://reviews.llvm.org/D51982 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/Dex.cpp clang-tools-extra/cla

[PATCH] D51982: [clangd] Introduce PostingList interface

2018-09-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Iterator.h:39 #include +#include "PostingList.h" kbobyrev wrote: > sammccall wrote: > > Why this dep? Seems circular > `Iterator` interface uses `DocID`, so I guess it should depen

[PATCH] D51982: [clangd] Introduce PostingList interface

2018-09-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev marked an inline comment as done. kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Iterator.h:39 #include +#include "PostingList.h" sammccall wrote: > Why this dep? Seems circular `Iterator` interface uses `DocID`, so I

[PATCH] D51982: [clangd] Introduce PostingList interface

2018-09-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 165320. kbobyrev added a comment. Wording: traversed *in order*. https://reviews.llvm.org/D51982 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/Dex.cpp clang-tools-extra/clangd/index/dex/Dex.h clang-tools-extra/cl

[PATCH] D51982: [clangd] Introduce PostingList interface

2018-09-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 165318. kbobyrev marked an inline comment as done. https://reviews.llvm.org/D51982 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/Dex.cpp clang-tools-extra/clangd/index/dex/Dex.h clang-tools-extra/clangd/index/dex/I

[PATCH] D51982: [clangd] Introduce PostingList interface

2018-09-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Great! Comment at: clang-tools-extra/clangd/index/dex/Iterator.cpp:11 #include "Iterator.h" +#include "PostingList.h" #include And here ==

[PATCH] D51982: [clangd] Introduce PostingList interface

2018-09-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 165298. kbobyrev added a comment. Remove artifacts from assertion messages. https://reviews.llvm.org/D51982 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/Dex.cpp clang-tools-extra/clangd/index/dex/Dex.h clang-too

[PATCH] D51982: [clangd] Introduce PostingList interface

2018-09-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 165297. kbobyrev added a comment. Don't create abstractions for now. https://reviews.llvm.org/D51982 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/Dex.cpp clang-tools-extra/clangd/index/dex/Dex.h clang-tools-extr

[PATCH] D51982: [clangd] Introduce PostingList interface

2018-09-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 165268. kbobyrev marked 2 inline comments as done. https://reviews.llvm.org/D51982 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/Dex.cpp clang-tools-extra/clangd/index/dex/Dex.h clang-tools-extra/clangd/index/dex/I

[PATCH] D51982: [clangd] Introduce PostingList interface

2018-09-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. At a high level: making posting lists an abstract type adds another layer of indirection, which we can use to solve problems. It also has costs, mostly conceptual complexity. What problems are we solving? - if **we want to dynamically use a different representation fo

[PATCH] D51982: [clangd] Introduce PostingList interface

2018-09-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 165256. kbobyrev marked 3 inline comments as done. https://reviews.llvm.org/D51982 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/Dex.cpp clang-tools-extra/clangd/index/dex/Dex.h clang-tools-extra/clangd/index/dex/I

[PATCH] D51982: [clangd] Introduce PostingList interface

2018-09-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Dex.cpp:125 + for (const auto &TokenToPostingList : TempInvertedIndex) +InvertedIndex.insert( +{TokenToPostingList.first, nit: `InvertedIndex[TokenToPostingList.first] = bui

[PATCH] D51982: [clangd] Introduce PostingList interface

2018-09-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 165224. kbobyrev added a comment. Add documentation, don't expose `PostingList` interface implementations in the public API (similarly to `Iterator`). https://reviews.llvm.org/D51982 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/cla

[PATCH] D51982: [clangd] Introduce PostingList interface

2018-09-12 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. There is not enough documentation right now, I should fix that before patch could be reviewed. This is a preview mode. Also, Index size estimation is incorrect now and will be fixed in the next diff. https://reviews.llvm.org/

[PATCH] D51982: [clangd] Introduce PostingList interface

2018-09-12 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, mgorny. This patch introduces `PostingList` interface which is helpful for experiments with Spar