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

Method Add

compile.go:180–189  ·  view source on GitHub ↗
(inst uint32, line int)

Source from the content-addressed store, hash-verified

178}
179
180func (cd *codeStore) Add(inst uint32, line int) {
181 if l := len(cd.codes); l <= 0 || cd.pc == l {
182 cd.codes = append(cd.codes, inst)
183 cd.lines = append(cd.lines, line)
184 } else {
185 cd.codes[cd.pc] = inst
186 cd.lines[cd.pc] = line
187 }
188 cd.pc++
189}
190
191func (cd *codeStore) AddABC(op int, a int, b int, c int, line int) {
192 cd.Add(opCreateABC(op, a, b, c), line)

Callers 9

AddABCMethod · 0.95
AddABxMethod · 0.95
AddASbxMethod · 0.95
compileTableExprFunction · 0.80
TestChannelSelect1Function · 0.80
TestChannelSelect2Function · 0.80
TestChannelSelect3Function · 0.80
TestChannelSelect4Function · 0.80
TestChannelSendReceive1Function · 0.80

Calls

no outgoing calls

Tested by 5

TestChannelSelect1Function · 0.64
TestChannelSelect2Function · 0.64
TestChannelSelect3Function · 0.64
TestChannelSelect4Function · 0.64
TestChannelSendReceive1Function · 0.64