about summary refs log tree commit diff
path: root/compiler/rustc_span/src/span_encoding.rs
AgeCommit message (Collapse)AuthorLines
2025-08-10Fix doc-comment.Camille GILLOT-3/+2
2025-04-30Optimize the codegen for `Span::from_expansion`Jason Newcomb-2/+15
2024-11-14Rollup merge of #128197 - Alexendoo:span-ctxt, r=davidtwcoMatthias Krüger-3/+11
Skip locking span interner for some syntax context checks - `from_expansion` now never needs to consult the interner - `eq_ctxt` now only needs the interner when both spans are fully interned
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-09-03Add `warn(unreachable_pub)` to `rustc_span`.Nicholas Nethercote-1/+1
2024-08-06Skip locking span interner for some syntax context checksAlex Macleod-3/+11
2024-07-29Reformat `use` declarations.Nicholas Nethercote-6/+4
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-06-20rustc_span: Optimize span parent get/set methodsVadim Petrochenkov-26/+68
2024-06-17[perf] More span update benchmarkingVadim Petrochenkov-30/+11
2024-06-16rustc_span: Minor improvementsVadim Petrochenkov-8/+7
Introduce `{IndexNewtype,SyntaxContext}::from_u16` for convenience because small indices are sometimes encoded as `u16`. Use `SpanData::span` instead of `Span::new` where appropriate. Add a clarifying comment about decoding span parents.
2024-06-13rustc_span: Remove transmutes from span encodingVadim Petrochenkov-15/+37
2024-06-13rustc_span: By-value interface for ctxt updateVadim Petrochenkov-15/+13
2024-06-13rustc_span: Add conveniences for working with span formatsVadim Petrochenkov-100/+148
2024-06-10rustc_span: Optimize syntax context updates in spansVadim Petrochenkov-56/+131
2024-06-03rustc_span: Inline some hot functionsVadim Petrochenkov-0/+1
2024-04-13Add add/sub methods that only panic with debug assertions to rustcNilstrieb-2/+6
This mitigates the perf impact of enabling overflow checks on rustc. The change to use overflow checks will be done in a later PR.
2024-01-06rustc_span: Optimize syntax context comparisonsVadim Petrochenkov-15/+32
Including comparisons with root context
2023-10-16debug Span::ctxt() call detectionArthur Lafrance-1/+1
2023-10-16basic lint v2 implementedArthur Lafrance-1/+1
2023-10-16implement the basics of the lint static analysisArthur Lafrance-0/+1
2023-10-13Format all the let chains in compilerMichael Goulet-1/+1
2023-09-08Optimize `Span::is_dummy`.Nicholas Nethercote-0/+17
It's quite hot, and worth having a version that works directly at the `Span` level, rather than first converting to the `SpanData` level.
2023-09-08`Span` tweaks.Nicholas Nethercote-110/+128
`Span` has undergone some changes over the years (addition of an optional parent, and possible inlining of the context in interned spans) but the comments and identifiers used haven't kept up. As a result, I find it harder to understand than I should. This commit reworks the comments, renames some identifiers, and restructures the code slightly, all to make things clearer. I now feel like I understand this code again.
2023-04-18Refactor `SyntaxContext::ctxt` logic.Camille GILLOT-10/+14
2023-02-11Intern span when length is MAX_LEN with parent.Camille GILLOT-1/+6
2022-12-25Encode span parent in the inlined representation.Camille GILLOT-22/+64
2022-12-01Remove useless borrows and derefsMaybe Waffle-1/+1
2022-08-17Make names more explicit.Camille GILLOT-15/+21
2022-08-17Keep ctxt in encoded span representation.Camille GILLOT-9/+23
2022-02-25Enable rustc_pass_by_value for SpanMark Rousskov-2/+1
2022-02-25Switch bootstrap cfgsMark Rousskov-9/+2
2022-01-27try apply `rustc_pass_by_value` to `Span`lcnr-0/+9
2021-09-10Rename decode to data_untracked.Camille GILLOT-2/+2
2021-09-10Track span dependency using a callback.Camille GILLOT-0/+16
2021-09-10Keep a parent LocalDefId in SpanData.Camille GILLOT-3/+11
2021-07-08Rework SESSION_GLOBALS API to prevent overwriting itGuillaume Gomez-2/+1
2021-05-03Remove SpanInterner::getJoshua Nelson-6/+1
- It's used exactly once, so it's trivial to replace - It doesn't match the normal convention for containers: normally `get()` returns and option and indexing panics. Instead `get()` panicked and there's no indexing operation available.
2020-12-25Edit rustc_span documentationpierwill-5/+3
Various changes to the `rustc_span` docs, including the following: - Additions to top-level docs - Edits to the source_map module docs - Edits to documentation for `Span` and `SpanData` - Added intra-docs links - Documentation for Levenshtein distances - Fixed missing punctuation
2020-08-30mv compiler to compiler/mark-0/+133