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

Method Self

code.go:757–767  ·  view source on GitHub ↗
(e, key exprDesc)

Source from the content-addressed store, hash-verified

755}
756
757func (f *function) Self(e, key exprDesc) exprDesc {
758 e = f.ExpressionToAnyRegister(e)
759 r := e.info
760 f.freeExpression(e)
761 result := exprDesc{info: f.freeRegisterCount, kind: kindNonRelocatable} // base register for opSelf
762 f.ReserveRegisters(2) // function and 'self' produced by opSelf
763 key, k := f.expressionToRegisterOrConstant(key)
764 f.EncodeABC(opSelf, result.info, r, k)
765 f.freeExpression(key)
766 return result
767}
768
769func (f *function) invertJump(pc int) {
770 i := f.jumpControl(pc)

Callers 1

suffixedExpressionMethod · 0.80

Calls 5

freeExpressionMethod · 0.95
ReserveRegistersMethod · 0.95
EncodeABCMethod · 0.95

Tested by

no test coverage detected