Lines Matching refs:ls
968 struct LexState*ls;
2255 static void luaX_lexerror(LexState*ls,const char*msg,int token);
2660 #define next(ls)(ls->current=zgetc(ls->z))
2661 #define currIsNewline(ls)(ls->current=='\n'||ls->current=='\r')
2671 #define save_and_next(ls)(save(ls,ls->current),next(ls))
2672 static void save(LexState*ls,int c){
2673 Mbuffer*b=ls->buff;
2677 luaX_lexerror(ls,"lexical element too long",0);
2679 luaZ_resizebuffer(ls->L,b,newsize);
2691 static const char*luaX_token2str(LexState*ls,int token){
2693 return(iscntrl(token))?luaO_pushfstring(ls->L,"char(%d)",token):
2694 luaO_pushfstring(ls->L,"%c",token);
2699 static const char*txtToken(LexState*ls,int token){
2704 save(ls,'\0');
2705 return luaZ_buffer(ls->buff);
2707 return luaX_token2str(ls,token);
2710 static void luaX_lexerror(LexState*ls,const char*msg,int token){
2712 luaO_chunkid(buff,getstr(ls->source),80);
2713 msg=luaO_pushfstring(ls->L,"%s:%d: %s",buff,ls->linenumber,msg);
2715 luaO_pushfstring(ls->L,"%s near "LUA_QL("%s"),msg,txtToken(ls,token));
2716 luaD_throw(ls->L,3);
2718 static void luaX_syntaxerror(LexState*ls,const char*msg){
2719 luaX_lexerror(ls,msg,ls->t.token);
2721 static TString*luaX_newstring(LexState*ls,const char*str,size_t l){
2722 lua_State*L=ls->L;
2724 TValue*o=luaH_setstr(L,ls->fs->h,ts);
2731 static void inclinenumber(LexState*ls){
2732 int old=ls->current;
2733 next(ls);
2734 if(currIsNewline(ls)&&ls->current!=old)
2735 next(ls);
2736 if(++ls->linenumber>=(INT_MAX-2))
2737 luaX_syntaxerror(ls,"chunk has too many lines");
2739 static void luaX_setinput(lua_State*L,LexState*ls,ZIO*z,TString*source){
2740 ls->decpoint='.';
2741 ls->L=L;
2742 ls->lookahead.token=TK_EOS;
2743 ls->z=z;
2744 ls->fs=NULL;
2745 ls->linenumber=1;
2746 ls->lastline=1;
2747 ls->source=source;
2748 luaZ_resizebuffer(ls->L,ls->buff,32);
2749 next(ls);
2751 static int check_next(LexState*ls,const char*set){
2752 if(!strchr(set,ls->current))
2754 save_and_next(ls);
2757 static void buffreplace(LexState*ls,char from,char to){
2758 size_t n=luaZ_bufflen(ls->buff);
2759 char*p=luaZ_buffer(ls->buff);
2763 static void read_numeral(LexState*ls,SemInfo*seminfo){
2765 save_and_next(ls);
2766 }while(isdigit(ls->current)||ls->current=='.');
2767 if(check_next(ls,"Ee"))
2768 check_next(ls,"+-");
2769 while(isalnum(ls->current)||ls->current=='_')
2770 save_and_next(ls);
2771 save(ls,'\0');
2772 buffreplace(ls,'.',ls->decpoint);
2773 if(!luaO_str2d(luaZ_buffer(ls->buff),&seminfo->r))
2774 luaX_lexerror(ls,"malformed number",TK_NUMBER);
2776 static int skip_sep(LexState*ls){
2778 int s=ls->current;
2779 save_and_next(ls);
2780 while(ls->current=='='){
2781 save_and_next(ls);
2784 return(ls->current==s)?count:(-count)-1;
2786 static void read_long_string(LexState*ls,SemInfo*seminfo,int sep){
2789 save_and_next(ls);
2790 if(currIsNewline(ls))
2791 inclinenumber(ls);
2793 switch(ls->current){
2795 luaX_lexerror(ls,(seminfo)?"unfinished long string":
2799 if(skip_sep(ls)==sep){
2800 save_and_next(ls);
2807 save(ls,'\n');
2808 inclinenumber(ls);
2809 if(!seminfo)luaZ_resetbuffer(ls->buff);
2813 if(seminfo)save_and_next(ls);
2814 else next(ls);
2819 seminfo->ts=luaX_newstring(ls,luaZ_buffer(ls->buff)+(2+sep),
2820 luaZ_bufflen(ls->buff)-2*(2+sep));
2822 static void read_string(LexState*ls,int del,SemInfo*seminfo){
2823 save_and_next(ls);
2824 while(ls->current!=del){
2825 switch(ls->current){
2827 luaX_lexerror(ls,"unfinished string",TK_EOS);
2831 luaX_lexerror(ls,"unfinished string",TK_STRING);
2835 next(ls);
2836 switch(ls->current){
2845 case'\r':save(ls,'\n');inclinenumber(ls);continue;
2848 if(!isdigit(ls->current))
2849 save_and_next(ls);
2854 c=10*c+(ls->current-'0');
2855 next(ls);
2856 }while(++i<3&&isdigit(ls->current));
2858 luaX_lexerror(ls,"escape sequence too large",TK_STRING);
2859 save(ls,c);
2864 save(ls,c);
2865 next(ls);
2869 save_and_next(ls);
2872 save_and_next(ls);
2873 seminfo->ts=luaX_newstring(ls,luaZ_buffer(ls->buff)+1,
2874 luaZ_bufflen(ls->buff)-2);
2876 static int llex(LexState*ls,SemInfo*seminfo){
2877 luaZ_resetbuffer(ls->buff);
2879 switch(ls->current){
2882 inclinenumber(ls);
2886 next(ls);
2887 if(ls->current!='-')return'-';
2888 next(ls);
2889 if(ls->current=='['){
2890 int sep=skip_sep(ls);
2891 luaZ_resetbuffer(ls->buff);
2893 read_long_string(ls,NULL,sep);
2894 luaZ_resetbuffer(ls->buff);
2898 while(!currIsNewline(ls)&&ls->current!=(-1))
2899 next(ls);
2903 int sep=skip_sep(ls);
2905 read_long_string(ls,seminfo,sep);
2909 else luaX_lexerror(ls,"invalid long string delimiter",TK_STRING);
2912 next(ls);
2913 if(ls->current!='=')return'=';
2914 else{next(ls);return TK_EQ;}
2917 next(ls);
2918 if(ls->current!='=')return'<';
2919 else{next(ls);return TK_LE;}
2922 next(ls);
2923 if(ls->current!='=')return'>';
2924 else{next(ls);return TK_GE;}
2927 next(ls);
2928 if(ls->current!='=')return'~';
2929 else{next(ls);return TK_NE;}
2933 read_string(ls,ls->current,seminfo);
2937 save_and_next(ls);
2938 if(check_next(ls,".")){
2939 if(check_next(ls,"."))
2943 else if(!isdigit(ls->current))return'.';
2945 read_numeral(ls,seminfo);
2953 if(isspace(ls->current)){
2954 next(ls);
2957 else if(isdigit(ls->current)){
2958 read_numeral(ls,seminfo);
2961 else if(isalpha(ls->current)||ls->current=='_'){
2964 save_and_next(ls);
2965 }while(isalnum(ls->current)||ls->current=='_');
2966 ts=luaX_newstring(ls,luaZ_buffer(ls->buff),
2967 luaZ_bufflen(ls->buff));
2976 int c=ls->current;
2977 next(ls);
2984 static void luaX_next(LexState*ls){
2985 ls->lastline=ls->linenumber;
2986 if(ls->lookahead.token!=TK_EOS){
2987 ls->t=ls->lookahead;
2988 ls->lookahead.token=TK_EOS;
2991 ls->t.token=llex(ls,&ls->t.seminfo);
2993 static void luaX_lookahead(LexState*ls){
2994 ls->lookahead.token=llex(ls,&ls->lookahead.seminfo);
3041 luaX_syntaxerror(fs->ls,"control structure too long");
3125 luaX_syntaxerror(fs->ls,"function or expression too complex");
3639 return luaK_code(fs,CREATE_ABC(o,a,b,c),fs->ls->lastline);
3642 return luaK_code(fs,CREATE_ABx(o,a,bc),fs->ls->lastline);
3651 luaK_code(fs,cast(Instruction,c),fs->ls->lastline);
3665 static void chunk(LexState*ls);
3666 static void expr(LexState*ls,expdesc*v);
3667 static void anchor_token(LexState*ls){
3668 if(ls->t.token==TK_NAME||ls->t.token==TK_STRING){
3669 TString*ts=ls->t.seminfo.ts;
3670 luaX_newstring(ls,getstr(ts),ts->tsv.len);
3673 static void error_expected(LexState*ls,int token){
3674 luaX_syntaxerror(ls,
3675 luaO_pushfstring(ls->L,LUA_QL("%s")" expected",luaX_token2str(ls,token)));
3682 luaX_lexerror(fs->ls,msg,0);
3684 static int testnext(LexState*ls,int c){
3685 if(ls->t.token==c){
3686 luaX_next(ls);
3691 static void check(LexState*ls,int c){
3692 if(ls->t.token!=c)
3693 error_expected(ls,c);
3695 static void checknext(LexState*ls,int c){
3696 check(ls,c);
3697 luaX_next(ls);
3699 #define check_condition(ls,c,msg){if(!(c))luaX_syntaxerror(ls,msg);}
3700 static void check_match(LexState*ls,int what,int who,int where){
3701 if(!testnext(ls,what)){
3702 if(where==ls->linenumber)
3703 error_expected(ls,what);
3705 luaX_syntaxerror(ls,luaO_pushfstring(ls->L,
3707 luaX_token2str(ls,what),luaX_token2str(ls,who),where));
3711 static TString*str_checkname(LexState*ls){
3713 check(ls,TK_NAME);
3714 ts=ls->t.seminfo.ts;
3715 luaX_next(ls);
3723 static void codestring(LexState*ls,expdesc*e,TString*s){
3724 init_exp(e,VK,luaK_stringK(ls->fs,s));
3726 static void checkname(LexState*ls,expdesc*e){
3727 codestring(ls,e,str_checkname(ls));
3729 static int registerlocalvar(LexState*ls,TString*varname){
3730 FuncState*fs=ls->fs;
3733 luaM_growvector(ls->L,f->locvars,fs->nlocvars,f->sizelocvars,
3737 luaC_objbarrier(ls->L,f,varname);
3740 #define new_localvarliteral(ls,v,n)new_localvar(ls,luaX_newstring(ls,""v,(sizeof(v)/sizeof(char))-1…
3741 static void new_localvar(LexState*ls,TString*name,int n){
3742 FuncState*fs=ls->fs;
3744 fs->actvar[fs->nactvar+n]=cast(unsigned short,registerlocalvar(ls,name));
3746 static void adjustlocalvars(LexState*ls,int nvars){
3747 FuncState*fs=ls->fs;
3753 static void removevars(LexState*ls,int tolevel){
3754 FuncState*fs=ls->fs;
3812 static void singlevar(LexState*ls,expdesc*var){
3813 TString*varname=str_checkname(ls);
3814 FuncState*fs=ls->fs;
3818 static void adjust_assign(LexState*ls,int nvars,int nexps,expdesc*e){
3819 FuncState*fs=ls->fs;
3836 static void enterlevel(LexState*ls){
3837 if(++ls->L->nCcalls>200)
3838 luaX_lexerror(ls,"chunk has too many syntax levels",0);
3840 #define leavelevel(ls)((ls)->L->nCcalls--)
3852 removevars(fs->ls,bl->nactvar);
3858 static void pushclosure(LexState*ls,FuncState*func,expdesc*v){
3859 FuncState*fs=ls->fs;
3863 luaM_growvector(ls->L,f->p,fs->np,f->sizep,Proto*,
3867 luaC_objbarrier(ls->L,f,func->f);
3874 static void open_func(LexState*ls,FuncState*fs){
3875 lua_State*L=ls->L;
3878 fs->prev=ls->fs;
3879 fs->ls=ls;
3881 ls->fs=fs;
3891 f->source=ls->source;
3899 static void close_func(LexState*ls){
3900 lua_State*L=ls->L;
3901 FuncState*fs=ls->fs;
3903 removevars(ls,0);
3917 ls->fs=fs->prev;
3918 if(fs)anchor_token(ls);
3934 static void field(LexState*ls,expdesc*v){
3935 FuncState*fs=ls->fs;
3938 luaX_next(ls);
3939 checkname(ls,&key);
3942 static void yindex(LexState*ls,expdesc*v){
3943 luaX_next(ls);
3944 expr(ls,v);
3945 luaK_exp2val(ls->fs,v);
3946 checknext(ls,']');
3955 static void recfield(LexState*ls,struct ConsControl*cc){
3956 FuncState*fs=ls->fs;
3957 int reg=ls->fs->freereg;
3960 if(ls->t.token==TK_NAME){
3962 checkname(ls,&key);
3965 yindex(ls,&key);
3967 checknext(ls,'=');
3969 expr(ls,&val);
3995 static void listfield(LexState*ls,struct ConsControl*cc){
3996 expr(ls,&cc->v);
3997 luaY_checklimit(ls->fs,cc->na,(INT_MAX-2),"items in a constructor");
4001 static void constructor(LexState*ls,expdesc*t){
4002 FuncState*fs=ls->fs;
4003 int line=ls->linenumber;
4010 luaK_exp2nextreg(ls->fs,t);
4011 checknext(ls,'{');
4013 if(ls->t.token=='}')break;
4015 switch(ls->t.token){
4017 luaX_lookahead(ls);
4018 if(ls->lookahead.token!='=')
4019 listfield(ls,&cc);
4021 recfield(ls,&cc);
4025 recfield(ls,&cc);
4029 listfield(ls,&cc);
4033 }while(testnext(ls,',')||testnext(ls,';'));
4034 check_match(ls,'}','{',line);
4039 static void parlist(LexState*ls){
4040 FuncState*fs=ls->fs;
4044 if(ls->t.token!=')'){
4046 switch(ls->t.token){
4048 new_localvar(ls,str_checkname(ls),nparams++);
4052 luaX_next(ls);
4056 default:luaX_syntaxerror(ls,"<name> or "LUA_QL("...")" expected");
4058 }while(!f->is_vararg&&testnext(ls,','));
4060 adjustlocalvars(ls,nparams);
4064 static void body(LexState*ls,expdesc*e,int needself,int line){
4066 open_func(ls,&new_fs);
4068 checknext(ls,'(');
4070 new_localvarliteral(ls,"self",0);
4071 adjustlocalvars(ls,1);
4073 parlist(ls);
4074 checknext(ls,')');
4075 chunk(ls);
4076 new_fs.f->lastlinedefined=ls->linenumber;
4077 check_match(ls,TK_END,TK_FUNCTION,line);
4078 close_func(ls);
4079 pushclosure(ls,&new_fs,e);
4081 static int explist1(LexState*ls,expdesc*v){
4083 expr(ls,v);
4084 while(testnext(ls,',')){
4085 luaK_exp2nextreg(ls->fs,v);
4086 expr(ls,v);
4091 static void funcargs(LexState*ls,expdesc*f){
4092 FuncState*fs=ls->fs;
4095 int line=ls->linenumber;
4096 switch(ls->t.token){
4098 if(line!=ls->lastline)
4099 luaX_syntaxerror(ls,"ambiguous syntax (function call x new statement)");
4100 luaX_next(ls);
4101 if(ls->t.token==')')
4104 explist1(ls,&args);
4107 check_match(ls,')','(',line);
4111 constructor(ls,&args);
4115 codestring(ls,&args,ls->t.seminfo.ts);
4116 luaX_next(ls);
4120 luaX_syntaxerror(ls,"function arguments expected");
4136 static void prefixexp(LexState*ls,expdesc*v){
4137 switch(ls->t.token){
4139 int line=ls->linenumber;
4140 luaX_next(ls);
4141 expr(ls,v);
4142 check_match(ls,')','(',line);
4143 luaK_dischargevars(ls->fs,v);
4147 singlevar(ls,v);
4151 luaX_syntaxerror(ls,"unexpected symbol");
4156 static void primaryexp(LexState*ls,expdesc*v){
4157 FuncState*fs=ls->fs;
4158 prefixexp(ls,v);
4160 switch(ls->t.token){
4162 field(ls,v);
4168 yindex(ls,&key);
4174 luaX_next(ls);
4175 checkname(ls,&key);
4177 funcargs(ls,v);
4182 funcargs(ls,v);
4189 static void simpleexp(LexState*ls,expdesc*v){
4190 switch(ls->t.token){
4193 v->u.nval=ls->t.seminfo.r;
4197 codestring(ls,v,ls->t.seminfo.ts);
4213 FuncState*fs=ls->fs;
4214 check_condition(ls,fs->f->is_vararg,
4221 constructor(ls,v);
4225 luaX_next(ls);
4226 body(ls,v,0,ls->linenumber);
4230 primaryexp(ls,v);
4234 luaX_next(ls);
4274 static BinOpr subexpr(LexState*ls,expdesc*v,unsigned int limit){
4277 enterlevel(ls);
4278 uop=getunopr(ls->t.token);
4280 luaX_next(ls);
4281 subexpr(ls,v,8);
4282 luaK_prefix(ls->fs,uop,v);
4284 else simpleexp(ls,v);
4285 op=getbinopr(ls->t.token);
4289 luaX_next(ls);
4290 luaK_infix(ls->fs,op,v);
4291 nextop=subexpr(ls,&v2,priority[op].right);
4292 luaK_posfix(ls->fs,op,v,&v2);
4295 leavelevel(ls);
4298 static void expr(LexState*ls,expdesc*v){
4299 subexpr(ls,v,0);
4309 static void block(LexState*ls){
4310 FuncState*fs=ls->fs;
4313 chunk(ls);
4320 static void check_conflict(LexState*ls,struct LHS_assign*lh,expdesc*v){
4321 FuncState*fs=ls->fs;
4341 static void assignment(LexState*ls,struct LHS_assign*lh,int nvars){
4343 check_condition(ls,VLOCAL<=lh->v.k&&lh->v.k<=VINDEXED,
4345 if(testnext(ls,',')){
4348 primaryexp(ls,&nv.v);
4350 check_conflict(ls,lh,&nv.v);
4351 luaY_checklimit(ls->fs,nvars,200-ls->L->nCcalls,
4353 assignment(ls,&nv,nvars+1);
4357 checknext(ls,'=');
4358 nexps=explist1(ls,&e);
4360 adjust_assign(ls,nvars,nexps,&e);
4362 ls->fs->freereg-=nexps-nvars;
4365 luaK_setoneret(ls->fs,&e);
4366 luaK_storevar(ls->fs,&lh->v,&e);
4370 init_exp(&e,VNONRELOC,ls->fs->freereg-1);
4371 luaK_storevar(ls->fs,&lh->v,&e);
4373 static int cond(LexState*ls){
4375 expr(ls,&v);
4377 luaK_goiftrue(ls->fs,&v);
4380 static void breakstat(LexState*ls){
4381 FuncState*fs=ls->fs;
4389 luaX_syntaxerror(ls,"no loop to break");
4394 static void whilestat(LexState*ls,int line){
4395 FuncState*fs=ls->fs;
4399 luaX_next(ls);
4401 condexit=cond(ls);
4403 checknext(ls,TK_DO);
4404 block(ls);
4406 check_match(ls,TK_END,TK_WHILE,line);
4410 static void repeatstat(LexState*ls,int line){
4412 FuncState*fs=ls->fs;
4417 luaX_next(ls);
4418 chunk(ls);
4419 check_match(ls,TK_UNTIL,TK_REPEAT,line);
4420 condexit=cond(ls);
4423 luaK_patchlist(ls->fs,condexit,repeat_init);
4426 breakstat(ls);
4427 luaK_patchtohere(ls->fs,condexit);
4429 luaK_patchlist(ls->fs,luaK_jump(fs),repeat_init);
4433 static int exp1(LexState*ls){
4436 expr(ls,&e);
4438 luaK_exp2nextreg(ls->fs,&e);
4441 static void forbody(LexState*ls,int base,int line,int nvars,int isnum){
4443 FuncState*fs=ls->fs;
4445 adjustlocalvars(ls,3);
4446 checknext(ls,TK_DO);
4449 adjustlocalvars(ls,nvars);
4451 block(ls);
4459 static void fornum(LexState*ls,TString*varname,int line){
4460 FuncState*fs=ls->fs;
4462 new_localvarliteral(ls,"(for index)",0);
4463 new_localvarliteral(ls,"(for limit)",1);
4464 new_localvarliteral(ls,"(for step)",2);
4465 new_localvar(ls,varname,3);
4466 checknext(ls,'=');
4467 exp1(ls);
4468 checknext(ls,',');
4469 exp1(ls);
4470 if(testnext(ls,','))
4471 exp1(ls);
4476 forbody(ls,base,line,1,1);
4478 static void forlist(LexState*ls,TString*indexname){
4479 FuncState*fs=ls->fs;
4484 new_localvarliteral(ls,"(for generator)",nvars++);
4485 new_localvarliteral(ls,"(for state)",nvars++);
4486 new_localvarliteral(ls,"(for control)",nvars++);
4487 new_localvar(ls,indexname,nvars++);
4488 while(testnext(ls,','))
4489 new_localvar(ls,str_checkname(ls),nvars++);
4490 checknext(ls,TK_IN);
4491 line=ls->linenumber;
4492 adjust_assign(ls,3,explist1(ls,&e),&e);
4494 forbody(ls,base,line,nvars-3,0);
4496 static void forstat(LexState*ls,int line){
4497 FuncState*fs=ls->fs;
4501 luaX_next(ls);
4502 varname=str_checkname(ls);
4503 switch(ls->t.token){
4504 case'=':fornum(ls,varname,line);break;
4505 case',':case TK_IN:forlist(ls,varname);break;
4506 default:luaX_syntaxerror(ls,LUA_QL("=")" or "LUA_QL("in")" expected");
4508 check_match(ls,TK_END,TK_FOR,line);
4511 static int test_then_block(LexState*ls){
4513 luaX_next(ls);
4514 condexit=cond(ls);
4515 checknext(ls,TK_THEN);
4516 block(ls);
4519 static void ifstat(LexState*ls,int line){
4520 FuncState*fs=ls->fs;
4523 flist=test_then_block(ls);
4524 while(ls->t.token==TK_ELSEIF){
4527 flist=test_then_block(ls);
4529 if(ls->t.token==TK_ELSE){
4532 luaX_next(ls);
4533 block(ls);
4538 check_match(ls,TK_END,TK_IF,line);
4540 static void localfunc(LexState*ls){
4542 FuncState*fs=ls->fs;
4543 new_localvar(ls,str_checkname(ls),0);
4546 adjustlocalvars(ls,1);
4547 body(ls,&b,0,ls->linenumber);
4551 static void localstat(LexState*ls){
4556 new_localvar(ls,str_checkname(ls),nvars++);
4557 }while(testnext(ls,','));
4558 if(testnext(ls,'='))
4559 nexps=explist1(ls,&e);
4564 adjust_assign(ls,nvars,nexps,&e);
4565 adjustlocalvars(ls,nvars);
4567 static int funcname(LexState*ls,expdesc*v){
4569 singlevar(ls,v);
4570 while(ls->t.token=='.')
4571 field(ls,v);
4572 if(ls->t.token==':'){
4574 field(ls,v);
4578 static void funcstat(LexState*ls,int line){
4581 luaX_next(ls);
4582 needself=funcname(ls,&v);
4583 body(ls,&b,needself,line);
4584 luaK_storevar(ls->fs,&v,&b);
4585 luaK_fixline(ls->fs,line);
4587 static void exprstat(LexState*ls){
4588 FuncState*fs=ls->fs;
4590 primaryexp(ls,&v.v);
4595 assignment(ls,&v,1);
4598 static void retstat(LexState*ls){
4599 FuncState*fs=ls->fs;
4602 luaX_next(ls);
4603 if(block_follow(ls->t.token)||ls->t.token==';')
4606 nret=explist1(ls,&e);
4626 static int statement(LexState*ls){
4627 int line=ls->linenumber;
4628 switch(ls->t.token){
4630 ifstat(ls,line);
4634 whilestat(ls,line);
4638 luaX_next(ls);
4639 block(ls);
4640 check_match(ls,TK_END,TK_DO,line);
4644 forstat(ls,line);
4648 repeatstat(ls,line);
4652 funcstat(ls,line);
4656 luaX_next(ls);
4657 if(testnext(ls,TK_FUNCTION))
4658 localfunc(ls);
4660 localstat(ls);
4664 retstat(ls);
4668 luaX_next(ls);
4669 breakstat(ls);
4673 exprstat(ls);
4678 static void chunk(LexState*ls){
4680 enterlevel(ls);
4681 while(!islast&&!block_follow(ls->t.token)){
4682 islast=statement(ls);
4683 testnext(ls,';');
4684 ls->fs->freereg=ls->fs->nactvar;
4686 leavelevel(ls);
4814 static int l_strcmp(const TString*ls,const TString*rs){
4815 const char*l=getstr(ls);
4816 size_t ll=ls->tsv.len;
6185 LoadS*ls=(LoadS*)ud;
6187 if(ls->size==0)return NULL;
6188 *size=ls->size;
6189 ls->size=0;
6190 return ls->s;
6194 LoadS ls;
6195 ls.s=buff;
6196 ls.size=size;
6197 return lua_load(L,getS,&ls,name);
7408 size_t ls;
7409 const char*s=lua_tolstring(L,lua_upvalueindex(1),&ls);
7414 ms.src_end=s+ls;