rust-analyzer/crates/hir-ty/src
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
..
consteval Support new #[rustc_intrinsic] attribute and fallback bodies 2024-11-04 13:33:55 +01:00
diagnostics Taking a raw ref of a deref is always safe 2024-12-18 11:32:29 +01:00
dyn_compatibility minor: Rename dyn compatible to dyn-compatible 2024-11-07 23:00:29 +09:00
infer Add DynTyExt::principal_id 2024-12-28 18:26:45 +01:00
layout Store token trees in contiguous Vec instead of as a tree 2025-01-02 19:21:46 +02:00
lower Unify handling of path diagnostics in hir-ty 2024-12-24 18:58:52 +02:00
mir make no-variant types a dedicated Variants variant 2024-12-18 11:01:54 +01:00
tests Implement parameter variance inference 2024-12-28 19:54:22 +01:00
autoderef.rs Fix new nightly lints 2024-10-22 11:48:41 +02:00
builder.rs Fix lifetime parameters moving paramter defaults 2024-07-02 12:34:32 +02:00
chalk_db.rs Implement parameter variance inference 2024-12-28 19:54:22 +01:00
chalk_ext.rs Add DynTyExt::principal_id 2024-12-28 18:26:45 +01:00
consteval.rs Allow interpreting consts and statics with interpret function command 2024-11-03 15:35:45 +01:00
db.rs Implement parameter variance inference 2024-12-28 19:54:22 +01:00
diagnostics.rs Extend reported unsafe operations 2024-12-04 08:27:59 +02:00
display.rs fix: Panic when displaying generic params with defaults, again 2024-12-13 01:15:41 +09:00
dyn_compatibility.rs minor: Rename dyn compatible to dyn-compatible 2024-11-07 23:00:29 +09:00
generics.rs Show variance of parameters on hover 2024-12-28 20:31:20 +01:00
infer.rs Unify handling of path diagnostics in hir-ty 2024-12-24 18:58:52 +02:00
inhabitedness.rs fix: Non-exhaustive structs may be empty 2024-12-09 14:12:22 +01:00
interner.rs Fix a few typos 2024-12-13 09:54:35 +01:00
lang_items.rs Add DynTyExt::principal_id 2024-12-28 18:26:45 +01:00
layout.rs make no-variant types a dedicated Variants variant 2024-12-18 11:01:54 +01:00
lib.rs Show variance of parameters on hover 2024-12-28 20:31:20 +01:00
lower.rs Consider Enum::Variant even when it comes from a different crate 2024-12-28 22:43:51 +02:00
mapping.rs chore: rename salsa to ra_salsa 2024-10-14 10:09:22 -04:00
method_resolution.rs Add DynTyExt::principal_id 2024-12-28 18:26:45 +01:00
mir.rs Fix new nightly lints 2024-10-22 11:48:41 +02:00
primitive.rs Add f16 and f128 support 2024-07-10 10:43:14 +01:00
test_db.rs chore: rename salsa to ra_salsa 2024-10-14 10:09:22 -04:00
tests.rs Implement parameter variance inference 2024-12-28 19:54:22 +01:00
tls.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
traits.rs Support AsyncFnX traits 2024-12-03 21:26:26 +02:00
utils.rs make no-variant types a dedicated Variants variant 2024-12-18 11:01:54 +01:00
variance.rs Describe variance resolution approach differences to rustc 2024-12-29 10:53:17 +01:00