MCPcopy
hub / github.com/yuin/gopher-lua / newCodeBlock

Function newCodeBlock

compile.go:369–376  ·  view source on GitHub ↗
(localvars *varNamePool, blabel int, parent *codeBlock, pos ast.PositionHolder, firstGotoIndex int)

Source from the content-addressed store, hash-verified

367}
368
369func newCodeBlock(localvars *varNamePool, blabel int, parent *codeBlock, pos ast.PositionHolder, firstGotoIndex int) *codeBlock {
370 bl := &codeBlock{localvars, blabel, parent, false, 0, 0, map[string]*gotoLabelDesc{}, firstGotoIndex}
371 if pos != nil {
372 bl.LineStart = pos.Line()
373 bl.LastLine = pos.LastLine()
374 }
375 return bl
376}
377
378func (b *codeBlock) AddLabel(label *gotoLabelDesc) *gotoLabelDesc {
379 if old, ok := b.labels[label.Name]; ok {

Callers 2

newFuncContextFunction · 0.85
EnterBlockMethod · 0.85

Calls 2

LineMethod · 0.65
LastLineMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…