(sourcename string, parent *funcContext)
| 413 | } |
| 414 | |
| 415 | func 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 | |
| 432 | func (fc *funcContext) CheckUnresolvedGoto() { |
| 433 | for i := fc.Block.firstGotoIndex; i < fc.gotosCount; i++ { |
no test coverage detected
searching dependent graphs…