MCPcopy Index your code
hub / github.com/yuin/gopher-lua / SetTop

Method SetTop

_state.go:1245–1253  ·  view source on GitHub ↗
(idx int)

Source from the content-addressed store, hash-verified

1243}
1244
1245func (ls *LState) SetTop(idx int) {
1246 base := ls.currentLocalBase()
1247 newtop := ls.indexToReg(idx) + 1
1248 if newtop < base {
1249 ls.reg.SetTop(base)
1250 } else {
1251 ls.reg.SetTop(newtop)
1252 }
1253}
1254
1255func (ls *LState) Replace(idx int, value LValue) {
1256 base := ls.currentLocalBase()

Callers 8

ResumeMethod · 0.95
YieldMethod · 0.95
XMoveToMethod · 0.95
initCallFrameMethod · 0.45
callRMethod · 0.45
RemoveMethod · 0.45
ConcatMethod · 0.45
PCallMethod · 0.45

Calls 2

currentLocalBaseMethod · 0.95
indexToRegMethod · 0.95

Tested by

no test coverage detected