Implemented compilation to SSA form
All checks were successful
/ test (push) Successful in 31s

This commit is contained in:
Eduard Urbach 2025-06-23 00:17:05 +02:00
parent f7be86a3d9
commit 31c5ed614c
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
27 changed files with 548 additions and 61 deletions

View file

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