q/src/ssa/Block.go
Eduard Urbach d1ce1ef839
Some checks failed
/ test (push) Failing after 31s
Implemented compilation to SSA form
2025-06-23 00:09:52 +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]
}