L1 141 lib/lua/lapi.c lua_State *L1; L1 144 lib/lua/lapi.c L1 = luaE_newthread(L); L1 145 lib/lua/lapi.c setthvalue(L, L->top, L1); L1 148 lib/lua/lapi.c luai_userstatethread(L, L1); L1 149 lib/lua/lapi.c return L1; L1 88 lib/lua/ldblib.c static void treatstackoption (lua_State *L, lua_State *L1, const char *fname) { L1 89 lib/lua/ldblib.c if (L == L1) { L1 94 lib/lua/ldblib.c lua_xmove(L1, L, 1); L1 102 lib/lua/ldblib.c lua_State *L1 = getthread(L, &arg); L1 105 lib/lua/ldblib.c if (!lua_getstack(L1, (int)lua_tointeger(L, arg+1), &ar)) { L1 114 lib/lua/ldblib.c lua_xmove(L, L1, 1); L1 118 lib/lua/ldblib.c if (!lua_getinfo(L1, options, &ar)) L1 137 lib/lua/ldblib.c treatstackoption(L, L1, "activelines"); L1 139 lib/lua/ldblib.c treatstackoption(L, L1, "func"); L1 146 lib/lua/ldblib.c lua_State *L1 = getthread(L, &arg); L1 149 lib/lua/ldblib.c if (!lua_getstack(L1, luaL_checkint(L, arg+1), &ar)) /* out of range? */ L1 151 lib/lua/ldblib.c name = lua_getlocal(L1, &ar, luaL_checkint(L, arg+2)); L1 153 lib/lua/ldblib.c lua_xmove(L1, L, 1); L1 167 lib/lua/ldblib.c lua_State *L1 = getthread(L, &arg); L1 169 lib/lua/ldblib.c if (!lua_getstack(L1, luaL_checkint(L, arg+1), &ar)) /* out of range? */ L1 173 lib/lua/ldblib.c lua_xmove(L, L1, 1); L1 174 lib/lua/ldblib.c lua_pushstring(L, lua_setlocal(L1, &ar, luaL_checkint(L, arg+2))); L1 261 lib/lua/ldblib.c lua_State *L1 = getthread(L, &arg); L1 273 lib/lua/ldblib.c lua_pushlightuserdata(L, L1); L1 277 lib/lua/ldblib.c lua_sethook(L1, func, mask, count); /* set hooks */ L1 284 lib/lua/ldblib.c lua_State *L1 = getthread(L, &arg); L1 286 lib/lua/ldblib.c int mask = lua_gethookmask(L1); L1 287 lib/lua/ldblib.c lua_Hook hook = lua_gethook(L1); L1 292 lib/lua/ldblib.c lua_pushlightuserdata(L, L1); L1 297 lib/lua/ldblib.c lua_pushinteger(L, lua_gethookcount(L1)); L1 326 lib/lua/ldblib.c lua_State *L1 = getthread(L, &arg); L1 333 lib/lua/ldblib.c level = (L == L1) ? 1 : 0; /* level 0 may be this own function */ L1 339 lib/lua/ldblib.c while (lua_getstack(L1, level++, &ar)) { L1 342 lib/lua/ldblib.c if (!lua_getstack(L1, level+LEVELS2, &ar)) L1 346 lib/lua/ldblib.c while (lua_getstack(L1, level+LEVELS2, &ar)) /* find last levels */ L1 353 lib/lua/ldblib.c lua_getinfo(L1, "Snl", &ar); L1 42 lib/lua/lstate.c static void stack_init (lua_State *L1, lua_State *L) { L1 44 lib/lua/lstate.c L1->base_ci = luaM_newvector(L, BASIC_CI_SIZE, CallInfo); L1 45 lib/lua/lstate.c L1->ci = L1->base_ci; L1 46 lib/lua/lstate.c L1->size_ci = BASIC_CI_SIZE; L1 47 lib/lua/lstate.c L1->end_ci = L1->base_ci + L1->size_ci - 1; L1 49 lib/lua/lstate.c L1->stack = luaM_newvector(L, BASIC_STACK_SIZE + EXTRA_STACK, TValue); L1 50 lib/lua/lstate.c L1->stacksize = BASIC_STACK_SIZE + EXTRA_STACK; L1 51 lib/lua/lstate.c L1->top = L1->stack; L1 52 lib/lua/lstate.c L1->stack_last = L1->stack+(L1->stacksize - EXTRA_STACK)-1; L1 54 lib/lua/lstate.c L1->ci->func = L1->top; L1 55 lib/lua/lstate.c setnilvalue(L1->top++); /* `function' entry for this `ci' */ L1 56 lib/lua/lstate.c L1->base = L1->ci->base = L1->top; L1 57 lib/lua/lstate.c L1->ci->top = L1->top + LUA_MINSTACK; L1 61 lib/lua/lstate.c static void freestack (lua_State *L, lua_State *L1) { L1 62 lib/lua/lstate.c luaM_freearray(L, L1->base_ci, L1->size_ci, CallInfo); L1 63 lib/lua/lstate.c luaM_freearray(L, L1->stack, L1->stacksize, TValue); L1 120 lib/lua/lstate.c lua_State *L1 = tostate(luaM_malloc(L, state_size(lua_State))); L1 121 lib/lua/lstate.c luaC_link(L, obj2gco(L1), LUA_TTHREAD); L1 122 lib/lua/lstate.c preinit_state(L1, G(L)); L1 123 lib/lua/lstate.c stack_init(L1, L); /* init stack */ L1 124 lib/lua/lstate.c setobj2n(L, gt(L1), gt(L)); /* share table of globals */ L1 125 lib/lua/lstate.c L1->hookmask = L->hookmask; L1 126 lib/lua/lstate.c L1->basehookcount = L->basehookcount; L1 127 lib/lua/lstate.c L1->hook = L->hook; L1 128 lib/lua/lstate.c resethookcount(L1); L1 129 lib/lua/lstate.c lua_assert(iswhite(obj2gco(L1))); L1 130 lib/lua/lstate.c return L1; L1 134 lib/lua/lstate.c LUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1) { L1 135 lib/lua/lstate.c luaF_close(L1, L1->stack); /* close all upvalues for this thread */ L1 136 lib/lua/lstate.c lua_assert(L1->openupval == NULL); L1 137 lib/lua/lstate.c luai_userstatefree(L1); L1 138 lib/lua/lstate.c freestack(L, L1); L1 139 lib/lua/lstate.c luaM_freemem(L, fromstate(L1), state_size(lua_State)); L1 166 lib/lua/lstate.h LUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1); L1 760 lib/lua/luaconf.h #define luai_userstatethread(L,L1) ((void)L)