Lines Matching refs:L1

180 static void stack_init (lua_State *L1, lua_State *L) {  in stack_init()  argument
183 L1->stack.p = luaM_newvector(L, BASIC_STACK_SIZE + EXTRA_STACK, StackValue); in stack_init()
184 L1->tbclist.p = L1->stack.p; in stack_init()
186 setnilvalue(s2v(L1->stack.p + i)); /* erase new stack */ in stack_init()
187 L1->top.p = L1->stack.p; in stack_init()
188 L1->stack_last.p = L1->stack.p + BASIC_STACK_SIZE; in stack_init()
190 ci = &L1->base_ci; in stack_init()
193 ci->func.p = L1->top.p; in stack_init()
196 setnilvalue(s2v(L1->top.p)); /* 'function' entry for this 'ci' */ in stack_init()
197 L1->top.p++; in stack_init()
198 ci->top.p = L1->top.p + LUA_MINSTACK; in stack_init()
199 L1->ci = ci; in stack_init()
289 lua_State *L1; in lua_newthread() local
294 L1 = gco2th(o); in lua_newthread()
296 setthvalue2s(L, L->top.p, L1); in lua_newthread()
298 preinit_thread(L1, g); in lua_newthread()
299 L1->hookmask = L->hookmask; in lua_newthread()
300 L1->basehookcount = L->basehookcount; in lua_newthread()
301 L1->hook = L->hook; in lua_newthread()
302 resethookcount(L1); in lua_newthread()
304 memcpy(lua_getextraspace(L1), lua_getextraspace(g->mainthread), in lua_newthread()
306 luai_userstatethread(L, L1); in lua_newthread()
307 stack_init(L1, L); /* init stack */ in lua_newthread()
309 return L1; in lua_newthread()
313 void luaE_freethread (lua_State *L, lua_State *L1) { in luaE_freethread() argument
314 LX *l = fromstate(L1); in luaE_freethread()
315 luaF_closeupval(L1, L1->stack.p); /* close all upvalues */ in luaE_freethread()
316 lua_assert(L1->openupval == NULL); in luaE_freethread()
317 luai_userstatefree(L, L1); in luaE_freethread()
318 freestack(L1); in luaE_freethread()