Struct rustc_trans::trans::CrateContext [−] [src]

pub struct CrateContext<'a, 'tcx> {
    // some fields omitted
}
Unstable

Methods

impl<'b, 'tcx> CrateContext<'b, 'tcx>

fn shared(&self) -> &'b SharedCrateContext<'tcx>

Unstable

fn local(&self) -> &'b LocalCrateContext<'tcx>

Unstable

fn rotate(&self) -> CrateContext<'b, 'tcx>

Unstable

Get a (possibly) different CrateContext from the same SharedCrateContext.

fn maybe_iter(&self, iter_all: bool) -> CrateContextMaybeIterator<'b, 'tcx>

Unstable

Either iterate over only self, or iterate over all CrateContexts in the SharedCrateContext. The iterator produces (ccx, is_origin) pairs, where is_origin is true if ccx is self and false otherwise. This method is useful for avoiding code duplication in cases where it may or may not be necessary to translate code into every context.

fn tcx<'a>(&'a self) -> &'a ctxt<'tcx>

Unstable

fn sess<'a>(&'a self) -> &'a Session

Unstable

fn builder<'a>(&'a self) -> Builder<'a, 'tcx>

Unstable

fn raw_builder<'a>(&'a self) -> BuilderRef

Unstable

fn get_intrinsic(&self, key: &&'static str) -> ValueRef

Unstable

fn is_split_stack_supported(&self) -> bool

Unstable

fn llmod(&self) -> ModuleRef

Unstable

fn llcx(&self) -> ContextRef

Unstable

fn td<'a>(&'a self) -> &'a TargetData

Unstable

fn tn<'a>(&'a self) -> &'a TypeNames

Unstable

fn externs<'a>(&'a self) -> &'a RefCell<ExternMap>

Unstable

fn item_vals<'a>(&'a self) -> &'a RefCell<NodeMap<ValueRef>>

Unstable

fn export_map<'a>(&'a self) -> &'a ExportMap

Unstable

fn reachable<'a>(&'a self) -> &'a NodeSet

Unstable

fn item_symbols<'a>(&'a self) -> &'a RefCell<NodeMap<String>>

Unstable
Unstable

fn needs_unwind_cleanup_cache(&self) -> &RefCell<FnvHashMap<Ty<'tcx>, bool>>

Unstable

fn fn_pointer_shims(&self) -> &RefCell<FnvHashMap<Ty<'tcx>, ValueRef>>

Unstable

fn drop_glues<'a>(&'a self) -> &'a RefCell<FnvHashMap<DropGlueKind<'tcx>, ValueRef>>

Unstable

fn external<'a>(&'a self) -> &'a RefCell<DefIdMap<Option<NodeId>>>

Unstable

fn external_srcs<'a>(&'a self) -> &'a RefCell<NodeMap<DefId>>

Unstable

fn monomorphized<'a>(&'a self) -> &'a RefCell<FnvHashMap<MonoId<'tcx>, ValueRef>>

Unstable

fn monomorphizing<'a>(&'a self) -> &'a RefCell<DefIdMap<usize>>

Unstable

fn vtables<'a>(&'a self) -> &'a RefCell<FnvHashMap<PolyTraitRef<'tcx>, ValueRef>>

Unstable

fn const_cstr_cache<'a>(&'a self) -> &'a RefCell<FnvHashMap<InternedString, ValueRef>>

Unstable

fn const_unsized<'a>(&'a self) -> &'a RefCell<FnvHashMap<ValueRef, ValueRef>>

Unstable

fn const_globals<'a>(&'a self) -> &'a RefCell<FnvHashMap<ValueRef, ValueRef>>

Unstable

fn const_values<'a>(&'a self) -> &'a RefCell<FnvHashMap<(NodeId, &'tcx Substs<'tcx>), ValueRef>>

Unstable

fn static_values<'a>(&'a self) -> &'a RefCell<NodeMap<ValueRef>>

Unstable

fn extern_const_values<'a>(&'a self) -> &'a RefCell<DefIdMap<ValueRef>>

Unstable

fn impl_method_cache<'a>(&'a self) -> &'a RefCell<FnvHashMap<(DefId, Name), DefId>>

Unstable

fn closure_bare_wrapper_cache<'a>(&'a self) -> &'a RefCell<FnvHashMap<ValueRef, ValueRef>>

Unstable

fn lltypes<'a>(&'a self) -> &'a RefCell<FnvHashMap<Ty<'tcx>, Type>>

Unstable

fn llsizingtypes<'a>(&'a self) -> &'a RefCell<FnvHashMap<Ty<'tcx>, Type>>

Unstable

fn adt_reprs<'a>(&'a self) -> &'a RefCell<FnvHashMap<Ty<'tcx>, Rc<Repr<'tcx>>>>

Unstable

fn symbol_hasher<'a>(&'a self) -> &'a RefCell<Sha256>

Unstable

fn type_hashcodes<'a>(&'a self) -> &'a RefCell<FnvHashMap<Ty<'tcx>, String>>

Unstable

fn stats<'a>(&'a self) -> &'a Stats

Unstable

fn available_monomorphizations<'a>(&'a self) -> &'a RefCell<FnvHashSet<String>>

Unstable

fn available_drop_glues(&self) -> &RefCell<FnvHashMap<DropGlueKind<'tcx>, String>>

Unstable

fn int_type(&self) -> Type

Unstable

fn opaque_vec_type(&self) -> Type

Unstable

fn closure_vals<'a>(&'a self) -> &'a RefCell<FnvHashMap<MonoId<'tcx>, ValueRef>>

Unstable

fn dbg_cx<'a>(&'a self) -> &'a Option<CrateDebugContext<'tcx>>

Unstable

fn eh_personality<'a>(&'a self) -> &'a RefCell<Option<ValueRef>>

Unstable

fn count_llvm_insn(&self)

Unstable

fn trait_cache(&self) -> &RefCell<FnvHashMap<PolyTraitRef<'tcx>, Vtable<'tcx, ()>>>

Unstable

fn obj_size_bound(&self) -> u64

Unstable

Return exclusive upper bound on object size.

The theoretical maximum object size is defined as the maximum positive int value. This ensures that the offset semantics remain well-defined by allowing it to correctly index every address within an object along with one byte past the end, along with allowing int to store the difference between any two pointers into an object.

The upper bound on 64-bit currently needs to be lower because LLVM uses a 64-bit integer to represent object size in bits. It would need to be 1 << 61 to account for this, but is currently conservatively bounded to 1 << 47 as that is enough to cover the current usable address space on 64-bit ARMv8 and x86_64.

fn report_overbig_object(&self, obj: Ty<'tcx>) -> !

Unstable

fn check_overflow(&self) -> bool

Unstable

fn check_drop_flag_for_sanity(&self) -> bool

Unstable