Skip to main content

Module select

Module select 

Source
Expand description

Matching a target’s lowering rules against a term.

Design: spec/10-backend.md section 10.2. The rules themselves are in rules/, one file per target, and the automaton they compile into is generated by rucc-rules when this crate is built.

The walk over that automaton is rucc_base::rules, because rucc-opt matches IR against a table of rewrite rules with the same walk and neither crate can see the other. What is here is which targets there are and the tests that the x86-64 table lowers what it should.

The names are re-exported rather than reached for through rucc_base, because the generated file refers to them through super and that is the whole of the contract between the two.

Modules§

x86_64
The x86-64 lowering table.

Structs§

Match
What a successful match found.
Node
One node of the trie over the patterns.
Rule
One rule, as much of it as matching needs.
Table
A set of rules, as an automaton over their patterns.

Enums§

Piece
One piece of a replacement, in the pre-order that builds it.
Test
One test on one subterm.

Traits§

Subject
The bits of a term the automaton asks about.

Type Aliases§

Guard
A condition on the constants a pattern matched.