mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
16c8deeb86
Have Derive Attribute share a token tree with it's proc macros. The goal of this PR is to stop creating a token tree for each derive proc macro. This is done by giving the derive proc macros an id to its parent derive element. From running the analysis stat on the rust analyzer project I did see a small memory decrease. ``` Inference: 42.80s, 362ginstr, 591mb MIR lowering: 8.67s, 67ginstr, 291mb Mir failed bodies: 18 (0%) Data layouts: 85.81ms, 609minstr, 8mb Failed data layouts: 135 (6%) Const evaluation: 440.57ms, 5235minstr, 13mb Failed const evals: 1 (0%) Total: 64.16s, 552ginstr, 1731mb ``` After Change ``` Inference: 40.32s, 340ginstr, 593mb MIR lowering: 7.95s, 62ginstr, 292mb Mir failed bodies: 18 (0%) Data layouts: 87.97ms, 591minstr, 8mb Failed data layouts: 135 (6%) Const evaluation: 433.38ms, 5226minstr, 14mb Failed const evals: 1 (0%) Total: 60.49s, 523ginstr, 1680mb ``` Currently this breaks the expansion for the actual derive attribute. ## TODO - [x] Pick a better name for the function `smart_macro_arg` |
||
---|---|---|
.. | ||
base-db | ||
cfg | ||
flycheck | ||
hir | ||
hir-def | ||
hir-expand | ||
hir-ty | ||
ide | ||
ide-assists | ||
ide-completion | ||
ide-db | ||
ide-diagnostics | ||
ide-ssr | ||
intern | ||
limit | ||
load-cargo | ||
mbe | ||
parser | ||
paths | ||
proc-macro-api | ||
proc-macro-srv | ||
proc-macro-srv-cli | ||
profile | ||
project-model | ||
rust-analyzer | ||
salsa | ||
sourcegen | ||
span | ||
stdx | ||
syntax | ||
test-fixture | ||
test-utils | ||
text-edit | ||
toolchain | ||
tt | ||
vfs | ||
vfs-notify |