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

Method EncodeABC

code.go:320–326  ·  view source on GitHub ↗
(op opCode, a, b, c int)

Source from the content-addressed store, hash-verified

318}
319
320func (f *function) EncodeABC(op opCode, a, b, c int) int {
321 f.assert(opMode(op) == iABC)
322 f.assert(bMode(op) != opArgN || b == 0)
323 f.assert(cMode(op) != opArgN || c == 0)
324 f.assert(a <= maxArgA && b <= maxArgB && c <= maxArgC)
325 return f.encode(createABC(op, a, b, c))
326}
327
328func (f *function) encodeABx(op opCode, a, bx int) int {
329 f.assert(opMode(op) == iABx || opMode(op) == iAsBx)

Callers 15

loadNilMethod · 0.95
ReturnNoneMethod · 0.95
ReturnMethod · 0.95
conditionalJumpMethod · 0.95
DischargeVariablesMethod · 0.95
dischargeToRegisterMethod · 0.95
encodeLabelMethod · 0.95
StoreVariableMethod · 0.95
SelfMethod · 0.95
encodeNotMethod · 0.95
encodeArithmeticMethod · 0.95
setListMethod · 0.95

Calls 6

assertMethod · 0.95
encodeMethod · 0.95
opModeFunction · 0.85
bModeFunction · 0.85
cModeFunction · 0.85
createABCFunction · 0.85

Tested by

no test coverage detected