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

Method callR

_state.go:1033–1061  ·  view source on GitHub ↗

+inline-end

(nargs, nret, rbase int)

Source from the content-addressed store, hash-verified

1031} // +inline-end
1032
1033func (ls *LState) callR(nargs, nret, rbase int) {
1034 base := ls.reg.Top() - nargs - 1
1035 if rbase < 0 {
1036 rbase = base
1037 }
1038 lv := ls.reg.Get(base)
1039 fn, meta := ls.metaCall(lv)
1040 ls.pushCallFrame(callFrame{
1041 Fn: fn,
1042 Pc: 0,
1043 Base: base,
1044 LocalBase: base + 1,
1045 ReturnBase: rbase,
1046 NArgs: nargs,
1047 NRet: nret,
1048 Parent: ls.currentFrame,
1049 TailCall: 0,
1050 }, lv, meta)
1051 if ls.G.MainThread == nil {
1052 ls.G.MainThread = ls
1053 ls.G.CurrentThread = ls
1054 ls.mainLoop(ls, nil)
1055 } else {
1056 ls.mainLoop(ls, ls.currentFrame)
1057 }
1058 if nret != MultRet {
1059 ls.reg.SetTop(rbase + nret)
1060 }
1061}
1062
1063func (ls *LState) getField(obj LValue, key LValue) LValue {
1064 curobj := obj

Callers 1

CallMethod · 0.95

Calls 5

metaCallMethod · 0.95
pushCallFrameMethod · 0.95
TopMethod · 0.45
GetMethod · 0.45
SetTopMethod · 0.45

Tested by

no test coverage detected