A State is an opaque structure representing per thread Lua state.
| 219 | |
| 220 | // A State is an opaque structure representing per thread Lua state. |
| 221 | type State struct { |
| 222 | error error |
| 223 | shouldYield bool |
| 224 | top int // first free slot in the stack |
| 225 | global *globalState |
| 226 | callInfo *callInfo // call info for current function |
| 227 | oldPC pc // last pC traced |
| 228 | stackLast int // last free slot in the stack |
| 229 | stack []value |
| 230 | nonYieldableCallCount int |
| 231 | nestedGoCallCount int |
| 232 | hookMask byte |
| 233 | allowHook bool |
| 234 | internalHook bool |
| 235 | baseHookCount int |
| 236 | hookCount int |
| 237 | hooker Hook |
| 238 | upValues *openUpValue |
| 239 | errorFunction int // current error handling function (stack index) |
| 240 | baseCallInfo callInfo // callInfo for first level (go calling lua) |
| 241 | protectFunction func() |
| 242 | } |
| 243 | |
| 244 | type globalState struct { |
| 245 | mainThread *State |
nothing calls this directly
no outgoing calls
no test coverage detected