Skip to content

Commit

Permalink
rustc_metadata: Rename schema to rmeta
Browse files Browse the repository at this point in the history
And change `rmeta.rs` to `rmeta/mod.rs`
  • Loading branch information
petrochenkov committed Nov 7, 2019
1 parent 2b75147 commit 5eb1cf1
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/librustc_metadata/creader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use crate::cstore::{self, CStore, MetadataBlob};
use crate::locator::{self, CratePaths};
use crate::schema::{CrateRoot, CrateDep};
use crate::rmeta::{CrateRoot, CrateDep};
use rustc_data_structures::sync::{Lock, Once, AtomicCell};

use rustc::hir::def_id::CrateNum;
Expand Down
8 changes: 4 additions & 4 deletions src/librustc_metadata/cstore.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// The crate store - a central repo for information collected about external
// crates and libraries

use crate::schema;
use crate::rmeta;
use rustc::dep_graph::DepNodeIndex;
use rustc::hir::def_id::{CrateNum, DefIndex};
use rustc::hir::map::definitions::DefPathTable;
Expand All @@ -17,7 +17,7 @@ use syntax_expand::base::SyntaxExtension;
use syntax_pos;
use proc_macro::bridge::client::ProcMacro;

pub use crate::schema::{provide, provide_extern};
pub use crate::rmeta::{provide, provide_extern};

// A map from external crate numbers (as decoded from some crate file) to
// local crate numbers (as generated during this session). Each external
Expand Down Expand Up @@ -49,7 +49,7 @@ crate struct CrateMetadata {
/// lifetime is only used behind `Lazy`, and therefore acts like an
/// universal (`for<'tcx>`), that is paired up with whichever `TyCtxt`
/// is being used to decode those values.
crate root: schema::CrateRoot<'static>,
crate root: rmeta::CrateRoot<'static>,
/// For each definition in this crate, we encode a key. When the
/// crate is loaded, we read all the keys and put them in this
/// hashmap, which gives the reverse mapping. This allows us to
Expand All @@ -59,7 +59,7 @@ crate struct CrateMetadata {
/// Trait impl data.
/// FIXME: Used only from queries and can use query cache,
/// so pre-decoding can probably be avoided.
crate trait_impls: FxHashMap<(u32, DefIndex), schema::Lazy<[DefIndex]>>,
crate trait_impls: FxHashMap<(u32, DefIndex), rmeta::Lazy<[DefIndex]>>,
/// Proc macro descriptions for this crate, if it's a proc macro crate.
crate raw_proc_macros: Option<&'static [ProcMacro]>,
/// Source maps for code from the crate.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_metadata/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mod dependency_format;
mod foreign_modules;
mod link_args;
mod native_libs;
mod schema;
mod rmeta;

pub mod creader;
pub mod cstore;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_metadata/locator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@

use crate::cstore::MetadataBlob;
use crate::creader::Library;
use crate::schema::{METADATA_HEADER, rustc_version};
use crate::rmeta::{METADATA_HEADER, rustc_version};

use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::svh::Svh;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Decoding metadata from a single crate's metadata

use crate::cstore::{self, CrateMetadata, MetadataBlob};
use crate::schema::*;
use crate::schema::table::{FixedSizeEncoding, PerDefTable};
use crate::rmeta::*;
use crate::rmeta::table::{FixedSizeEncoding, PerDefTable};

use rustc_index::vec::IndexVec;
use rustc_data_structures::sync::Lrc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::cstore::{self, LoadedMacro};
use crate::link_args;
use crate::native_libs;
use crate::foreign_modules;
use crate::schema::{self, encoder};
use crate::rmeta::{self, encoder};

use rustc::ty::query::QueryConfig;
use rustc::middle::cstore::{CrateSource, CrateStore, DepKind, EncodedMetadata, NativeLibraryKind};
Expand Down Expand Up @@ -528,6 +528,6 @@ impl CrateStore for cstore::CStore {

fn metadata_encoding_version(&self) -> &[u8]
{
schema::METADATA_HEADER
rmeta::METADATA_HEADER
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::schema::*;
use crate::schema::table::{FixedSizeEncoding, PerDefTable};
use crate::rmeta::*;
use crate::rmeta::table::{FixedSizeEncoding, PerDefTable};

use rustc::middle::cstore::{LinkagePreference, NativeLibrary,
EncodedMetadata, ForeignModule};
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::schema::*;
use crate::rmeta::*;

use rustc::hir::def_id::{DefId, DefIndex};
use rustc_serialize::{Encodable, opaque::Encoder};
Expand Down

0 comments on commit 5eb1cf1

Please sign in to comment.