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

Method pushLuaFrame

stack.go:165–186  ·  view source on GitHub ↗
(function, base, resultCount int, p *prototype)

Source from the content-addressed store, hash-verified

163}
164
165func (l *State) pushLuaFrame(function, base, resultCount int, p *prototype) *callInfo {
166 ci := l.callInfo.next
167 if ci == nil {
168 ci = &callInfo{previous: l.callInfo, luaCallInfo: &luaCallInfo{code: p.code}}
169 l.callInfo.next = ci
170 } else if ci.luaCallInfo == nil {
171 ci.goCallInfo = nil
172 ci.luaCallInfo = &luaCallInfo{code: p.code}
173 } else {
174 ci.savedPC = 0
175 ci.code = p.code
176 }
177 ci.function = function
178 ci.top = base + p.maxStackSize
179 // TODO l.assert(ci.top <= l.stackLast)
180 ci.resultCount = resultCount
181 ci.callStatus = callStatusLua
182 ci.frame = l.stack[base:ci.top]
183 l.callInfo = ci
184 l.top = ci.top
185 return ci
186}
187
188func (l *State) pushGoFrame(function, resultCount int) {
189 ci := l.callInfo.next

Callers 1

preCallMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected