MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / inline_call

Function inline_call

ciphercore-base/src/inline/inline_ops.rs:339–357  ·  view source on GitHub ↗
(
    graph: Graph,
    output_graph: Graph,
    dependencies: Vec<Node>,
    mode: InlineMode,
    inlining_context: &mut InliningContext,
)

Source from the content-addressed store, hash-verified

337}
338
339fn inline_call(
340 graph: Graph,
341 output_graph: Graph,
342 dependencies: Vec<Node>,
343 mode: InlineMode,
344 inlining_context: &mut InliningContext,
345) -> Result<Node> {
346 match mode {
347 InlineMode::Simple | InlineMode::DepthOptimized(_) => {
348 assign_input_nodes(graph.clone(), dependencies, inlining_context)?;
349 let result = recursively_inline_graph(graph.clone(), output_graph, inlining_context)?;
350 unassign_nodes(graph, inlining_context)?;
351 Ok(result)
352 }
353 _ => Err(runtime_error!(
354 "Optimization mode is not implemented for Call"
355 )),
356 }
357}
358
359fn is_empty_tuple(value_type: Type) -> bool {
360 match value_type {

Callers 1

recursively_inline_graphFunction · 0.85

Calls 4

assign_input_nodesFunction · 0.85
recursively_inline_graphFunction · 0.85
unassign_nodesFunction · 0.85
cloneMethod · 0.80

Tested by

no test coverage detected