This commit is contained in:
parent
89f375f4fc
commit
14bccadd0f
7 changed files with 54 additions and 16 deletions
|
@ -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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue