Crate peepmatic_traits[][src]

Expand description

Shared traits, types, and macros for Peepmatic.

This crate is used both at build time when constructing peephole optimizers (i.e. in the peepmatic crate), and at run time when using pre-built peephole optimizers (i.e. in the peepmatic-runtime crate and in Cranelift’s Peepmatic integration at cranelift/codegen/src/peepmatic.rs).

This crate is similar to a header file: it should generally only contain trait/type/macro definitions, not any code.

Macros

Define an operator type, as well as its parsing and typing rules.

Define both a wast::parser::Parse implementation and a peepmatic_traits::TypingRules implementation for the given operator type.

Define a wast::parser::Parse implementation for an operator type.

Define a peepmatic_traits::TypingRules implementation for the given operator type.

Traits

A trait to represent a typing context.

The typing rules for a TOperator type.

Functions

Raise a panic about an unsupported operation.