glados-0.1.0.0
Stabilitystable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Compiler.PsInstruction

Description

 
Synopsis

Documentation

data PsInstruction Source #

Pseudo-instructions used during compilation/assembly.

@details PsInstruction is an intermediate representation used by the compiler to express labels and label-referencing operations before a dedicated assembly pass resolves textual labels to concrete instruction offsets. Many constructors here resolve to a 'Real Instruction' when labels are resolved in the assembly pass.

@return N/A (this documents the type)

Constructors

Real Instruction

A concrete instruction ready for bytecode generation

LabelDef Text

Defines a label position (e.g., "func_main:")

JumpLabel

Jumps to Label (resolved in assembly pass)

Fields

  • Text

    Resolves to Real (Jump off)

JumpIfFalseLabel Text

Resolves to Real (JumpIfFalse off)

JumpIfTrueLabel Text

Resolves to Real (JumpIfTrue off)

CallLabel

Function Calls to Label

Fields

  • Text

    Resolves to Real (Call off)

TailCallLabel Text

Resolves to Real (TailCall off)

MakeClosureLabel

Closure & Address Ops to Label Used when we need the address of a function defined by a label

Fields

  • Text
     
  • Int

    Resolves to Real (MakeClosure off n)

GetFuncAddrLabel Text

Resolves to Real (GetFuncAddr off)

Instances

Instances details
Show PsInstruction Source # 
Instance details

Defined in Compiler.PsInstruction

Eq PsInstruction Source # 
Instance details

Defined in Compiler.PsInstruction