incr.comp.: Precompute small hash for filenames to save some work.

This commit is contained in:
Michael Woerister
2017-12-19 15:14:41 +01:00
parent b39c4bc123
commit 0258c6daca
6 changed files with 36 additions and 8 deletions

View File

@@ -246,6 +246,7 @@ impl CodeMap {
name_was_remapped: bool,
crate_of_origin: u32,
src_hash: u128,
name_hash: u128,
source_len: usize,
mut file_local_lines: Vec<BytePos>,
mut file_local_multibyte_chars: Vec<MultiByteChar>,
@@ -282,6 +283,7 @@ impl CodeMap {
lines: RefCell::new(file_local_lines),
multibyte_chars: RefCell::new(file_local_multibyte_chars),
non_narrow_chars: RefCell::new(file_local_non_narrow_chars),
name_hash,
});
files.push(filemap.clone());