Commit Graph

7 Commits

Author SHA1 Message Date
Aaron Hill
95bea1594c
Convert debug_assert to assert in CachingSourceMapView
I suspect that there's a bug somewhere in this code, which is
leading to the `predicates_of` ICE being seen in #89035
2021-09-17 12:01:29 -05:00
Tyson Nottingham
75de8286c0 rustc_span: add span_data_to_lines_and_cols to caching source map view
Gives a performance increase over calling byte_pos_to_line_and_col
twice, partially because it decreases the function calling overhead,
potentially because it doesn't populate the line cache with lines that
turn out to belong to invalid spans, and likely because of some other
incidental improvements made possible by having more context available.
2020-12-03 18:36:34 -08:00
Tyson Nottingham
0987b84198 rustc_span: refactor byte_pos_to_line_and_col 2020-12-03 18:36:34 -08:00
Tyson Nottingham
8da2a5a27c rustc_span: avoid unnecessary cloning in byte_pos_to_line_and_col 2020-12-03 18:36:34 -08:00
Tyson Nottingham
47dad31a04 rustc_span: represent line bounds with Range 2020-10-27 15:47:29 -07:00
Tyson Nottingham
df59a44fea rustc_span: improve bounds checks in byte_pos_to_line_and_col
The effect of this change is to consider edge-case spans that start or
end at the position one past the end of a file to be valid during span
hashing and encoding. This change means that these spans will be
preserved across incremental compilation sessions when they are part of
a serialized query result, instead of causing the dummy span to be used.
2020-10-26 16:34:04 -07:00
mark
9e5f7d5631 mv compiler to compiler/ 2020-08-30 18:45:07 +03:00