AssemblerConfig<C> class

Configuration object passed to ControlFlowGraph.assembleToInstructions.

Provides user-defined callbacks for the five categories of synthesised operations emitted by the register allocator:

  • spill – store a register to a typed local slot (stloc N).
  • reload – load a typed local slot into a register (ldloc N).
  • move – copy one register into another (the two have the same RegType).
  • swap – exchange the contents of two registers of the same RegType.
  • jump – unconditional branch to a block whose ID is not the next in the layout order.

contextData is threaded through every InstructionCreator.createInstruction call and the synthesised-op callbacks as AssembleContext.data.

Constructors

AssemblerConfig({required C contextData, required SpillCallback<C> onSpill, required ReloadCallback<C> onReload, MoveCallback<C>? onMove, SwapCallback<C>? onSwap, JumpCallback<C>? onJump})
const

Properties

contextData → C
Arbitrary user data made available in every callback via AssembleContext.data.
final
hashCode int
The hash code for this object.
no setterinherited
onJump → JumpCallback<C>?
Called when a block's sole successor is not the next block in the layout order, requiring an explicit unconditional jump. If null, the jump is silently omitted (useful when the caller controls block ordering externally).
final
onMove MoveCallback<C>?
Called once per synthesised Assign (register move). If null, moves are silently dropped.
final
onReload ReloadCallback<C>
Called once per ReloadNode in the post-allocation IR.
final
onSpill ReloadCallback<C>
Called once per SpillNode in the post-allocation IR.
final
onSwap MoveCallback<C>?
Called once per synthesised SwapOp (register swap). If null, swaps are silently dropped.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited