use session::Session;
use session::config;
use symbol_map::SymbolMap;
-use util::sha2::Sha256;
use util::nodemap::{NodeSet, DefIdMap, FnvHashMap, FnvHashSet};
use std::ffi::{CStr, CString};
export_map: ExportMap,
reachable: NodeSet,
link_meta: LinkMeta,
- symbol_hasher: RefCell<Sha256>,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
stats: Stats,
check_overflow: bool,
impl<'b, 'tcx> SharedCrateContext<'b, 'tcx> {
pub fn new(tcx: TyCtxt<'b, 'tcx, 'tcx>,
export_map: ExportMap,
- symbol_hasher: Sha256,
link_meta: LinkMeta,
reachable: NodeSet,
check_overflow: bool)
export_map: export_map,
reachable: reachable,
link_meta: link_meta,
- symbol_hasher: RefCell::new(symbol_hasher),
tcx: tcx,
stats: Stats {
n_glues_created: Cell::new(0),
})
}
- pub fn symbol_hasher(&self) -> &RefCell<Sha256> {
- &self.symbol_hasher
- }
-
pub fn metadata_symbol_name(&self) -> String {
format!("rust_metadata_{}_{}",
self.link_meta().crate_name,
&self.local().llsizingtypes
}
- pub fn symbol_hasher<'a>(&'a self) -> &'a RefCell<Sha256> {
- &self.shared.symbol_hasher
- }
-
pub fn type_hashcodes<'a>(&'a self) -> &'a RefCell<FnvHashMap<Ty<'tcx>, String>> {
&self.local().type_hashcodes
}