Skip to content

Commit aece948

Browse files
committed
Rename Cache node back to Memoize
1 parent c218f8b commit aece948

9 files changed

Lines changed: 102 additions & 102 deletions

File tree

editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
996996
},
997997
DocumentNode {
998998
inputs: vec![NodeInput::node(NodeId(0), 0)],
999-
implementation: DocumentNodeImplementation::ProtoNode(memo::cache::IDENTIFIER),
999+
implementation: DocumentNodeImplementation::ProtoNode(memo::memoize::IDENTIFIER),
10001000
..Default::default()
10011001
},
10021002
DocumentNode {
@@ -1268,7 +1268,7 @@ fn document_node_definitions() -> HashMap<DefinitionIdentifier, DocumentNodeDefi
12681268
DocumentNode {
12691269
call_argument: generic!(T),
12701270
inputs: vec![NodeInput::node(NodeId(1), 0)],
1271-
implementation: DocumentNodeImplementation::ProtoNode(memo::cache::IDENTIFIER),
1271+
implementation: DocumentNodeImplementation::ProtoNode(memo::memoize::IDENTIFIER),
12721272
..Default::default()
12731273
},
12741274
]

editor/src/messages/portfolio/document_migration.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const NODE_REPLACEMENTS: &[NodeReplacement<'static>] = &[
108108
aliases: &["graphene_core::memo::MonitorNode"],
109109
},
110110
NodeReplacement {
111-
node: graphene_std::memo::cache::IDENTIFIER,
111+
node: graphene_std::memo::memoize::IDENTIFIER,
112112
aliases: &["graphene_core::memo::MemoNode", "graphene_core::memo::ImpureMemoNode"],
113113
},
114114
NodeReplacement {
@@ -2157,7 +2157,7 @@ fn migrate_node(node_id: &NodeId, node: &DocumentNode, network_path: &[NodeId],
21572157
fn migrate_removed_catalog_definitions(node_id: &NodeId, node: &DocumentNode, network_path: &[NodeId], document: &mut DocumentMessageHandler) -> Option<()> {
21582158
// Collapse the legacy "Sample Polyline" wrapper network into the standalone `sample_polyline` proto node.
21592159
// The proto node now computes per-bezpath segment lengths inline, so the wrapper's separate `subpath_segment_lengths`
2160-
// and `Cache` nodes are no longer needed. The 7 user-facing inputs are positionally identical between the
2160+
// and `Memoize` nodes are no longer needed. The 7 user-facing inputs are positionally identical between the
21612161
// old wrapper and the new proto node.
21622162
if let Some(DefinitionIdentifier::Network(name)) = document.network_interface.reference(node_id, network_path)
21632163
&& name == "Sample Polyline"
@@ -2172,7 +2172,7 @@ fn migrate_removed_catalog_definitions(node_id: &NodeId, node: &DocumentNode, ne
21722172
}
21732173

21742174
// Collapse the legacy "Scatter Points" wrapper network into the standalone `scatter_points` proto node.
2175-
// The wrapper's trailing `Cache` node is now produced automatically by the `memoize` attribute on the
2175+
// The wrapper's trailing `Memoize` node is now produced automatically by the `memoize` attribute on the
21762176
// proto node, so the wrapper itself is redundant. The 3 user-facing inputs are positionally identical
21772177
// between the old wrapper and the new proto node.
21782178
if let Some(DefinitionIdentifier::Network(name)) = document.network_interface.reference(node_id, network_path)
@@ -2188,7 +2188,7 @@ fn migrate_removed_catalog_definitions(node_id: &NodeId, node: &DocumentNode, ne
21882188
}
21892189

21902190
// Collapse the legacy "Boolean Operation" wrapper network into the standalone `boolean_operation` proto node.
2191-
// The wrapper's trailing `Cache` node is now produced automatically by the `memoize` attribute on the
2191+
// The wrapper's trailing `Memoize` node is now produced automatically by the `memoize` attribute on the
21922192
// proto node, so the wrapper itself is redundant. The 2 user-facing inputs are positionally identical
21932193
// between the old wrapper and the new proto node.
21942194
if let Some(DefinitionIdentifier::Network(name)) = document.network_interface.reference(node_id, network_path)

node-graph/graph-craft/src/proto.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,14 +317,14 @@ impl ProtoNetwork {
317317
p.push(NodeId(10))
318318
}
319319

320-
let cache_node_id = NodeId(self.nodes.len() as u64);
320+
let memoize_node_id = NodeId(self.nodes.len() as u64);
321321

322322
self.nodes.push((
323-
cache_node_id,
323+
memoize_node_id,
324324
ProtoNode {
325325
construction_args: ConstructionArgs::Nodes(vec![node_id]),
326326
call_argument: concrete!(Context),
327-
identifier: graphene_core::memo::cache::IDENTIFIER,
327+
identifier: graphene_core::memo::memoize::IDENTIFIER,
328328
original_location: OriginalLocation {
329329
path: path.clone(),
330330
..Default::default()
@@ -352,7 +352,7 @@ impl ProtoNetwork {
352352
self.nodes.push((
353353
nullification_node_id,
354354
ProtoNode {
355-
construction_args: ConstructionArgs::Nodes(vec![cache_node_id, nullification_value_node_id]),
355+
construction_args: ConstructionArgs::Nodes(vec![memoize_node_id, nullification_value_node_id]),
356356
call_argument: concrete!(Context),
357357
identifier: graphene_core::context_modification::context_modification::IDENTIFIER,
358358
original_location: OriginalLocation {

0 commit comments

Comments
 (0)