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

Method PropagateMV

compile.go:224–236  ·  view source on GitHub ↗
(top int, save *int, reg *int, inc int)

Source from the content-addressed store, hash-verified

222}
223
224func (cd *codeStore) PropagateMV(top int, save *int, reg *int, inc int) {
225 lastinst := cd.Last()
226 if opGetArgA(lastinst) >= top {
227 switch opGetOpCode(lastinst) {
228 case OP_MOVE:
229 cd.Pop()
230 *save = opGetArgB(lastinst)
231 return
232 }
233 }
234 *save = *reg
235 *reg = *reg + inc
236}
237
238func (cd *codeStore) AddLoadNil(a, b, line int) {
239 // this method used to merge multiple consecutive LOADNIL instructions

Callers

nothing calls this directly

Calls 5

LastMethod · 0.95
PopMethod · 0.95
opGetArgAFunction · 0.85
opGetOpCodeFunction · 0.85
opGetArgBFunction · 0.85

Tested by

no test coverage detected