Skip to content
/ rust Public
forked from rust-lang/rust

Commit f5dc674

Browse files
committed
Rename intern_new_node to alloc_new_node
1 parent 58c148a commit f5dc674

File tree

1 file changed

+4
-4
lines changed
  • compiler/rustc_query_system/src/dep_graph

1 file changed

+4
-4
lines changed

compiler/rustc_query_system/src/dep_graph/graph.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl<D: Deps> DepGraph<D> {
140140
let colors = DepNodeColorMap::new(prev_graph_node_count);
141141

142142
// Instantiate a dependy-less node only once for anonymous queries.
143-
let _green_node_index = current.intern_new_node(
143+
let _green_node_index = current.alloc_new_node(
144144
DepNode { kind: D::DEP_KIND_NULL, hash: current.anon_id_seed.into() },
145145
EdgesVec::new(),
146146
Fingerprint::ZERO,
@@ -447,7 +447,7 @@ impl<D: Deps> DepGraphData<D> {
447447
// memory impact of this `anon_node_to_index` map remains tolerable, and helps
448448
// us avoid useless growth of the graph with almost-equivalent nodes.
449449
self.current.anon_node_to_index.get_or_insert_with(target_dep_node, || {
450-
self.current.intern_new_node(target_dep_node, task_deps, Fingerprint::ZERO)
450+
self.current.alloc_new_node(target_dep_node, task_deps, Fingerprint::ZERO)
451451
})
452452
}
453453
};
@@ -1219,7 +1219,7 @@ impl<D: Deps> CurrentDepGraph<D> {
12191219
/// Writes the node to the current dep-graph and allocates a `DepNodeIndex` for it.
12201220
/// Assumes that this is a node that has no equivalent in the previous dep-graph.
12211221
#[inline(always)]
1222-
fn intern_new_node(
1222+
fn alloc_new_node(
12231223
&self,
12241224
key: DepNode,
12251225
edges: EdgesVec,
@@ -1298,7 +1298,7 @@ impl<D: Deps> CurrentDepGraph<D> {
12981298
let fingerprint = fingerprint.unwrap_or(Fingerprint::ZERO);
12991299

13001300
// This is a new node: it didn't exist in the previous compilation session.
1301-
let dep_node_index = self.intern_new_node(key, edges, fingerprint);
1301+
let dep_node_index = self.alloc_new_node(key, edges, fingerprint);
13021302

13031303
(dep_node_index, None)
13041304
}

0 commit comments

Comments
 (0)