rustc: move layout::Struct into FieldPlacement/Abi.
This commit is contained in:
parent
08f9f134fd
commit
18d54aa7d5
9 changed files with 501 additions and 605 deletions
|
|
@ -41,7 +41,7 @@ use ty::{PolyFnSig, InferTy, ParamTy, ProjectionTy, ExistentialPredicate, Predic
|
|||
use ty::RegionKind;
|
||||
use ty::{TyVar, TyVid, IntVar, IntVid, FloatVar, FloatVid};
|
||||
use ty::TypeVariants::*;
|
||||
use ty::layout::{Layout, TargetDataLayout};
|
||||
use ty::layout::{CachedLayout, TargetDataLayout};
|
||||
use ty::maps;
|
||||
use ty::steal::Steal;
|
||||
use ty::BindingMode;
|
||||
|
|
@ -78,7 +78,7 @@ use hir;
|
|||
/// Internal storage
|
||||
pub struct GlobalArenas<'tcx> {
|
||||
// internings
|
||||
layout: TypedArena<Layout<'tcx>>,
|
||||
layout: TypedArena<CachedLayout>,
|
||||
|
||||
// references
|
||||
generics: TypedArena<ty::Generics>,
|
||||
|
|
@ -918,7 +918,7 @@ pub struct GlobalCtxt<'tcx> {
|
|||
|
||||
stability_interner: RefCell<FxHashSet<&'tcx attr::Stability>>,
|
||||
|
||||
layout_interner: RefCell<FxHashSet<&'tcx Layout<'tcx>>>,
|
||||
layout_interner: RefCell<FxHashSet<&'tcx CachedLayout>>,
|
||||
|
||||
/// A vector of every trait accessible in the whole crate
|
||||
/// (i.e. including those from subcrates). This is used only for
|
||||
|
|
@ -1016,7 +1016,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
|
|||
interned
|
||||
}
|
||||
|
||||
pub fn intern_layout(self, layout: Layout<'gcx>) -> &'gcx Layout<'gcx> {
|
||||
pub fn intern_layout(self, layout: CachedLayout) -> &'gcx CachedLayout {
|
||||
if let Some(layout) = self.layout_interner.borrow().get(&layout) {
|
||||
return layout;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -264,7 +264,7 @@ define_maps! { <'tcx>
|
|||
[] fn is_freeze_raw: is_freeze_dep_node(ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool,
|
||||
[] fn needs_drop_raw: needs_drop_dep_node(ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool,
|
||||
[] fn layout_raw: layout_dep_node(ty::ParamEnvAnd<'tcx, Ty<'tcx>>)
|
||||
-> Result<ty::layout::CachedLayout<'tcx>,
|
||||
-> Result<&'tcx ty::layout::CachedLayout,
|
||||
ty::layout::LayoutError<'tcx>>,
|
||||
|
||||
[] fn dylib_dependency_formats: DylibDepFormats(CrateNum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue