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

Method PatchClose

code.go:498–505  ·  view source on GitHub ↗
(list, level int)

Source from the content-addressed store, hash-verified

496}
497
498func (f *function) PatchClose(list, level int) {
499 f.assert(f.isJumpListWalkable(list))
500 for level, next := level+1, 0; list != noJump; list = next {
501 next = f.jump(list)
502 f.assert(f.f.code[list].opCode() == opJump && f.f.code[list].a() == 0 || f.f.code[list].a() >= level)
503 f.f.code[list].setA(level)
504 }
505}
506
507func (f *function) PatchToHere(list int) {
508 f.assert(f.isJumpListWalkable(list))

Callers 4

findLabelMethod · 0.95
moveGotosOutMethod · 0.95
LeaveBlockMethod · 0.95
repeatStatementMethod · 0.80

Calls 6

assertMethod · 0.95
isJumpListWalkableMethod · 0.95
jumpMethod · 0.95
opCodeMethod · 0.80
aMethod · 0.80
setAMethod · 0.80

Tested by

no test coverage detected