about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/query/on_disk_cache.rs
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-03-30 11:14:33 +0200
committerJakub Beránek <berykubik@gmail.com>2025-03-30 11:14:33 +0200
commit31face9f6087c2914ea995af969bb995629a5e78 (patch)
treece366d607ff451bdd73a833f3bc524a98cacb68c /compiler/rustc_middle/src/query/on_disk_cache.rs
parent85f518ec8e14c9763d422f96f6d59f66b8c790cb (diff)
downloadrust-31face9f6087c2914ea995af969bb995629a5e78.tar.gz
rust-31face9f6087c2914ea995af969bb995629a5e78.zip
Revert "Auto merge of #129827 - bvanjoi:less-decoding, r=petrochenkov"
Reverting because of a performance regression.

This reverts commit d4812c8638173ec163825d56a72a33589483ec4c, reversing
changes made to 5cc60728e7ee10eb2ae5f61f7d412d9805b22f0c.
Diffstat (limited to 'compiler/rustc_middle/src/query/on_disk_cache.rs')
-rw-r--r--compiler/rustc_middle/src/query/on_disk_cache.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/query/on_disk_cache.rs b/compiler/rustc_middle/src/query/on_disk_cache.rs
index ce6219c207f..14e3ce8bef6 100644
--- a/compiler/rustc_middle/src/query/on_disk_cache.rs
+++ b/compiler/rustc_middle/src/query/on_disk_cache.rs
@@ -16,7 +16,7 @@ use rustc_serialize::opaque::{FileEncodeResult, FileEncoder, IntEncodedWithFixed
 use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
 use rustc_session::Session;
 use rustc_span::hygiene::{
-    ExpnId, HygieneDecodeContext, HygieneEncodeContext, SyntaxContext, SyntaxContextKey,
+    ExpnId, HygieneDecodeContext, HygieneEncodeContext, SyntaxContext, SyntaxContextData,
 };
 use rustc_span::source_map::Spanned;
 use rustc_span::{
@@ -75,9 +75,9 @@ pub struct OnDiskCache {
     alloc_decoding_state: AllocDecodingState,
 
     // A map from syntax context ids to the position of their associated
-    // `SyntaxContextKey`. We use a `u32` instead of a `SyntaxContext`
+    // `SyntaxContextData`. We use a `u32` instead of a `SyntaxContext`
     // to represent the fact that we are storing *encoded* ids. When we decode
-    // a `SyntaxContextKey`, a new id will be allocated from the global `HygieneData`,
+    // a `SyntaxContext`, a new id will be allocated from the global `HygieneData`,
     // which will almost certainly be different than the serialized id.
     syntax_contexts: FxHashMap<u32, AbsoluteBytePos>,
     // A map from the `DefPathHash` of an `ExpnId` to the position
@@ -305,7 +305,7 @@ impl OnDiskCache {
             let mut expn_data = UnhashMap::default();
             let mut foreign_expn_data = UnhashMap::default();
 
-            // Encode all hygiene data (`SyntaxContextKey` and `ExpnData`) from the current
+            // Encode all hygiene data (`SyntaxContextData` and `ExpnData`) from the current
             // session.
 
             hygiene_encode_context.encode(
@@ -566,7 +566,7 @@ impl<'a, 'tcx> SpanDecoder for CacheDecoder<'a, 'tcx> {
             // We look up the position of the associated `SyntaxData` and decode it.
             let pos = syntax_contexts.get(&id).unwrap();
             this.with_position(pos.to_usize(), |decoder| {
-                let data: SyntaxContextKey = decode_tagged(decoder, TAG_SYNTAX_CONTEXT);
+                let data: SyntaxContextData = decode_tagged(decoder, TAG_SYNTAX_CONTEXT);
                 data
             })
         })