rust-analyzer/crates
Chayim Refael Friedman ceba289f80 Store token trees in contiguous Vec instead of as a tree
I expected this to be faster (due to less allocations and better cache locality), but benchmarked it is not (neither it is slower). Memory usage, however, drops by ~50mb (of `analysis-stats .`). I guess tt construction is just not hot.

This also simplifies using even less memory for token trees by compressing equal span, which I plan to do right after.

Some workflows are more easily expressed with a flat tt, while some are better expressed with a tree. With the right helpers, though (which was mostly a matter of trial and error), even the worst workflows become very easy indeed.
2025-01-02 19:21:46 +02:00
..
base-db Remove patch sysroot cfg-if hack 2024-12-09 11:42:51 +01:00
cfg Store token trees in contiguous Vec instead of as a tree 2025-01-02 19:21:46 +02:00
edition Properly handle different defaults for severity of lints 2024-12-11 20:48:41 +02:00
hir Remove unneeded conversions 2024-12-30 13:04:19 +02:00
hir-def Store token trees in contiguous Vec instead of as a tree 2025-01-02 19:21:46 +02:00
hir-expand Store token trees in contiguous Vec instead of as a tree 2025-01-02 19:21:46 +02:00
hir-ty Store token trees in contiguous Vec instead of as a tree 2025-01-02 19:21:46 +02:00
ide Fix render of literal to be rendered in codeblock 2024-12-30 20:03:10 +05:30
ide-assists Merge pull request #18790 from ChayimFriedman2/proper-make 2024-12-30 11:39:29 +00:00
ide-completion Fix a case where completion was unable to expand a macro 2024-12-20 13:14:59 +02:00
ide-db fix: avoid generating colliding names in extract_variable 2024-12-30 15:30:05 +08:00
ide-diagnostics Consider Enum::Variant even when it comes from a different crate 2024-12-28 22:43:51 +02:00
ide-ssr Show expansion errors in expand_macro feature 2024-12-13 09:36:03 +01:00
intern internal: Implement naked_asm! builtin 2024-12-12 17:43:27 +01:00
limit Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true 2024-08-06 00:26:42 +02:00
load-cargo Store token trees in contiguous Vec instead of as a tree 2025-01-02 19:21:46 +02:00
mbe Store token trees in contiguous Vec instead of as a tree 2025-01-02 19:21:46 +02:00
parser Add a function to convert a SyntaxKind to its text, where possible 2024-12-30 04:01:05 +02:00
paths internal: Split serde derive feature into serde_derive usage 2024-12-20 11:55:02 +01:00
proc-macro-api Store token trees in contiguous Vec instead of as a tree 2025-01-02 19:21:46 +02:00
proc-macro-srv Store token trees in contiguous Vec instead of as a tree 2025-01-02 19:21:46 +02:00
proc-macro-srv-cli Store token trees in contiguous Vec instead of as a tree 2025-01-02 19:21:46 +02:00
profile Use c"lit" for CStrings without unwrap 2024-12-02 18:16:36 +00:00
project-model fix: Fix invalid -O flag used by cfg discovery 2024-12-29 16:04:17 +01:00
ra-salsa Downgrade salsa log levels 2024-12-28 18:23:24 +01:00
rust-analyzer Decouple proc-macro server protocol from the server implementation 2024-12-30 10:33:57 +01:00
span Decouple proc-macro server protocol from the server implementation 2024-12-30 10:33:57 +01:00
stdx Merge pull request #18074 from ChayimFriedman2/typeref-source-map 2024-10-28 11:01:12 +00:00
syntax Move some more AST makers to the quote macro 2024-12-30 05:46:06 +02:00
syntax-bridge Store token trees in contiguous Vec instead of as a tree 2025-01-02 19:21:46 +02:00
test-fixture Store token trees in contiguous Vec instead of as a tree 2025-01-02 19:21:46 +02:00
test-utils Remove unstable attributes in minicore 2024-12-09 11:17:17 +02:00
toolchain Enforce a current directory being set for spawned commands 2024-12-29 12:51:13 +01:00
tt Store token trees in contiguous Vec instead of as a tree 2025-01-02 19:21:46 +02:00
vfs Rename object_safety to dyn_compatibility 2024-09-29 07:26:45 -04:00
vfs-notify Auto merge of #17843 - mo8it:flycheck, r=Veykril 2024-08-12 09:27:47 +00:00