static void singlevar(LexState* ls, expdesc* var) { TString* varname = str_checkname(ls); FuncState* fs = ls->fs; if (singlevaraux(fs, varname, var, 1) == VGLOBAL) var->u.s.info = luaK_stringK(fs, varname); /* info points to global name */ }
static void singlevar (LexState *ls, expdesc *var) { TString *varname = str_checkname(ls); FuncState *fs = ls->fs; if (singlevaraux(fs, varname, var, 1) == VGLOBAL) { var->u.s.info = luaK_stringK(fs, varname); /* info points to global name */ #ifdef LUA_UTILITIES_NET GetGlobal(varname, ls); #endif } }
static void singlevaraux (FuncState *fs, TString *n, expdesc *var, int base) { if (fs == NULL) /* no more levels? */ init_exp(var, VGLOBAL, NO_REG); /* default is global variable */ else { int v = searchvar(fs, n); /* look up at current level */ if (v >= 0) { init_exp(var, VLOCAL, v); if (!base) markupval(fs, v); /* local will be used as an upval */ } else { /* not found at current level; try upper one */ singlevaraux(fs->prev, n, var, 0); if (var->k == VGLOBAL) { if (base) var->info = luaK_stringK(fs, n); /* info points to global name */ } else { /* LOCAL or UPVAL */ var->info = indexupvalue(fs, n, var); var->k = VUPVAL; /* upvalue in this level */ } } } }
static void codestring (LexState *ls, expdesc *e, TString *s) { init_exp(e, VK, luaK_stringK(ls->fs, s)); }
static void ICACHE_FLASH_ATTR codestring (LexState *ls, expdesc *e, TString *s) { init_exp(e, VK, luaK_stringK(ls->fs, s)); }
static void codestring (LexState *ls, expdesc *e, TString *s) { FuncState *currentFuncState = GetCurrentFuncState( ls ); init_exp(e, VK, luaK_stringK(currentFuncState, s)); }