MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / stack_init

Function stack_init

Source/Misc/lua/src/lua.c:8957–8973  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8955
8956
8957static void stack_init (lua_State *L1, lua_State *L) {
8958/* initialize CallInfo array */
8959L1->base_ci = luaM_newvector(L, BASIC_CI_SIZE, CallInfo);
8960L1->ci = L1->base_ci;
8961L1->size_ci = BASIC_CI_SIZE;
8962L1->end_ci = L1->base_ci + L1->size_ci - 1;
8963/* initialize stack array */
8964L1->stack = luaM_newvector(L, BASIC_STACK_SIZE + EXTRA_STACK, TValue);
8965L1->stacksize = BASIC_STACK_SIZE + EXTRA_STACK;
8966L1->top = L1->stack;
8967L1->stack_last = L1->stack+(L1->stacksize - EXTRA_STACK)-1;
8968/* initialize first ci */
8969L1->ci->func = L1->top;
8970setnilvalue(L1->top++); /* `function' entry for this `ci' */
8971L1->base = L1->ci->base = L1->top;
8972L1->ci->top = L1->top + LUA_MINSTACK;
8973}
8974
8975
8976static void freestack (lua_State *L, lua_State *L1) {

Callers 2

f_luaopenFunction · 0.85
luaE_newthreadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected