Crate sunscreen_compiler_common

Source
Expand description

This crate contains common types and infrastructure for Sunscreen’s compilers.

Modules§

macros
Helper methods for macros.
transforms
A set of generic compiler transforms.

Structs§

CompilationResult
The result of a frontend compiler.
Context
A compilation context. This stores the current parse graph.
GraphQuery
A wrapper for ascertaining the structure of the underlying graph. This type is used in forward_traverse and reverse_traverse callbacks.
NodeInfo
Information about a node in the compilation graph.
Type
A type which represents the fully qualified name and version of a datatype.

Enums§

EdgeInfo
Information about how one compiler graph node relates to another.
GraphQueryError
An error that can occur when querying various aspects about an operation graph.

Traits§

Operation
A supertrait that concisely contains all the traits needed to serve as an operation for NodeInfo.
Render
Renders this object into a format that can be viewed by external tooling (e.g. DotViz, HTML, etc.)
TransformList
A list of transformations that should be applied to the graph.
TypeName
A trait the gives a name an version to a given type

Functions§

forward_traverse
Call the supplied callback for each node in the given graph in topological order.
forward_traverse_mut
A specialized topological DAG traversal that allows the following graph mutations during traversal:
reverse_traverse
Call the supplied callback for each node in the given graph in reverse topological order.
reverse_traverse_mut
A specialized reverse topological DAG traversal that allows the following graph mutations during traversal: