Arguments required to construct a vertex which represents the definition of a function in the DataflowGraph|dataflow graph.

isFunctionDefinitionVertex - to check if a vertex is a function definition vertex

interface DataflowGraphVertexFunctionDefinition {
    cds: undefined | ControlDependency[];
    environment?: REnvironmentInformation;
    exitPoints: readonly ExitPoint[];
    id: NodeId;
    link?: DataflowGraphVertexAstLink;
    mode?: ("s3" | "s4" | "s7")[];
    params: Record<NodeId, boolean>;
    subflow: DataflowFunctionFlowInformation;
    tag: FunctionDefinition;
    [key: string]: unknown;
}

Hierarchy (View Summary)

Indexable

  • [key: string]: unknown

Hierarchy-Diagram

UML class diagram of DataflowGraphVertexFunctionDefinition

Properties

cds: undefined | ControlDependency[]

ControlDependency - the collection of control dependencies which have an influence on whether the vertex is executed.

The environment in which the function is defined (this is only attached if the DFG deems it necessary).

exitPoints: readonly ExitPoint[]

All exit points of the function definitions. In other words: last expressions/return calls

id: NodeId

The id of the node (the id assigned by the ParentInformation decoration). This unanimously identifies the vertex in the DataflowGraph|dataflow graph as well as the corresponding NormalizedAst|normalized AST.

Describes the collection of AST vertices that contributed to this vertex. For example, this is useful with replacement operators, telling you which assignment operator caused them

mode?: ("s3" | "s4" | "s7")[]

If the function is a (potential) S3/S4/S7 dispatch Please note that flowR may create these flags on use (e.g. s3 as otherwise any func with a . would be considered S3). This is more of a convenience flag for later processing.

params: Record<NodeId, boolean>

Maps each param to whether it is read, this is an estimate!

The static subflow of the function definition, constructed within processFunctionDefinition. If the vertex is (for example) a function, it can have a subgraph which is used as a template for each call. This is the body of the function.

Used to identify and separate different types of vertices.