github.com/goccy/go-jit@v0.0.0-20200514131505-ff78d45cf6af/block.go (about) 1 package jit 2 3 import ( 4 "github.com/goccy/go-jit/internal/ccall" 5 ) 6 7 type Block struct { 8 *ccall.Block 9 } 10 11 func toBlock(c *ccall.Block) *Block { 12 return &Block{c} 13 } 14 15 func (b *Block) Function() *Function { 16 return toFunction(b.Block.Function()) 17 } 18 19 func (b *Block) Context() *Context { 20 return toContext(b.Block.Context()) 21 } 22 23 func (b *Block) Label() *Label { 24 return toLabel(b.Block.Label()) 25 } 26 27 func (b *Block) NextLabel(label *Label) *Label { 28 return toLabel(b.Block.NextLabel(label.Label)) 29 } 30 31 func (b *Block) IsReachable() bool { 32 return b.Block.IsReachable() 33 } 34 35 func (b *Block) EndsInDead() bool { 36 return b.Block.EndsInDead() 37 }