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

Method CheckStack

code.go:547–553  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

545}
546
547func (f *function) CheckStack(n int) {
548 if n += f.freeRegisterCount; n >= maxStack {
549 f.p.syntaxError("function or expression too complex")
550 } else if n > f.f.maxStackSize {
551 f.f.maxStackSize = n
552 }
553}
554
555func (f *function) ReserveRegisters(n int) {
556 f.CheckStack(n)

Callers 1

ReserveRegistersMethod · 0.95

Calls 1

syntaxErrorMethod · 0.80

Tested by

no test coverage detected