diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2017-12-19 15:14:41 +0100 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2017-12-19 15:27:50 +0100 |
| commit | 0258c6dacaa6e187ae9bf744fd3184e79f78f2ef (patch) | |
| tree | 93126f94926ad0ef74e640f0ff2be0e60a4b84a1 /src/libsyntax/codemap.rs | |
| parent | b39c4bc12358078f77ddd01288b24252f757f37d (diff) | |
| download | rust-0258c6dacaa6e187ae9bf744fd3184e79f78f2ef.tar.gz rust-0258c6dacaa6e187ae9bf744fd3184e79f78f2ef.zip | |
incr.comp.: Precompute small hash for filenames to save some work.
Diffstat (limited to 'src/libsyntax/codemap.rs')
| -rw-r--r-- | src/libsyntax/codemap.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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<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()); |
