Finch Notation Internals
Finch IR is a tree structure that represents a finch program. Different types of nodes are delineated by a FinchKind enum, for type stability. There are a few useful functions to be aware of:
Finch.FinchNotation.FinchNode — Type
FinchNodeA Finch IR node, used to represent an imperative, physical Finch program.
The FinchNode struct represents many different Finch IR nodes. The nodes are differentiated by a FinchNotation.FinchNodeKind enum.
Finch.FinchNotation.cached — Constant
Finch.FinchNotation.finch_leaf — Function
finch_leaf(x)Return a terminal finch node wrapper around x. A convenience function to determine whether x should be understood by default as a literal, value, or virtual.
Finch.FinchNotation.isstateful — Function
isstateful(node)Returns true if the node is a finch statement, and false if the node is an index expression. Typically, statements specify control flow and expressions describe values.
sourceFinch.FinchNotation.isliteral — Function
Finch.FinchNotation.isvalue — Function
Finch.FinchNotation.isconstant — Function
isconstant(node)Returns true if the node can be expected to be constant within the current finch context
source