MCPcopy Index your code
hub / github.com/yuin/gopher-lua / newFuncContext

Function newFuncContext

compile.go:415–430  ·  view source on GitHub ↗
(sourcename string, parent *funcContext)

Source from the content-addressed store, hash-verified

413}
414
415func newFuncContext(sourcename string, parent *funcContext) *funcContext {
416 fc := &funcContext{
417 Proto: newFunctionProto(sourcename),
418 Code: &codeStore{make([]uint32, 0, 1024), make([]int, 0, 1024), 0},
419 Parent: parent,
420 Upvalues: newVarNamePool(0),
421 Block: newCodeBlock(newVarNamePool(0), labelNoJump, nil, nil, 0),
422 regTop: 0,
423 labelId: 1,
424 labelPc: map[int]int{},
425 gotosCount: 0,
426 unresolvedGotos: map[int]*gotoLabelDesc{},
427 }
428 fc.Blocks = []*codeBlock{fc.Block}
429 return fc
430}
431
432func (fc *funcContext) CheckUnresolvedGoto() {
433 for i := fc.Block.firstGotoIndex; i < fc.gotosCount; i++ {

Callers 2

compileExprFunction · 0.85
CompileFunction · 0.85

Calls 3

newFunctionProtoFunction · 0.85
newVarNamePoolFunction · 0.85
newCodeBlockFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…