q/src/ssa/Block.go
Eduard Urbach 31c5ed614c
All checks were successful
/ test (push) Successful in 31s
Implemented compilation to SSA form
2025-06-23 00:17:05 +02:00

12 lines
No EOL
315 B
Go

package ssa
// Block is a list of instructions that can be targeted in branches.
type Block struct {
Instructions []Value
}
// Append adds a new instruction to the block.
func (b *Block) Append(instr Value) *Value {
b.Instructions = append(b.Instructions, instr)
return &b.Instructions[len(b.Instructions)-1]
}