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

Function countLevels

auxiliary.go:28–43  ·  view source on GitHub ↗
(l *State)

Source from the content-addressed store, hash-verified

26}
27
28func countLevels(l *State) int {
29 li, le := 1, 1
30 for _, ok := Stack(l, le); ok; _, ok = Stack(l, le) {
31 li = le
32 le *= 2
33 }
34 for li < le {
35 m := (li + le) / 2
36 if _, ok := Stack(l, m); ok {
37 li = m + 1
38 } else {
39 le = m
40 }
41 }
42 return le - 1
43}
44
45// Traceback creates and pushes a traceback of the stack l1. If message is not
46// nil it is appended at the beginning of the traceback. The level parameter

Callers 1

TracebackFunction · 0.85

Calls 1

StackFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…