Skip to content

Commit 17bfd74

Browse files
MaikKleinarielb1
authored andcommitted
Rename more functions from trans to mono
1 parent b9ab487 commit 17bfd74

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

src/librustc_mir/monomorphize/collector.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ impl<'tcx> InliningMap<'tcx> {
294294
}
295295
}
296296

297-
pub fn collect_crate_translation_items<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
298-
mode: MonoItemCollectionMode)
299-
-> (FxHashSet<MonoItem<'tcx>>,
297+
pub fn collect_crate_mono_items<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
298+
mode: MonoItemCollectionMode)
299+
-> (FxHashSet<MonoItem<'tcx>>,
300300
InliningMap<'tcx>) {
301301
let roots = collect_roots(tcx, mode);
302302

@@ -521,10 +521,10 @@ impl<'a, 'tcx> MirVisitor<'tcx> for MirNeighborCollector<'a, 'tcx> {
521521
// from a fixed sized array to a slice. But we are only
522522
// interested in things that produce a vtable.
523523
if target_ty.is_trait() && !source_ty.is_trait() {
524-
create_trans_items_for_vtable_methods(self.tcx,
525-
target_ty,
526-
source_ty,
527-
self.output);
524+
create_mono_items_for_vtable_methods(self.tcx,
525+
target_ty,
526+
source_ty,
527+
self.output);
528528
}
529529
}
530530
mir::Rvalue::Cast(mir::CastKind::ReifyFnPointer, ref operand, _) => {
@@ -844,10 +844,10 @@ fn create_fn_trans_item<'a, 'tcx>(instance: Instance<'tcx>) -> MonoItem<'tcx> {
844844

845845
/// Creates a `TransItem` for each method that is referenced by the vtable for
846846
/// the given trait/impl pair.
847-
fn create_trans_items_for_vtable_methods<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
848-
trait_ty: Ty<'tcx>,
849-
impl_ty: Ty<'tcx>,
850-
output: &mut Vec<MonoItem<'tcx>>) {
847+
fn create_mono_items_for_vtable_methods<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
848+
trait_ty: Ty<'tcx>,
849+
impl_ty: Ty<'tcx>,
850+
output: &mut Vec<MonoItem<'tcx>>) {
851851
assert!(!trait_ty.needs_subst() && !trait_ty.has_escaping_regions() &&
852852
!impl_ty.needs_subst() && !impl_ty.has_escaping_regions());
853853

@@ -900,9 +900,9 @@ impl<'b, 'a, 'v> ItemLikeVisitor<'v> for RootCollector<'b, 'a, 'v> {
900900

901901
hir::ItemImpl(..) => {
902902
if self.mode == MonoItemCollectionMode::Eager {
903-
create_trans_items_for_default_impls(self.tcx,
904-
item,
905-
self.output);
903+
create_mono_items_for_default_impls(self.tcx,
904+
item,
905+
self.output);
906906
}
907907
}
908908

@@ -996,9 +996,9 @@ fn item_has_type_parameters<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId
996996
generics.parent_types as usize + generics.types.len() > 0
997997
}
998998

999-
fn create_trans_items_for_default_impls<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
1000-
item: &'tcx hir::Item,
1001-
output: &mut Vec<MonoItem<'tcx>>) {
999+
fn create_mono_items_for_default_impls<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
1000+
item: &'tcx hir::Item,
1001+
output: &mut Vec<MonoItem<'tcx>>) {
10021002
match item.node {
10031003
hir::ItemImpl(_,
10041004
_,

src/librustc_trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ fn collect_and_partition_translation_items<'a, 'tcx>(
10191019

10201020
let (items, inlining_map) =
10211021
time(time_passes, "translation item collection", || {
1022-
collector::collect_crate_translation_items(tcx, collection_mode)
1022+
collector::collect_crate_mono_items(tcx, collection_mode)
10231023
});
10241024

10251025
assert_symbols_are_distinct(tcx, items.iter());

0 commit comments

Comments
 (0)