Lines Matching full: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()
291 lua_State *L1; in lua_newthread() local
296 L1 = gco2th(o); in lua_newthread()
298 setthvalue2s(L, L->top.p, L1); in lua_newthread()
300 preinit_thread(L1, g); in lua_newthread()
301 L1->hookmask = L->hookmask; in lua_newthread()
302 L1->basehookcount = L->basehookcount; in lua_newthread()
303 L1->hook = L->hook; in lua_newthread()
304 resethookcount(L1); in lua_newthread()
305 /* initialize L1 extra space */ in lua_newthread()
306 memcpy(lua_getextraspace(L1), lua_getextraspace(g->mainthread), in lua_newthread()
308 luai_userstatethread(L, L1); in lua_newthread()
309 stack_init(L1, L); /* init stack */ in lua_newthread()
311 return L1; in lua_newthread()
315 void luaE_freethread (lua_State *L, lua_State *L1) { in luaE_freethread() argument
316 LX *l = fromstate(L1); in luaE_freethread()
317 luaF_closeupval(L1, L1->stack.p); /* close all upvalues */ in luaE_freethread()
318 lua_assert(L1->openupval == NULL); in luaE_freethread()
319 luai_userstatefree(L, L1); in luaE_freethread()
320 freestack(L1); in luaE_freethread()