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

Method CloseForBody

code.go:1129–1142  ·  view source on GitHub ↗
(prep, base, line, n int, isNumeric bool)

Source from the content-addressed store, hash-verified

1127}
1128
1129func (f *function) CloseForBody(prep, base, line, n int, isNumeric bool) {
1130 f.LeaveBlock()
1131 f.PatchToHere(prep)
1132 var end int
1133 if isNumeric {
1134 end = f.encodeAsBx(opForLoop, base, noJump)
1135 } else {
1136 f.EncodeABC(opTForCall, base, 0, n)
1137 f.FixLine(line)
1138 end = f.encodeAsBx(opTForLoop, base+2, noJump)
1139 }
1140 f.PatchList(end, prep+1)
1141 f.FixLine(line)
1142}
1143
1144func (f *function) OpenMainFunction() {
1145 f.EnterBlock(false)

Callers 1

forBodyMethod · 0.80

Calls 6

LeaveBlockMethod · 0.95
PatchToHereMethod · 0.95
encodeAsBxMethod · 0.95
EncodeABCMethod · 0.95
FixLineMethod · 0.95
PatchListMethod · 0.95

Tested by

no test coverage detected