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

Method LeaveBlock

compile.go:587–597  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

585}
586
587func (fc *funcContext) LeaveBlock() int {
588 closed := fc.CloseUpvalues()
589 fc.EndScope()
590
591 if fc.Block.Parent != nil {
592 fc.ResolveCurrentBlockGotosWithParentBlock()
593 }
594 fc.Block = fc.Block.Parent
595 fc.SetRegTop(fc.Block.LocalVars.LastIndex())
596 return closed
597}
598
599func (fc *funcContext) EndScope() {
600 for _, vr := range fc.Block.LocalVars.List() {

Callers 6

compileBlockFunction · 0.80
compileStmtFunction · 0.80
compileWhileStmtFunction · 0.80
compileRepeatStmtFunction · 0.80
compileNumberForStmtFunction · 0.80
compileGenericForStmtFunction · 0.80

Calls 5

CloseUpvaluesMethod · 0.95
EndScopeMethod · 0.95
SetRegTopMethod · 0.95
LastIndexMethod · 0.80

Tested by

no test coverage detected