From 0258c6dacaa6e187ae9bf744fd3184e79f78f2ef Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Tue, 19 Dec 2017 15:14:41 +0100 Subject: incr.comp.: Precompute small hash for filenames to save some work. --- src/libsyntax/codemap.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libsyntax') diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs index 2c91d60ce9d..e49a7117192 100644 --- a/src/libsyntax/codemap.rs +++ b/src/libsyntax/codemap.rs @@ -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, mut file_local_multibyte_chars: Vec, @@ -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()); -- cgit 1.4.1-3-g733a5