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

Method EnterBlock

code.go:129–133  ·  view source on GitHub ↗
(isLoop bool)

Source from the content-addressed store, hash-verified

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
131 f.block = &block{previous: f.block, firstLabel: len(f.p.activeLabels), firstGoto: len(f.p.pendingGotos), activeVariableCount: f.activeVariableCount, isLoop: isLoop}
132 f.assert(f.freeRegisterCount == f.activeVariableCount)
133}
134
135func (f *function) undefinedGotoError(g label) {
136 if isReserved(g.name) {

Callers 8

OpenForBodyMethod · 0.95
OpenMainFunctionMethod · 0.95
OpenFunctionMethod · 0.80
forStatementMethod · 0.80
testThenBlockMethod · 0.80
blockMethod · 0.80
whileStatementMethod · 0.80
repeatStatementMethod · 0.80

Calls 1

assertMethod · 0.95

Tested by

no test coverage detected