Skip to content

Commit

Permalink
Lower case kind-accelerated search
Browse files Browse the repository at this point in the history
Summary:
lower case search by name with kind filters for C++

Example:
```
Ks = { just = Class_ } : maybe codemarkup.types.SymbolKind; codemarkup.search.SearchByName { name = "create", language = Cpp, kind = Ks , searchcase = Insensitive }
3 results, 386 facts, 41.78ms, 54525576 bytes, 87380 compiled bytes
```

vs before:
```
fbsource> Ks = { just = Class_ } : maybe codemarkup.types.SymbolKind; codemarkup.search.SearchByName { name = "create", language = Cpp, kind = Ks , searchcase = Insensitive }

0 results, 0 facts, 10027.50ms, 35331600 bytes, 96809 compiled bytes
```

Reviewed By: simonmar

Differential Revision: D65645421

fbshipit-source-id: 8b13157f25eefbb19e1fb99cc038f0b209130fb9
  • Loading branch information
donsbot authored and facebook-github-bot committed Nov 11, 2024
1 parent 3a158a1 commit 53cc11d
Show file tree
Hide file tree
Showing 180 changed files with 3,134 additions and 4,410 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,6 @@
"exactness": 2
},
"symbol": "test/cpp//foo/S"
},
{
"kind": 15,
"language": 1,
"location": {
"filepath": "test.cpp",
"range": {
"columnBegin": 3,
"columnEnd": 11,
"lineBegin": 61,
"lineEnd": 61
},
"repository": "test"
},
"name": "s",
"qname": {
"container": "h",
"localName": "s"
},
"score": {
"exactness": 2
},
"symbol": "test/cpp//h/s/.decl"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,59 @@
{
"symbolDetails": [],
"symbols": [
{
"kind": 14,
"language": 1,
"location": {
"filepath": "test.cpp",
"range": {
"columnBegin": 1,
"columnEnd": 2,
"lineBegin": 210,
"lineEnd": 212
},
"repository": "test"
},
"name": "bar",
"qname": {
"container": "N1::N2::Bar",
"localName": "bar(N1::N2::N3::Foo)"
},
"score": {
"exactness": 2
},
"symbol": "test/cpp//N1/N2/Bar/bar/.f/N1::N2::N3::Foo"
},
{
"context": {
"qname": {
"container": "N1::N2",
"localName": "Bar"
},
"symbol": "test/cpp//N1/N2/Bar"
},
"kind": 14,
"language": 1,
"location": {
"filepath": "test.cpp",
"range": {
"columnBegin": 3,
"columnEnd": 27,
"lineBegin": 193,
"lineEnd": 193
},
"repository": "test"
},
"name": "bar",
"qname": {
"container": "N1::N2::Bar",
"localName": "bar(N1::N2::N3::Foo)"
},
"score": {
"exactness": 2
},
"symbol": "test/cpp//N1/N2/Bar/bar/.f/N1::N2::N3::Foo/.decl"
},
{
"kind": 14,
"language": 1,
Expand Down Expand Up @@ -49,6 +102,246 @@
},
"symbol": "test/cpp//N1/N2/foo/.f/N1::N2::N3::Foo/.decl"
},
{
"context": {
"qname": {
"container": "Q",
"localName": "QQ"
},
"symbol": "test/cpp//Q/QQ"
},
"kind": 14,
"language": 1,
"location": {
"filepath": "test.cpp",
"range": {
"columnBegin": 5,
"columnEnd": 17,
"lineBegin": 140,
"lineEnd": 140
},
"repository": "test"
},
"name": "bozzo",
"qname": {
"container": "Q::QQ",
"localName": "bozzo"
},
"score": {
"exactness": 2
},
"symbol": "test/cpp//Q/QQ/bozzo/.f//.decl"
},
{
"context": {
"qname": {
"container": "Q",
"localName": "QQ"
},
"symbol": "test/cpp//Q/QQ"
},
"kind": 14,
"language": 1,
"location": {
"filepath": "test.cpp",
"range": {
"columnBegin": 5,
"columnEnd": 30,
"lineBegin": 142,
"lineEnd": 142
},
"repository": "test"
},
"name": "getDouble",
"qname": {
"container": "Q::QQ",
"localName": "getDouble() const&"
},
"score": {
"exactness": 2
},
"symbol": "test/cpp//Q/QQ/getDouble/.f//const,lvalue/.decl"
},
{
"context": {
"qname": {
"container": "Q",
"localName": "QQ"
},
"symbol": "test/cpp//Q/QQ"
},
"kind": 14,
"language": 1,
"location": {
"filepath": "test.cpp",
"range": {
"columnBegin": 5,
"columnEnd": 26,
"lineBegin": 143,
"lineEnd": 143
},
"repository": "test"
},
"name": "getDouble",
"qname": {
"container": "Q::QQ",
"localName": "getDouble() &"
},
"score": {
"exactness": 2
},
"symbol": "test/cpp//Q/QQ/getDouble/.f//lvalue/.decl"
},
{
"context": {
"qname": {
"container": "Q",
"localName": "QQ"
},
"symbol": "test/cpp//Q/QQ"
},
"kind": 14,
"language": 1,
"location": {
"filepath": "test.cpp",
"range": {
"columnBegin": 5,
"columnEnd": 26,
"lineBegin": 144,
"lineEnd": 144
},
"repository": "test"
},
"name": "getDouble",
"qname": {
"container": "Q::QQ",
"localName": "getDouble() &&"
},
"score": {
"exactness": 2
},
"symbol": "test/cpp//Q/QQ/getDouble/.f//rvalue/.decl"
},
{
"context": {
"qname": {
"container": "Q",
"localName": "QQ"
},
"symbol": "test/cpp//Q/QQ"
},
"kind": 14,
"language": 1,
"location": {
"filepath": "test.cpp",
"range": {
"columnBegin": 5,
"columnEnd": 29,
"lineBegin": 148,
"lineEnd": 148
},
"repository": "test"
},
"name": "thango",
"qname": {
"container": "Q::QQ",
"localName": "thango(int, Q::QQ &&) &&"
},
"score": {
"exactness": 2
},
"symbol": "test/cpp//Q/QQ/thango/.f/int,Q::QQ+%26%26/rvalue/.decl"
},
{
"context": {
"qname": {
"container": "Q",
"localName": "QQ"
},
"symbol": "test/cpp//Q/QQ"
},
"kind": 14,
"language": 1,
"location": {
"filepath": "test.cpp",
"range": {
"columnBegin": 5,
"columnEnd": 28,
"lineBegin": 147,
"lineEnd": 147
},
"repository": "test"
},
"name": "thango",
"qname": {
"container": "Q::QQ",
"localName": "thango(int, Q::QQ &) &"
},
"score": {
"exactness": 2
},
"symbol": "test/cpp//Q/QQ/thango/.f/int,Q::QQ+%26/lvalue/.decl"
},
{
"context": {
"qname": {
"container": "Q",
"localName": "QQ"
},
"symbol": "test/cpp//Q/QQ"
},
"kind": 14,
"language": 1,
"location": {
"filepath": "test.cpp",
"range": {
"columnBegin": 5,
"columnEnd": 38,
"lineBegin": 146,
"lineEnd": 146
},
"repository": "test"
},
"name": "thango",
"qname": {
"container": "Q::QQ",
"localName": "thango(int, const Q::QQ &) const&"
},
"score": {
"exactness": 2
},
"symbol": "test/cpp//Q/QQ/thango/.f/int,const+Q::QQ+%26/const,lvalue/.decl"
},
{
"context": {
"qname": {
"container": "Q",
"localName": "QQ"
},
"symbol": "test/cpp//Q/QQ"
},
"kind": 14,
"language": 1,
"location": {
"filepath": "test.cpp",
"range": {
"columnBegin": 5,
"columnEnd": 43,
"lineBegin": 150,
"lineEnd": 150
},
"repository": "test"
},
"name": "thingo",
"qname": {
"container": "Q::QQ",
"localName": "thingo(pear<int, char>, Q::QQ &&) const"
},
"score": {
"exactness": 2
},
"symbol": "test/cpp//Q/QQ/thingo/.f/pear%3Cint%20+char%3E,Q::QQ+%26%26/const/.decl"
},
{
"kind": 14,
"language": 1,
Expand Down
Loading

0 comments on commit 53cc11d

Please sign in to comment.