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

Method CloseFunction

code.go:120–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118}
119
120func (f *function) CloseFunction() exprDesc {
121 e := f.previous.ExpressionToNextRegister(makeExpression(kindRelocatable, f.previous.encodeABx(opClosure, 0, len(f.previous.f.prototypes)-1)))
122 f.ReturnNone()
123 f.LeaveBlock()
124 f.assert(f.block == nil)
125 f.p.function = f.previous
126 return e
127}
128
129func (f *function) EnterBlock(isLoop bool) {
130 // TODO www.lua.org uses a trick here to stack allocate the block, and chain blocks in the stack

Callers 1

bodyMethod · 0.80

Calls 6

ReturnNoneMethod · 0.95
LeaveBlockMethod · 0.95
assertMethod · 0.95
makeExpressionFunction · 0.85
encodeABxMethod · 0.80

Tested by

no test coverage detected