Commit Graph

4259 Commits

Author SHA1 Message Date
Alan Du
6939011b27 Fix clippy::assign_op_pattern 2019-06-04 18:05:07 -04:00
Alan Du
21d7964bc3 Fix clippy::useless_format 2019-06-04 18:05:07 -04:00
Alan Du
fb592d76aa Fix clippy::into_iter_on_ref 2019-06-04 18:05:07 -04:00
Alan Du
619a615298 Fix clippy::len_zero 2019-06-04 18:05:07 -04:00
Alan Du
7bcd8d6290 Fix clippy::unused_mut 2019-06-04 18:05:07 -04:00
Alan Du
6095e3fe19 Fix clippy::unnecessary_mut_passed 2019-06-04 18:05:07 -04:00
Alan Du
fafca4cb11 Fix clippy::ptr_arg 2019-06-04 18:05:07 -04:00
Alan Du
4e449fb0b0 Fix clippy::if_same_then_else 2019-06-04 18:05:07 -04:00
Alan Du
63e37f9536 Fix clippy::expect_fun_call 2019-06-04 18:05:07 -04:00
Alan Du
b9af1d7c42 Fix clippy::match_ref_pats 2019-06-04 18:05:07 -04:00
Alan Du
dddcb0ad94 Fix clippy::needless_return 2019-06-04 18:05:07 -04:00
Alan Du
ecd420636e Fix clippy::single_match 2019-06-04 18:05:07 -04:00
Simon Bihel
ec31f475ca
Use inline snapshots in complete_keyword 2019-06-04 21:26:12 +01:00
bors[bot]
8bd0e84424 Merge #1376
1376: fix debug scopes r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-04 11:47:32 +00:00
Aleksey Kladov
d2b23599b6 fix debug scopes 2019-06-04 14:46:22 +03:00
bors[bot]
fcf30d8fa5 Merge #1375
1375: switch to panic-safe salsa r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-04 10:30:55 +00:00
Aleksey Kladov
b3b096234a switch to panic-safe salsa 2019-06-04 13:30:07 +03:00
Alan Du
354db651da Fix clippy::clone_double_ref 2019-06-04 03:00:58 -04:00
Alan Du
573a6bb5c9 Fix clippy::match_bool 2019-06-04 03:00:58 -04:00
Alan Du
07ebf5528e Allow clippy::map_clone
We should turn it on after Iterator::copied stabilizes
2019-06-04 03:00:58 -04:00
Alan Du
557e90c6ca Allow clippy::needless_pass_by_value 2019-06-04 03:00:58 -04:00
Alan Du
a181fd318b Implement cargo lint to run clippy 2019-06-03 20:34:00 -04:00
bors[bot]
d1b9fa446a Merge #1373
1373: add couple of debug utils r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-03 21:28:16 +00:00
Aleksey Kladov
5264711b5d add couple of debug utils 2019-06-04 00:27:49 +03:00
bors[bot]
6aa8d8b99d Merge #1369
1369: don't cache parses twice r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-02 17:21:42 +00:00
Aleksey Kladov
8b7f58976b don't cache parses twice
Before this commit, `Parse`s for original file ended up two times in
salsa's db: first, when we parse original file, and second, when we
parse macro or a file.

Given that parse trees are the worst ofenders in terms of memory, it
makes sense to make sure we store them only once.
2019-06-02 20:15:10 +03:00
bors[bot]
ae8fd982c0 Merge #1368
1368: Store referece instead of full token tree in tokenbuffer r=matklad a=edwin0cheng

This PR try to minimize the memory allocation in converting `SyntaxNode` to `TokenTree` by using reference isnteead of full token tree in `TokenBuffer`. 

Note that the final goal is replace `TokenTree` with TokenBuffer such that there is no conversion between them.

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-06-02 17:09:49 +00:00
Edwin Cheng
824f413d75 unnecessary paranthesis 2019-06-03 01:05:58 +08:00
Edwin Cheng
54ea251bd4 Store referece in tokenbuffer 2019-06-03 00:54:33 +08:00
bors[bot]
b40c6de8a6 Merge #1367
1367: collect macro queries r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-02 15:59:12 +00:00
Aleksey Kladov
2f02e1a8ba collect macro queries 2019-06-02 18:58:49 +03:00
bors[bot]
82cf27b5fc Merge #1362
1362: Introduce AST database r=matklad a=matklad

The idea here is to separate fragile bits which look into the syntax directly from robust bits which are safe across reparses. This uses the new `salsa::requires` featue

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-02 09:32:26 +00:00
Aleksey Kladov
5af9e475f4 add AstDatabase 2019-06-02 12:27:36 +03:00
bors[bot]
8256dfdd71 Merge #1366
1366: collect types and bodies r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-02 08:34:24 +00:00
Aleksey Kladov
011599df27 collect types and bodies 2019-06-01 22:47:20 +03:00
bors[bot]
3573923279 Merge #1363
1363: some work on memory r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-01 19:32:02 +00:00
Aleksey Kladov
f7d3a87305 collect impl source maps 2019-06-01 22:31:22 +03:00
Aleksey Kladov
d7a2a9171e don't cache ast_id_to_node 2019-06-01 22:14:42 +03:00
Aleksey Kladov
37e80c5297 show macro expanded trees in the stats as well 2019-06-01 22:13:24 +03:00
bors[bot]
ccec71165b Merge #1360
1360: Improve goto definition for MBE r=matklad a=edwin0cheng

This PR improve the macro resolution for goto definition and expression macro invocation by using proper path resolution for external macros. 



Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-06-01 17:48:06 +00:00
Edwin Cheng
371961be0e Improve goto definition for MBE 2019-06-01 19:34:19 +08:00
bors[bot]
1e6b45b05a Merge #1359
1359: don't poison mutex around chalk r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-01 08:00:00 +00:00
Aleksey Kladov
f89d34be6a don't poison mutex around chalk
We use panics for cancellation, so we could trigger panic while
holding the solver. std::sync::Mutex will be poisoned as a result,
which and all further attempts to use solver (from other threads) will
panic as well.

This commit switches to parking_lot::Mutex which just unlocks on panic.
2019-06-01 10:57:44 +03:00
bors[bot]
35e79bf422 Merge #1358
1358: apply profile filter to top-level entries only r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-06-01 07:46:15 +00:00
Aleksey Kladov
4dd7faed34 apply profile filter to top-level entries only 2019-06-01 10:41:47 +03:00
Aleksey Kladov
bf801953a3 rename 2019-06-01 10:31:40 +03:00
Aleksey Kladov
678a458543 move subs inside 2019-06-01 10:24:43 +03:00
bors[bot]
5023860a55 Merge #1356
1356: move completed requests to a separate file r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-31 18:50:34 +00:00
Aleksey Kladov
78e17f65cf use sync queries for join lines and friends 2019-05-31 20:53:00 +03:00
Aleksey Kladov
c6537c3280 add sync requests 2019-05-31 20:50:16 +03:00