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

Method AddLoadNil

compile.go:238–246  ·  view source on GitHub ↗
(a, b, line int)

Source from the content-addressed store, hash-verified

236}
237
238func (cd *codeStore) AddLoadNil(a, b, line int) {
239 // this method used to merge multiple consecutive LOADNIL instructions
240 // of consecutive registers into a single LOADNIL instruction, but it
241 // caused issues when the merged instructions were JMP targets, and so
242 // generated invalid code; so the merging functionality has been removed.
243 // It is safe to merge the LOADNIL instructions under certain conditions,
244 // but additional logic / complexity would be needed here.
245 cd.AddABC(OP_LOADNIL, a, b, 0, line)
246}
247
248func (cd *codeStore) SetOpCode(pc int, v int) {
249 opSetOpCode(&cd.codes[pc], v)

Callers 2

compileRegAssignmentFunction · 0.80
compileExprFunction · 0.80

Calls 1

AddABCMethod · 0.95

Tested by

no test coverage detected