aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Use attr location for builtin macro goto-impEdwin Cheng2020-01-121-1/+23
|
* Apply review suggestionsFlorian Diebold2020-01-112-2/+4
|
* Qualify some paths in 'add missing impl members'Florian Diebold2020-01-113-0/+33
|
* Split `infer` query into two for better profilingMichal Terepeta2020-01-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the same change as we did with `crate_def_map` and it does seem that we mostly spend time in salsa, without recomputing much on rust-analyzer side. Example output: ``` 233ms - handle_inlay_hints 163ms - get_inlay_hints 163ms - SourceAnalyzer::new 67ms - def_with_body_from_child_node 67ms - analyze_container 67ms - analyze_container 67ms - Module::from_definition 67ms - Module::from_file 67ms - crate_def_map 0ms - parse_macro_query (6 calls) 0ms - raw_items_query (1 calls) 66ms - ??? 0ms - crate_def_map (1 calls) 0ms - crate_def_map (1 calls) 96ms - infer 2ms - trait_solve_query (2 calls) 94ms - ??? 0ms - body_with_source_map_query (1 calls) 0ms - crate_def_map (1 calls) [...] ``` Signed-off-by: Michal Terepeta <[email protected]>
* Split `crate_def_map` into two methodsMichal Terepeta2020-01-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change: - introduces `compute_crate_def_map` query and renames `CrateDefMap::crate_def_map_query` for consistency, - annotates `crate_def_map` as `salsa::transparent` and adds a top-level `crate_def_map` wrapper function around that starts the profiler and immediately calls into `compute_crate_def_map` query. This allows us to better understand where we spent the time, in particular, how much is spent in the recomputaiton and how much in salsa. Example output (where we don't actually re-compute anything, but the query still takes a non-trivial amount of time): ``` 211ms - handle_inlay_hints 150ms - get_inlay_hints 150ms - SourceAnalyzer::new 65ms - def_with_body_from_child_node 65ms - analyze_container 65ms - analyze_container 65ms - Module::from_definition 65ms - Module::from_file 65ms - crate_def_map 1ms - parse_macro_query (6 calls) 0ms - raw_items_query (1 calls) 64ms - ??? ``` Signed-off-by: Michal Terepeta <[email protected]>
* Add `profile` calls to {Module,Function}::diagnosticsMichal Terepeta2020-01-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | With this change the output `ra_prof` gives a better indication where the time is spent. Example output: ``` 213ms - publish_diagnostics 213ms - diagnostics 70ms - Module::from_definition 70ms - Module::from_file 132ms - Module::diagnostics 78ms - Function::diagnostics 0ms - body_with_source_map_query (1 calls) 2ms - trait_solve_query (1 calls) 76ms - ??? 15ms - Function::diagnostics 0ms - body_with_source_map_query (1 calls) 15ms - trait_solve_query (5 calls) 38ms - Function::diagnostics (51 calls) 8ms - parse_query (1 calls) ``` Signed-off-by: Michal Terepeta <[email protected]>
* Merge #2650bors[bot]2019-12-291-1/+25
|\ | | | | | | | | | | | | | | 2650: Add macro call support for SourceAnalyzer::type_of r=matklad a=edwin0cheng Co-authored-by: Edwin Cheng <[email protected]>
| * Use pre-stored macro fileEdwin Cheng2019-12-231-19/+21
| |
| * Add macro call support for type_ofEdwin Cheng2019-12-231-2/+24
| |
* | visible_from -> is_visible_fromFlorian Diebold2019-12-271-2/+2
| |
* | Remove visibility query, instead add struct field visibility to dataFlorian Diebold2019-12-261-2/+2
| | | | | | | | | | Methods should be handled the same, and for items the visibility will be in the def map.
* | Rename ResolvedVisibility -> VisibilityFlorian Diebold2019-12-261-3/+3
| |
* | Add visibility in code model for fieldsFlorian Diebold2019-12-262-3/+20
| |
* | Fill in type params in 'add missing impl members' assistFlorian Diebold2019-12-241-0/+11
|/
* SimplifyAleksey Kladov2019-12-221-1/+1
|
* More profilingAleksey Kladov2019-12-211-2/+7
|
* Merge #2637bors[bot]2019-12-212-0/+7
|\ | | | | | | | | | | | | | | 2637: Optimize and profile r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * Optimize and profileAleksey Kladov2019-12-212-0/+7
| |
* | Remove import source mapAleksey Kladov2019-12-211-2/+2
|/
* Remove imports from hirAleksey Kladov2019-12-213-27/+8
|
* Revert "Merge #2629"Aleksey Kladov2019-12-214-14/+28
| | | | | This reverts commit cdc9d682b066b110e0a44e5f8f1c574b38c16ba9, reversing changes made to 90ef070db3dce0a7acb9cd11d0b0d72de13c9d79.
* Remove import source mapAleksey Kladov2019-12-211-2/+2
|
* Remove hir for importsAleksey Kladov2019-12-213-26/+12
|
* Move impls to ItemScopeAleksey Kladov2019-12-201-1/+1
|
* Fix resolve for field init shorthandAleksey Kladov2019-12-202-8/+16
|
* Use generic ItemLoc for implsAleksey Kladov2019-12-201-2/+2
|
* Support for nested traitsAleksey Kladov2019-12-201-1/+1
|
* Support for nested ADTAleksey Kladov2019-12-201-6/+6
|
* Rebuild ra_lsp_server and nest helper function.Aleksey Kladov2019-12-201-37/+37
| | | | Completion now works again, so there's no need not to nest
* Handle nested declrations in from_sourceAleksey Kladov2019-12-201-7/+16
|
* Add local functions to bodiesAleksey Kladov2019-12-201-3/+8
|
* Drop dead codeAleksey Kladov2019-12-192-60/+4
|
* Merge #2562bors[bot]2019-12-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2562: Fix NavigationTarget ranges r=matklad a=edwin0cheng Fix the issue described in https://github.com/rust-analyzer/rust-analyzer/pull/2544#issuecomment-565572553 This PR change the order for finding `full_range` of `focus_range` in following orders: 1. map both ranges to macro_call 2. map focus range to a token inside macro call, and full range to the whole of macro call 3. map both ranges to the whole of macro call And fix the corresponding tests and make these tests easily to follow. Co-authored-by: Edwin Cheng <[email protected]>
| * Re-export Origin to replace ExpansionOriginEdwin Cheng2019-12-141-2/+1
| |
| * Fix original_source find orderEdwin Cheng2019-12-141-1/+2
| |
* | Use different types for path with and without genericsAleksey Kladov2019-12-142-28/+30
| |
* | Use path macroFlorian Diebold2019-12-131-2/+2
| |
* | Rename N! to name!Florian Diebold2019-12-131-2/+2
| |
* | Add macros for known names and pathsFlorian Diebold2019-12-131-2/+2
|/
* Dedupe from_source implsAleksey Kladov2019-12-121-77/+34
|
* Move enum&union to new locAleksey Kladov2019-12-123-27/+18
|
* Move structs to new locAleksey Kladov2019-12-123-5/+7
|
* Simplify from_sourceAleksey Kladov2019-12-121-49/+34
|
* Move traits to the new locAleksey Kladov2019-12-123-4/+6
|
* Switch to the new location for implsAleksey Kladov2019-12-123-5/+10
|
* Build correct SourceAnalyzer for traitsAleksey Kladov2019-12-101-14/+4
|
* Remove one more TyAleksey Kladov2019-12-082-7/+2
|
* Remove more dead codeAleksey Kladov2019-12-082-96/+0
|
* Cleanup module structureAleksey Kladov2019-12-083-8/+7
|
* Remove dead codeAleksey Kladov2019-12-081-33/+0
|