Module ir

Module ir 

Source
Expand description

Intermediate Representation (IR) for Glyph programs

This module defines the IR that sits between the AST and bytecode. The IR is designed to be:

  • Easy to generate from the AST
  • Easy to optimize
  • Easy to convert to bytecode

Structs§

IRBlock
A basic block - sequence of instructions with single entry/exit
IRBuilder
IR builder for constructing IR from AST
IRFunction
An IR function
IRModule
A complete IR module representing a Glyph program
IRProgram
Program metadata from @program decorator

Enums§

BinaryOp
Binary operations
IRInstruction
IR instructions - higher level than VM bytecode
IRPattern
IR patterns for matching
IRTerminator
Block terminators
UnaryOp
Unary operations