Lines Matching full:l1
129 static void stack_init (lua_State *L1, lua_State *L) { in stack_init() argument
132 L1->stack = luaM_newvector(L, BASIC_STACK_SIZE, TValue); in stack_init()
133 L1->stacksize = BASIC_STACK_SIZE; in stack_init()
135 setnilvalue(L1->stack + i); /* erase new stack */ in stack_init()
136 L1->top = L1->stack; in stack_init()
137 L1->stack_last = L1->stack + L1->stacksize - EXTRA_STACK; in stack_init()
139 ci = &L1->base_ci; in stack_init()
142 ci->func = L1->top; in stack_init()
143 setnilvalue(L1->top++); /* 'function' entry for this 'ci' */ in stack_init()
144 ci->top = L1->top + LUA_MINSTACK; in stack_init()
145 L1->ci = ci; in stack_init()
235 lua_State *L1; in lua_newthread() local
238 L1 = &luaC_newobj(L, LUA_TTHREAD, sizeof(LX), NULL, offsetof(LX, l))->th; in lua_newthread()
239 setthvalue(L, L->top, L1); in lua_newthread()
241 preinit_state(L1, G(L)); in lua_newthread()
242 L1->hookmask = L->hookmask; in lua_newthread()
243 L1->basehookcount = L->basehookcount; in lua_newthread()
244 L1->hook = L->hook; in lua_newthread()
245 resethookcount(L1); in lua_newthread()
246 luai_userstatethread(L, L1); in lua_newthread()
247 stack_init(L1, L); /* init stack */ in lua_newthread()
249 return L1; in lua_newthread()
253 void luaE_freethread (lua_State *L, lua_State *L1) { in luaE_freethread() argument
254 LX *l = fromstate(L1); in luaE_freethread()
255 luaF_close(L1, L1->stack); /* close all upvalues for this thread */ in luaE_freethread()
256 lua_assert(L1->openupval == NULL); in luaE_freethread()
257 luai_userstatefree(L, L1); in luaE_freethread()
258 freestack(L1); in luaE_freethread()