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

Function mainLoop

_vm.go:9–31  ·  view source on GitHub ↗
(L *LState, baseframe *callFrame)

Source from the content-addressed store, hash-verified

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