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

Method setList

code.go:961–974  ·  view source on GitHub ↗
(base, elementCount, storeCount int)

Source from the content-addressed store, hash-verified

959func (f *function) FixLine(line int) { f.f.lineInfo[len(f.f.code)-1] = int32(line) }
960
961func (f *function) setList(base, elementCount, storeCount int) {
962 if f.assert(storeCount != 0); storeCount == MultipleReturns {
963 storeCount = 0
964 }
965 if c := (elementCount-1)/listItemsPerFlush + 1; c <= maxArgC {
966 f.EncodeABC(opSetList, base, storeCount, c)
967 } else if c <= maxArgAx {
968 f.EncodeABC(opSetList, base, storeCount, 0)
969 f.encodeExtraArg(c)
970 } else {
971 f.p.syntaxError("constructor too long")
972 }
973 f.freeRegisterCount = base + 1
974}
975
976func (f *function) CheckConflict(t *assignmentTarget, e exprDesc) {
977 extra, conflict := f.freeRegisterCount, false

Callers 2

FlushToConstructorMethod · 0.95
CloseConstructorMethod · 0.95

Calls 4

assertMethod · 0.95
EncodeABCMethod · 0.95
encodeExtraArgMethod · 0.95
syntaxErrorMethod · 0.80

Tested by

no test coverage detected