Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix non-latin characters doc comment for mbe | Edwin Cheng | 2021-02-28 | 2 | -1/+24 |
| | |||||
* | Fix builtin macros split exprs on comma | Edwin Cheng | 2021-02-28 | 4 | -69/+119 |
| | |||||
* | Add benchmark test for mbe | Edwin Cheng | 2021-02-24 | 2 | -0/+214 |
| | |||||
* | Simpilfy mbe parsing | Edwin Cheng | 2021-01-30 | 4 | -74/+71 |
| | |||||
* | Simplify mbe match error. | Edwin Cheng | 2021-01-29 | 6 | -210/+180 |
| | | | | Handle parse error in rule parsing instead of match in mbe | ||||
* | Rename mbe_expander for consistency | Edwin Cheng | 2021-01-29 | 4 | -5/+5 |
| | |||||
* | Support Macro v2 in mbe | Edwin Cheng | 2021-01-25 | 3 | -87/+227 |
| | |||||
* | :arrow_up: rowan | Aleksey Kladov | 2021-01-20 | 1 | -3/+1 |
| | | | | It now stores text inline with tokens | ||||
* | . | Aleksey Kladov | 2021-01-19 | 1 | -1/+1 |
| | |||||
* | Reduce TokenMap size | Edwin Cheng | 2021-01-19 | 1 | -10/+16 |
| | |||||
* | shrink_to_fit `TokenMap`'s backing storage | Jonas Schievink | 2021-01-18 | 1 | -1/+3 |
| | |||||
* | Swap assert_eq_text\!(expected, actual) | yugo-horie | 2021-01-16 | 1 | -5/+5 |
| | |||||
* | Merge #7211 | bors[bot] | 2021-01-14 | 1 | -1/+22 |
|\ | | | | | | | | | | | | | | | | | | | | | | | 7211: Fixed expr meta var after path colons in mbe r=matklad a=edwin0cheng Fixes #7207 Added `L_DOLLAR` in `ITEM_RECOVERY_SET` , but I don't know whether it is a good idea. r? @matklad Co-authored-by: Edwin Cheng <[email protected]> | ||||
| * | Fixed expr meta var after path colons in mbe | Edwin Cheng | 2021-01-10 | 1 | -1/+22 |
| | | |||||
* | | Fixed typos in public type names | Vincent Esche | 2021-01-09 | 1 | -2/+2 |
| | | |||||
* | | Fixed typos in private type names | Vincent Esche | 2021-01-09 | 1 | -5/+5 |
| | | |||||
* | | Fixed typos in tests | Vincent Esche | 2021-01-09 | 1 | -1/+1 |
| | | |||||
* | | Fixed typos in `log::warn!` message | Vincent Esche | 2021-01-09 | 1 | -5/+1 |
| | | |||||
* | | Fixed typos in code comments | Vincent Esche | 2021-01-09 | 3 | -3/+3 |
|/ | |||||
* | Add test | Edwin Cheng | 2021-01-08 | 1 | -0/+13 |
| | |||||
* | Fix bug when $crate in LHS in mbe | Edwin Cheng | 2021-01-08 | 2 | -5/+8 |
| | |||||
* | Merge #7145 | bors[bot] | 2021-01-08 | 3 | -19/+14 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7145: Proper handling $crate Take 2 [DO NOT MERGE] r=edwin0cheng a=edwin0cheng Similar to previous PR (#7133) , but improved the following things : 1. Instead of storing the whole `ExpansionInfo`, we store a similar but stripped version `HygieneInfo`. 2. Instread of storing the `SyntaxNode` (because every token we are interested are IDENT), we store the `TextRange` only. 3. Because of 2, we now can put it in Salsa. 4. And most important improvement: Instead of computing the whole frames every single time, we compute it recursively through salsa: (Such that in the best scenario, we only need to compute the first layer of frame) ```rust let def_site = db.hygiene_frame(info.def.file_id); let call_site = db.hygiene_frame(info.arg.file_id); HygieneFrame { expansion: Some(info), local_inner, krate, call_site, def_site } ``` The overall speed compared to previous PR is much faster (65s vs 45s) : ``` [WITH old PR] Database loaded 644.86ms, 284mi Crates in this dir: 36 Total modules found: 576 Total declarations: 11153 Total functions: 8715 Item Collection: 15.78s, 91562mi Total expressions: 240721 Expressions of unknown type: 2635 (1%) Expressions of partially unknown type: 2064 (0%) Type mismatches: 865 Inference: 49.84s, 250747mi Total: 65.62s, 342310mi rust-analyzer -q analysis-stats . 66.72s user 0.57s system 99% cpu 1:07.40 total [WITH this PR] Database loaded 665.83ms, 284mi Crates in this dir: 36 Total modules found: 577 Total declarations: 11188 Total functions: 8743 Item Collection: 15.28s, 84919mi Total expressions: 241229 Expressions of unknown type: 2637 (1%) Expressions of partially unknown type: 2064 (0%) Type mismatches: 868 Inference: 30.15s, 135293mi Total: 45.43s, 220213mi rust-analyzer -q analysis-stats . 46.26s user 0.74s system 99% cpu 47.294 total ``` *HOWEVER*, it is still a perf regression (35s vs 45s): ``` [WITHOUT this PR] Database loaded 657.42ms, 284mi Crates in this dir: 36 Total modules found: 577 Total declarations: 11177 Total functions: 8735 Item Collection: 12.87s, 72407mi Total expressions: 239380 Expressions of unknown type: 2643 (1%) Expressions of partially unknown type: 2064 (0%) Type mismatches: 868 Inference: 22.88s, 97889mi Total: 35.74s, 170297mi rust-analyzer -q analysis-stats . 36.71s user 0.63s system 99% cpu 37.498 total ``` Co-authored-by: Edwin Cheng <[email protected]> | ||||
| * | Proper handling $crate Take 2 | Edwin Cheng | 2021-01-07 | 3 | -19/+14 |
| | | |||||
* | | Simplify SubtreeTokenSource | Edwin Cheng | 2021-01-04 | 1 | -88/+60 |
| | | |||||
* | | Refactor TokenBuffer for reduc cloning | Edwin Cheng | 2021-01-04 | 3 | -19/+18 |
| | | |||||
* | | Reduce string copying | Edwin Cheng | 2021-01-04 | 1 | -14/+16 |
|/ | |||||
* | Revert "Proper handling $crate and local_inner_macros" | Jonas Schievink | 2021-01-03 | 3 | -14/+19 |
| | |||||
* | Introduce HygieneFrames for proper token hyginee | Edwin Cheng | 2021-01-02 | 3 | -19/+14 |
| | |||||
* | Remove unused clones in mbe | Edwin Cheng | 2020-12-30 | 1 | -8/+4 |
| | |||||
* | Refactor mbe parsing code | Edwin Cheng | 2020-12-29 | 4 | -76/+99 |
| | |||||
* | Merge #7060 | bors[bot] | 2020-12-28 | 1 | -0/+12 |
|\ | | | | | | | | | | | | | | | | | | | 7060: Fix mbe fail to pass expr with attr r=edwin0cheng a=edwin0cheng bors r+ Fixes #5896 Co-authored-by: Edwin Cheng <[email protected]> | ||||
| * | Fix mbe fail to pass expr with attr | Edwin Cheng | 2020-12-28 | 1 | -0/+12 |
| | | |||||
* | | Special case underscore in mbe meta op | Edwin Cheng | 2020-12-28 | 2 | -2/+45 |
| | | |||||
* | | Rollback 6929 | Edwin Cheng | 2020-12-28 | 1 | -2/+1 |
|/ | |||||
* | Ignore third punct in 2-composite punct | Edwin Cheng | 2020-12-27 | 2 | -20/+36 |
| | |||||
* | Use pattern_single instead of pattern in mbe pat | Edwin Cheng | 2020-12-20 | 1 | -0/+12 |
| | |||||
* | mbe: treat _ as ident | Laurențiu Nicola | 2020-12-20 | 4 | -3/+18 |
| | |||||
* | Node-ify lifetimes | Lukas Wirth | 2020-12-16 | 3 | -5/+9 |
| | |||||
* | Move to upstream `macro_rules!` model | Jonas Schievink | 2020-12-15 | 2 | -3/+3 |
| | |||||
* | Add missing arg for eat_char | Edwin Cheng | 2020-12-11 | 1 | -3/+3 |
| | |||||
* | negative sign matching in mbe matching for literal | Edwin Cheng | 2020-12-11 | 2 | -6/+39 |
| | |||||
* | Add dedicated error for "proc macro not found" | Jonas Schievink | 2020-11-27 | 1 | -0/+2 |
| | |||||
* | Simplify error formatting | Laurențiu Nicola | 2020-11-26 | 1 | -1/+1 |
| | |||||
* | Implement `Display` for macro expansion errors | Jonas Schievink | 2020-11-26 | 1 | -0/+16 |
| | |||||
* | Use `ExpandResult` instead of `MacroResult` | Jonas Schievink | 2020-11-26 | 1 | -0/+8 |
| | | | | `MacroResult` is redundant | ||||
* | Use named fields in `ExpandResult` | Jonas Schievink | 2020-11-26 | 4 | -28/+38 |
| | |||||
* | Remove more unreachable pubs | Aleksey Kladov | 2020-11-02 | 1 | -1/+1 |
| | |||||
* | Deny unreachable-pub | Aleksey Kladov | 2020-11-02 | 2 | -9/+9 |
| | | | | | | | | It's very useful when `pub` is equivalent to "this is crate's public API", let's enforce this! Ideally, we should enforce it for local `cargo test`, and only during CI, but that needs https://github.com/rust-lang/cargo/issues/5034. | ||||
* | Cleanup | Aleksey Kladov | 2020-10-07 | 1 | -12/+10 |
| | |||||
* | Added unit test for negative number literals in macros. | Tim | 2020-10-06 | 1 | -0/+21 |
| |