MCPcopy Index your code
hub / github.com/Shopify/go-lua / findLabel

Method findLabel

code.go:189–201  ·  view source on GitHub ↗
(i int)

Source from the content-addressed store, hash-verified

187}
188
189func (f *function) findLabel(i int) int {
190 g, b := f.p.pendingGotos[i], f.block
191 for _, l := range f.p.activeLabels[b.firstLabel:] {
192 if l.name == g.name {
193 if g.activeVariableCount > l.activeVariableCount && (b.hasUpValue || len(f.p.activeLabels) > b.firstLabel) {
194 f.PatchClose(g.pc, l.activeVariableCount)
195 }
196 f.closeGoto(i, l)
197 return 0
198 }
199 }
200 return 1
201}
202
203func (f *function) CheckRepeatedLabel(name string) {
204 for _, l := range f.p.activeLabels[f.block.firstLabel:] {

Callers 2

MakeGotoMethod · 0.95
moveGotosOutMethod · 0.95

Calls 2

PatchCloseMethod · 0.95
closeGotoMethod · 0.95

Tested by

no test coverage detected