diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-03-21 14:17:00 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-04-16 13:02:53 +1000 |
| commit | 62c32aeeab0558123f12a9372768ba567ce43361 (patch) | |
| tree | 02ee7005d2fc3eba563015c11aec664b02da3921 /tests/coverage/branch/lazy-boolean.rs | |
| parent | ff2e4ed1f18ccfbd9f7aab1f93c0873f57e0b71f (diff) | |
| download | rust-62c32aeeab0558123f12a9372768ba567ce43361.tar.gz rust-62c32aeeab0558123f12a9372768ba567ce43361.zip | |
Construct `SourceMap` at the same time as `SessionGlobals`.
Currently `SourceMap` is constructed slightly later than `SessionGlobals`, and inserted. This commit changes things so they are done at the same time. Benefits: - `SessionGlobals::source_map` changes from `Lock<Option<Lrc<SourceMap>>>` to `Option<Lrc<SourceMap>>`. It's still optional, but mutability isn't required because it's initialized at construction. - `set_source_map` is removed, simplifying `run_compiler`, which is good because that's a critical function and it's nice to make it simpler. This requires moving things around a bit, so the necessary inputs are available when `SessionGlobals` is created, in particular the `loader` and `hash_kind`, which are no longer computed by `build_session`. These inputs are captured by the new `SourceMapInputs` type, which is threaded through various places.
Diffstat (limited to 'tests/coverage/branch/lazy-boolean.rs')
0 files changed, 0 insertions, 0 deletions
