// ---
// tags: trident, rust
// crystal-type: source
// crystal-domain: comp
// ---
//! TreeLowering: consumes `&[TIROp]` and produces tree-structured output.
//!
//! Each tree-machine target implements `TreeLowering` to translate
//! stack-based IR operations into combinator expressions (Nock formulas,
//! or similar tree representations).
//!
//! This is the tree-machine counterpart of:
//! - `tir::lower::StackLowering` โ stack targets โ assembly text
//! - `lir::lower::RegisterLowering` โ register targets โ machine code
//! - `kir::lower::KernelLowering` โ GPU targets โ kernel source
use crateTIROp;
/// A noun โ the universal data type for tree machines (Nock, nox).
///
/// All data in Nock is a noun: either an atom (unsigned integer)
/// or a cell (ordered pair of nouns). This recursive structure
/// is the "assembly language" of tree machines.
/// Lowers TIR operations into tree-structured output for combinator VMs.
///
/// Unlike stack and register lowering, tree lowering produces a `Noun` โ
/// a recursive tree structure that IS the program. There is no assembly
/// text or machine code; the program is data.
/// Create a tree-lowering backend for the given target name.
Homonyms
cyb/evy/forks/naga/src/back/hlsl/mod.rs
struct Baz { m: mat3x2, } struct Baz { float2 m_0; float2 m_1; float2 m_2; }; float3x2 GetMatmOnBaz(Baz obj) { return float3x2(obj.m_0, obj.m_1, obj.m_2); }