| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2024-10-01 | add unstable support for outputting file checksums for use in cargo | Jacob Kiesel | -3/+7 | |
| 2024-06-04 | Add `Span::trim_end` | Zalathar | -0/+19 | |
| This is the counterpart of `Span::trim_start`. | ||||
| 2024-06-04 | Add unit tests for `Span::trim_start` | Zalathar | -0/+38 | |
| 2023-09-07 | Use `Freeze` for `SourceFile.lines` | John Kåre Alsaker | -3/+1 | |
| 2023-09-03 | Register the file while computing its start position. | Camille GILLOT | -1/+2 | |
| 2023-09-03 | Use relative positions inside a SourceFile. | Camille GILLOT | -15/+13 | |
| 2023-04-18 | Store hashes in special types so they aren't accidentally encoded as numbers | Ben Kimock | -2/+6 | |
| 2022-06-01 | Lazify `SourceFile::lines`. | Nicholas Nethercote | -1/+1 | |
| `SourceFile::lines` is a big part of metadata. It's stored in a compressed form (a difference list) to save disk space. Decoding it is a big fraction of compile time for very small crates/programs. This commit introduces a new type `SourceFileLines` which has a `Lines` form and a `Diffs` form. The latter is used when the metadata is first read, and it is only decoded into the `Lines` form when line data is actually needed. This avoids the decoding cost for many files, especially in `std`. It's a performance win of up to 15% for tiny crates/programs where metadata decoding is a high part of compilation costs. A `Lock` is needed because the methods that access lines data (which can trigger decoding) take `&self` rather than `&mut self`. To allow for this, `SourceFile::lines` now takes a `FnMut` that operates on the lines slice rather than returning the lines slice. | ||||
| 2021-07-08 | Inline implementation of lookup_line | Tomasz Miąsko | -9/+12 | |
| to simplify the implementation and avoid unnecessary conversions from `Option<usize>` to `isize` and back. | ||||
| 2020-08-30 | mv compiler to compiler/ | mark | -0/+40 | |
