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

Method setArg

instructions.go:139–141  ·  view source on GitHub ↗
(pos, size uint, arg int)

Source from the content-addressed store, hash-verified

137func (i instruction) arg(pos, size uint) int { return int(i >> pos & mask1(size, 0)) }
138func (i *instruction) setOpCode(op opCode) { i.setArg(posOp, sizeOp, int(op)) }
139func (i *instruction) setArg(pos, size uint, arg int) {
140 *i = *i&mask0(size, pos) | instruction(arg)<<pos&mask1(size, pos)
141}
142
143// Note: the gc optimizer cannot inline through multiple function calls. Manually inline for now.
144// func (i instruction) a() int { return i.arg(posA, sizeA) }

Callers 7

setOpCodeMethod · 0.95
setAMethod · 0.95
setBMethod · 0.95
setCMethod · 0.95
setBxMethod · 0.95
setAxMethod · 0.95
setSBxMethod · 0.95

Calls 3

mask0Function · 0.85
instructionTypeAlias · 0.85
mask1Function · 0.85

Tested by

no test coverage detected