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

Function mainLoop

vm.go:13–35  ·  view source on GitHub ↗
(L *LState, baseframe *callFrame)

Source from the content-addressed store, hash-verified

11)
12
13func mainLoop(L *LState, baseframe *callFrame) {
14 var inst uint32
15 var cf *callFrame
16
17 if L.stack.IsEmpty() {
18 return
19 }
20
21 L.currentFrame = L.stack.Last()
22 if L.currentFrame.Fn.IsG {
23 callGFunction(L, false)
24 return
25 }
26
27 for {
28 cf = L.currentFrame
29 inst = cf.Fn.Proto.Code[cf.Pc]
30 cf.Pc++
31 if jumpTable[int(inst>>26)](L, inst, baseframe) == 1 {
32 return
33 }
34 }
35}
36
37func mainLoopWithContext(L *LState, baseframe *callFrame) {
38 var inst uint32

Callers

nothing calls this directly

Calls 3

callGFunctionFunction · 0.70
IsEmptyMethod · 0.65
LastMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…