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

Method setOpCode

instructions.go:138–138  ·  view source on GitHub ↗
(op opCode)

Source from the content-addressed store, hash-verified

136func (i instruction) opCode() opCode { return opCode(i >> posOp & (1<<sizeOp - 1)) }
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}

Callers 1

ReturnMethod · 0.80

Calls 1

setArgMethod · 0.95

Tested by

no test coverage detected