mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-17 22:46:50 +00:00
[HACK(eddyb)] arena-allocate but don't intern FnAbi
s.
This commit is contained in:
parent
c1837ef1c5
commit
8c918d7e2d
@ -55,7 +55,6 @@ use rustc_span::def_id::{DefPathHash, StableCrateId};
|
||||
use rustc_span::source_map::{MultiSpan, SourceMap};
|
||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use rustc_target::abi::call::FnAbi;
|
||||
use rustc_target::abi::{Layout, TargetDataLayout, VariantIdx};
|
||||
use rustc_target::spec::abi;
|
||||
|
||||
@ -136,7 +135,6 @@ pub struct CtxtInterners<'tcx> {
|
||||
const_allocation: InternedSet<'tcx, Allocation>,
|
||||
bound_variable_kinds: InternedSet<'tcx, List<ty::BoundVariableKind>>,
|
||||
layout: InternedSet<'tcx, Layout>,
|
||||
fn_abi: InternedSet<'tcx, FnAbi<'tcx, Ty<'tcx>>>,
|
||||
}
|
||||
|
||||
impl<'tcx> CtxtInterners<'tcx> {
|
||||
@ -157,7 +155,6 @@ impl<'tcx> CtxtInterners<'tcx> {
|
||||
const_allocation: Default::default(),
|
||||
bound_variable_kinds: Default::default(),
|
||||
layout: Default::default(),
|
||||
fn_abi: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
@ -1962,7 +1959,6 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||
self.0.interners.const_allocation.len()
|
||||
)?;
|
||||
writeln!(fmt, "Layout interner: #{}", self.0.interners.layout.len())?;
|
||||
writeln!(fmt, "FnAbi interner: #{}", self.0.interners.fn_abi.len())?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@ -2087,7 +2083,6 @@ direct_interners! {
|
||||
const_: mk_const(Const<'tcx>),
|
||||
const_allocation: intern_const_alloc(Allocation),
|
||||
layout: intern_layout(Layout),
|
||||
fn_abi: intern_fn_abi(FnAbi<'tcx, Ty<'tcx>>),
|
||||
}
|
||||
|
||||
macro_rules! slice_interners {
|
||||
|
@ -3118,7 +3118,7 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
|
||||
};
|
||||
self.fn_abi_adjust_for_abi(&mut fn_abi, sig.abi)?;
|
||||
debug!("fn_abi_new_uncached = {:?}", fn_abi);
|
||||
Ok(self.tcx.intern_fn_abi(fn_abi))
|
||||
Ok(self.tcx.arena.alloc(fn_abi))
|
||||
}
|
||||
|
||||
fn fn_abi_adjust_for_abi(
|
||||
|
Loading…
Reference in New Issue
Block a user