Jacob Dufault
699cf4b506
Fix IndexUpdate::ToString
2018-02-11 17:15:08 -08:00
Jacob Dufault
593ecd8f53
Rename Maybe::has_value to Maybe::HasValue to follow naming conventions
2018-02-11 13:56:34 -08:00
Jacob Dufault
b71cf25186
Query GetFileId returns Maybe<QueryFileId>
2018-02-11 13:42:48 -08:00
Fangrui Song
aee79b3617
variable_type -> type; remove parent_{id,kind} (they should be inferred from Def::spell; clean up SymbolIdx, Reference, SymbolRef
2018-02-11 10:28:26 -08:00
Fangrui Song
0f8734c416
Make NTString nullable
2018-02-11 09:12:22 -08:00
Fangrui Song
e019968f51
Add lexical parent to Func
2018-02-10 20:30:27 -08:00
Fangrui Song
9a6cbafa04
Add lexical parent to Type/Var and definition_spelling->spell, definition_extent->extent
2018-02-10 20:23:46 -08:00
Fangrui Song
420e84329b
Derive SymbolRef,Use from Reference and add lexical container to func/var/type uses
2018-02-10 17:33:56 -08:00
Fangrui Song
c28426bbb4
Remove QueryLocation and clean up
2018-02-09 19:13:50 -08:00
Fangrui Song
50cf05763b
Query* structs: QueryLocation -> Reference
2018-02-09 17:50:47 -08:00
Fangrui Song
aa125e34f3
Work around SIGSEGV and simplify SymbolIdx
2018-02-09 17:05:17 -08:00
Fangrui Song
95515643d8
Remove ToSymbol
2018-02-09 15:39:55 -08:00
Fangrui Song
c4bd7ef44b
Rename Reference members
2018-02-09 14:12:35 -08:00
Fangrui Song
67e8132dbe
struct QueryFuncRef : Reference {};
2018-02-08 23:10:54 -08:00
Fangrui Song
4bfb5a3586
struct IndexFuncRef : Reference {};
2018-02-08 22:06:09 -08:00
Fangrui Song
82b429bfbc
QueryLocation -> Reference
2018-02-08 21:26:34 -08:00
Fangrui Song
2d255da07b
{Index,Query}Type::uses: Range/QueryLocation -> Reference
...
And add serialization for Reference
2018-02-08 18:26:09 -08:00
Fangrui Song
715fece4dd
QueryLocation and QueryRef
2018-02-08 10:15:55 -08:00
Fangrui Song
dbdab02ff4
Change is_implicit to role in {Index,Query}FuncRef
...
Add `FileId file` to *DefDefinitionData::Def
2018-02-07 23:27:35 -08:00
Fangrui Song
10c2843846
Add IndexLocation and add role to QueryLocation
...
IndexFuncRef should be deprecated in favor of IndexLocation
2018-02-07 19:10:39 -08:00
Fangrui Song
9b0256355e
Address ODR violation spot by @Riatre and work around .o .a in compile_commands.json
2018-02-07 10:27:30 -08:00
Fangrui Song
9e730aacd4
Make before_deploy.sh work on FreeBSD
2018-02-06 22:46:05 -08:00
Fangrui Song
e440a7c52f
Convert some copy constructors to move constructors in query.cc
2018-02-06 21:45:58 -08:00
Fangrui Song
55c7519e93
Move ImportOrUpdate and header cleanup
2018-02-06 21:27:07 -08:00
Fangrui Song
0016d214c3
Convert copy constructor to move constructors piecemeal
...
If I replace all the important constructors used in query.cc, there will be a weird issue that strings following "Applying index update for " are empty.
2018-02-06 20:54:17 -08:00
Fangrui Song
1a82f1f113
We may should represent Query{Func,Type,Var} as a bag of definitions and references
2018-02-05 10:16:43 -08:00
Fangrui Song
3839d1e5ab
Decouple QueryDb_ImportMain
2018-02-04 21:22:21 -08:00
Fangrui Song
985dec101d
Generation
2018-02-03 19:51:30 -08:00
Fangrui Song
0a721ff247
Simplify query.h
2018-02-03 18:16:30 -08:00
Fangrui Song
e5128d3db9
Wrap Query* references with WithGen
2018-02-03 17:44:20 -08:00
Fangrui Song
3d6d000297
Add Generation gen;
to Query{Func,Type,Var} and corresponding ToQueryLocation
2018-02-03 14:52:26 -08:00
Fangrui Song
6933870962
Change symbol id from size_t to RawId (uint32_t currently)
2018-02-03 10:35:17 -08:00
Fangrui Song
e42f6b6191
optional<...> GetQuery*IdFromUsr -> Maybe
2018-02-01 23:17:34 -08:00
Fangrui Song
ae999f9c92
size_t Query*::symbol_idx -> Maybe<Id<void>>
2018-02-01 22:52:03 -08:00
Fangrui Song
392cd79d04
Add Maybe<T> and change definition_{spelling,extent} from optional to Maybe
...
sizeof(db->funcs[0].def) decreases from 248 to 232
sizeof(db->types[0].def) decreases from 272 to 256
sizeof(db->vars[0].def) decreases from 184 to 168
2018-02-01 21:39:23 -08:00
Fangrui Song
ce6f1c7294
QueryDatabase::{detailed_names,short_names} -> GetSymbol{DetailedName,ShortName}
2018-02-01 18:15:22 -08:00
Fangrui Song
2fb85732c0
Add RemoveSymbol
2018-02-01 17:25:06 -08:00
Fangrui Song
642975ea17
Reflect string_view and fix workspace/symbol
2018-02-01 13:48:41 -08:00
Fangrui Song
8108de0cfa
Change short_names/detailed_names from const std::string& to std::string_view
2018-01-31 19:53:50 -08:00
Fangrui Song
77dca1936b
Change TypeDefDefinition::short_name from string to string_view
2018-01-30 23:01:59 -08:00
Fangrui Song
93269ecfd4
Change std::string FuncDefDefinition::short_name to ShortName()
2018-01-30 22:40:02 -08:00
Fangrui Song
41f87887bb
Change std::string VarDefDefinition::short_name to ShortName()
2018-01-30 22:04:55 -08:00
Jacob Dufault
f6a2a55209
Import pipeline improvements
...
- Cache manager is created by request
- Index is always associated with its contents
- Reduced frequently of file reads
2018-01-29 21:34:36 -08:00
Jacob Dufault
0eb7d415d7
usr_to_file uses new NormalizedPath type
2018-01-29 16:56:00 -08:00
Jacob Dufault
a392301be3
Format
2018-01-29 16:27:43 -08:00
Fangrui Song
795dfc670c
Update tests after specialization handling
2018-01-28 23:40:57 -08:00
Fangrui Song
16bf3158c5
Add SymbolRole to SymbolRef and fix $cquery/{base,derived} by ordering definitions before uses
2018-01-28 20:39:41 -08:00
Fangrui Song
bdb880e0a5
Serialize VarDefDefinitionData::{parent_kind,parent_id}
2018-01-28 12:34:31 -08:00
Fangrui Song
5763201838
Remove is_type_member & VarDefDefinitionData::declaring_type
...
Rename ClangStorageClass to StorageClass
Add semantic_parent & semantic_parent_kind (but not serialized yet)
Move query.h SymbolKind to indexer.h SymbolKind and make it uint8_t
2018-01-27 20:46:06 -08:00
Fangrui Song
d605217c1a
matcher.cc: use std::regex_search instead of std::regex_match
...
Prototype of non-working `dependencies` parameter of $cquery/freshenIndex
2018-01-27 10:42:18 -08:00