Implemented compilation to SSA form
Some checks failed
/ test (push) Failing after 31s

This commit is contained in:
Eduard Urbach 2025-06-23 00:09:52 +02:00
parent f7be86a3d9
commit d1ce1ef839
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
24 changed files with 534 additions and 59 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]
}