MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / stack_init

Function stack_init

third-party/lua-5.5.0/src/lstate.c:158–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156
157
158static void stack_init (lua_State *L1, lua_State *L) {
159 int i;
160 /* initialize stack array */
161 L1->stack.p = luaM_newvector(L, BASIC_STACK_SIZE + EXTRA_STACK, StackValue);
162 L1->tbclist.p = L1->stack.p;
163 for (i = 0; i < BASIC_STACK_SIZE + EXTRA_STACK; i++)
164 setnilvalue(s2v(L1->stack.p + i)); /* erase new stack */
165 L1->stack_last.p = L1->stack.p + BASIC_STACK_SIZE;
166 /* initialize first ci */
167 resetCI(L1);
168 L1->top.p = L1->stack.p + 1; /* +1 for 'function' entry */
169}
170
171
172static void freestack (lua_State *L) {

Callers 2

f_luaopenFunction · 0.70
lua_newthreadFunction · 0.70

Calls 1

resetCIFunction · 0.85

Tested by

no test coverage detected