]> git.lizzy.rs Git - rust.git/commit
Auto merge of #50997 - michaelwoerister:pre-analyze-filemaps, r=Mark-Simulacrum
authorbors <bors@rust-lang.org>
Thu, 28 Jun 2018 11:20:41 +0000 (11:20 +0000)
committerbors <bors@rust-lang.org>
Thu, 28 Jun 2018 11:20:41 +0000 (11:20 +0000)
commit9f79d2f86af73da483f4fe8e2422c15c79221d32
treeb7ecb398641e49cb195212763ae13c5d4a28a537
parentd84ad59710728c936edd7396e287d42f1e319cf1
parenta1f8a6ce80a340d51074071c0d9e30eb14f65d25
Auto merge of #50997 - michaelwoerister:pre-analyze-filemaps, r=Mark-Simulacrum

 Make FileMap::{lines, multibyte_chars, non_narrow_chars} non-mutable.

This PR removes most of the interior mutability from `FileMap`, which should be beneficial, especially in a multithreaded setting. This is achieved by initializing the state in question when the filemap is constructed instead of during lexing. Hopefully this doesn't degrade performance.

cc @wesleywiser
src/librustc/ich/impls_syntax.rs
src/librustc/ty/query/on_disk_cache.rs
src/librustc_metadata/decoder.rs
src/libsyntax/ext/expand.rs