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

Method OpenFunction

code.go:114–118  ·  view source on GitHub ↗
(line int)

Source from the content-addressed store, hash-verified

112}
113
114func (f *function) OpenFunction(line int) {
115 f.f.prototypes = append(f.f.prototypes, prototype{source: f.p.source, maxStackSize: 2, lineDefined: line})
116 f.p.function = &function{f: &f.f.prototypes[len(f.f.prototypes)-1], constantLookup: make(map[value]int), previous: f, p: f.p, jumpPC: noJump, firstLocal: len(f.p.activeVariables)}
117 f.p.function.EnterBlock(false)
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)))

Callers 1

bodyMethod · 0.80

Calls 1

EnterBlockMethod · 0.80

Tested by

no test coverage detected