Implemented a basic API for SSA
All checks were successful
/ test (push) Successful in 16s

This commit is contained in:
Eduard Urbach 2025-06-20 23:42:58 +02:00
parent 89f375f4fc
commit 14bccadd0f
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
7 changed files with 54 additions and 16 deletions

View file

@ -1,5 +1,13 @@
package ssa
// Function is a list of basic blocks.
type Function struct {
Blocks []*Block
}
// AddBlock adds a new block to the function.
func (f *Function) AddBlock() *Block {
block := &Block{}
f.Blocks = append(f.Blocks, block)
return block
}